From owner-dev-commits-src-main@freebsd.org Mon Mar 1 02:38:24 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F4034555301; Mon, 1 Mar 2021 02:38:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dpkvz6Z7cz3nTN; Mon, 1 Mar 2021 02:38:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D439A1BBB0; Mon, 1 Mar 2021 02:38:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1212cN5I030627; Mon, 1 Mar 2021 02:38:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1212cN4h030626; Mon, 1 Mar 2021 02:38:23 GMT (envelope-from git) Date: Mon, 1 Mar 2021 02:38:23 GMT Message-Id: <202103010238.1212cN4h030626@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brandon Bergren Subject: git: dd95b39235dd - main - [PowerPC64] Fix multiple issues in fpsetmask(). MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bdragon X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dd95b39235dd81c890aa3cce02a5bb7f91f23803 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2021 02:38:24 -0000 The branch main has been updated by bdragon: URL: https://cgit.FreeBSD.org/src/commit/?id=dd95b39235dd81c890aa3cce02a5bb7f91f23803 commit dd95b39235dd81c890aa3cce02a5bb7f91f23803 Author: Brandon Bergren AuthorDate: 2021-03-01 02:35:53 +0000 Commit: Brandon Bergren CommitDate: 2021-03-01 02:37:48 +0000 [PowerPC64] Fix multiple issues in fpsetmask(). Building R exposed a problem in fpsetmask() whereby we were not properly clamping the provided mask to the valid range. R initilizes the mask by calling fpsetmask(~0) on FreeBSD. Since we recently enabled precise exceptions, this was causing an immediate SIGFPE because we were attempting to set invalid bits in the fpscr. Properly limit the range of bits that can be set via fpsetmask(). While here, use the correct fp_except_t type instead of fp_rnd_t. Reported by: pkubaj (in IRC) MFC after: 1 week Sponsored by: Tag1 Consulting, Inc. --- lib/libc/powerpc64/gen/fpsetmask.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/libc/powerpc64/gen/fpsetmask.c b/lib/libc/powerpc64/gen/fpsetmask.c index 4d63552470be..f5d52eec5482 100644 --- a/lib/libc/powerpc64/gen/fpsetmask.c +++ b/lib/libc/powerpc64/gen/fpsetmask.c @@ -43,11 +43,11 @@ fp_except_t fpsetmask(fp_except_t mask) { u_int64_t fpscr; - fp_rnd_t old; + fp_except_t old; __asm__("mffs %0" : "=f"(fpscr)); - old = (fp_rnd_t)((fpscr >> 3) & 0x1f); - fpscr = (fpscr & 0xffffff07) | (mask << 3); + old = (fp_except_t)((fpscr >> 3) & 0x1f); + fpscr = (fpscr & 0xffffff07) | ((mask & 0x1f) << 3); __asm__ __volatile("mtfsf 0xff,%0" :: "f"(fpscr)); return (old); } From owner-dev-commits-src-main@freebsd.org Mon Mar 1 03:17:56 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7CA9A555BFA; Mon, 1 Mar 2021 03:17:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dplnc32Yxz3qPr; Mon, 1 Mar 2021 03:17:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5AFA51C368; Mon, 1 Mar 2021 03:17:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1213HuUQ084448; Mon, 1 Mar 2021 03:17:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1213Huie084447; Mon, 1 Mar 2021 03:17:56 GMT (envelope-from git) Date: Mon, 1 Mar 2021 03:17:56 GMT Message-Id: <202103010317.1213Huie084447@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brandon Bergren Subject: git: 384ee7cc6e9e - main - [PowerPC] [PowerPCSPE] Fix multiple issues in fpsetmask(). MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bdragon X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 384ee7cc6e9e4ddc91a6e9e623fcbbe5826bce38 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2021 03:17:56 -0000 The branch main has been updated by bdragon: URL: https://cgit.FreeBSD.org/src/commit/?id=384ee7cc6e9e4ddc91a6e9e623fcbbe5826bce38 commit 384ee7cc6e9e4ddc91a6e9e623fcbbe5826bce38 Author: Brandon Bergren AuthorDate: 2021-03-01 03:06:59 +0000 Commit: Brandon Bergren CommitDate: 2021-03-01 03:11:29 +0000 [PowerPC] [PowerPCSPE] Fix multiple issues in fpsetmask(). Building R on powerpc64 exposed a problem in fpsetmask() whereby we were not properly clamping the provided mask to the valid range. This same issue affects powerpc and powerpcspe. Properly limit the range of bits that can be set via fpsetmask(). While here, use the correct fp_except_t type instead of fp_rnd_t. Reported by: pkubaj, jhibbits (in IRC) Sponsored by: Tag1 Consulting, Inc. MFC after: 1 week --- lib/libc/powerpc/gen/fpsetmask.c | 6 +++--- lib/libc/powerpcspe/gen/fpsetmask.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/libc/powerpc/gen/fpsetmask.c b/lib/libc/powerpc/gen/fpsetmask.c index 4d63552470be..f5d52eec5482 100644 --- a/lib/libc/powerpc/gen/fpsetmask.c +++ b/lib/libc/powerpc/gen/fpsetmask.c @@ -43,11 +43,11 @@ fp_except_t fpsetmask(fp_except_t mask) { u_int64_t fpscr; - fp_rnd_t old; + fp_except_t old; __asm__("mffs %0" : "=f"(fpscr)); - old = (fp_rnd_t)((fpscr >> 3) & 0x1f); - fpscr = (fpscr & 0xffffff07) | (mask << 3); + old = (fp_except_t)((fpscr >> 3) & 0x1f); + fpscr = (fpscr & 0xffffff07) | ((mask & 0x1f) << 3); __asm__ __volatile("mtfsf 0xff,%0" :: "f"(fpscr)); return (old); } diff --git a/lib/libc/powerpcspe/gen/fpsetmask.c b/lib/libc/powerpcspe/gen/fpsetmask.c index e71b822d6e0b..2f48802d9ca3 100644 --- a/lib/libc/powerpcspe/gen/fpsetmask.c +++ b/lib/libc/powerpcspe/gen/fpsetmask.c @@ -42,11 +42,11 @@ fp_except_t fpsetmask(fp_except_t mask) { uint32_t fpscr; - fp_rnd_t old; + fp_except_t old; __asm__ __volatile("mfspr %0, %1" : "=r"(fpscr) : "K"(SPR_SPEFSCR)); - old = (fp_rnd_t)((fpscr >> 2) & 0x1f); - fpscr = (fpscr & 0xffffff83) | (mask << 2); + old = (fp_except_t)((fpscr >> 2) & 0x1f); + fpscr = (fpscr & 0xffffff83) | ((mask & 0x1f) << 2); __asm__ __volatile("mtspr %1,%0;isync" :: "r"(fpscr), "K"(SPR_SPEFSCR)); return (old); } From owner-dev-commits-src-main@freebsd.org Mon Mar 1 07:34:54 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7A0C6552376; Mon, 1 Mar 2021 07:34:54 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DpsV55sfnz3PSq; Mon, 1 Mar 2021 07:34:53 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-lj1-x22a.google.com with SMTP id q14so18244727ljp.4; Sun, 28 Feb 2021 23:34:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=0j3oUbPY6lEuDtrnknmgOjzQUowDg7yGzx4s2EVYHBo=; b=KgP6JXrkPXsvO8AFKzaP7G5MnG6j11ZHN2fj+4w+eW9qE+AUT3OvaEPovWKg9Ms8wf Wm686Yi4JB204BujjhhQLE8gM48EBz3z7cD1HZ5aW2Mc9IZFEbweg/lxwgTU0J8nff1J w0Eq21wxLrbKBnWwhiXDFtkEZAqd+rkWfw4hfUwAbnTjWAtLuEobenc1eflEo4AJ/we1 k4jPEJMVIWA5p65oFXN23JxQRccUhNW/LpEFO2Wa512x17RtwGiqswzlFsrD7zFyTAz6 GIX3dyVbHGvBYR50xMHhyMG1KfFKQM2iVUgNQXeNBK+f41gAUdIQFOHX5RVMPQb/iZwv p6Sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=0j3oUbPY6lEuDtrnknmgOjzQUowDg7yGzx4s2EVYHBo=; b=oCLzM3gDlFiTtSDWv4h8534bXpHitQn5ENj1vl0IO1t/I9RDmHJO9NLlfaTMU7wNzU CGSq/ld0n31uHZLq6o3UM4I0uup6HKMytgHut+Ho2yiPEYYayqOkOds//xoiGbfAcEVK CAqwV3Wzq6bEfgXjKZsZhwXOrWDuHyBOg3daOXFFdI8FKFVQ2rXA6dW63mSota46JcI5 s6ap63xW+BdYGcNj870igVqprTdNnkxMp5H7hP7ROb17kMZF+zwBT8kQcqLhlTB4B/EC T8C0WeUCUX5v+ZG6ptnXe4WpP6wPT3CmPBaVYKPN32GWzNjq5Fte/ks7W4V2rxfVxHWC uiZA== X-Gm-Message-State: AOAM531yro0ubVFe7CXUeNChsCC93Ih3a0gk9WYVL0FvuIddQ2YWc7E5 vaXx/mrQ+sY5/ldM4Kgc0mzacXDFxXSnutJ9Ca8fXkltyms= X-Google-Smtp-Source: ABdhPJxM9ZVRLB7dGk4+9xBc9lTkG2cq51Dig06Lw8gXed2qdIxNNa6eyOAXAlF+hMsVOGllUZhaFpjpK3bmtwSOM90= X-Received: by 2002:a2e:a58d:: with SMTP id m13mr8522064ljp.347.1614584092075; Sun, 28 Feb 2021 23:34:52 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a2e:958d:0:0:0:0:0 with HTTP; Sun, 28 Feb 2021 23:34:51 -0800 (PST) In-Reply-To: <202102232010.11NKAMFt014918@gitrepo.freebsd.org> References: <202102232010.11NKAMFt014918@gitrepo.freebsd.org> From: Mateusz Guzik Date: Mon, 1 Mar 2021 08:34:51 +0100 Message-ID: Subject: Re: git: cf97d2a1dab8 - main - Build lib/msun tests with compiler builtins disabled To: Dimitry Andric Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4DpsV55sfnz3PSq X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=KgP6JXrk; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of mjguzik@gmail.com designates 2a00:1450:4864:20::22a as permitted sender) smtp.mailfrom=mjguzik@gmail.com X-Spamd-Result: default: False [-4.00 / 15.00]; ARC_NA(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[2a00:1450:4864:20::22a:from]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; TO_DN_SOME(0.00)[]; SPAMHAUS_ZRD(0.00)[2a00:1450:4864:20::22a:from:127.0.2.255]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::22a:from]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[dev-commits-src-all,dev-commits-src-main]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2021 07:34:54 -0000 This breaks riscv: ld: error: undefined symbol: fabs >>> referenced by t_acos.c:93 (/usr/src/contrib/netbsd-tests/lib/libm/t_acos.c:93) >>> t_acos.o:(atfu_acos_is_plus_zero_body) >>> referenced by t_acos.c:94 (/usr/src/contrib/netbsd-tests/lib/libm/t_acos.c:94) >>> t_acos.o:(atfu_acos_is_plus_zero_body) >>> did you mean: cabs >>> defined in: /usr/obj/usr/src/riscv.riscv64sf/tmp/usr/lib/libm.so On 2/23/21, Dimitry Andric wrote: > The branch main has been updated by dim: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=cf97d2a1dab8f2cddc4466fe64d37818339c73be > > commit cf97d2a1dab8f2cddc4466fe64d37818339c73be > Author: Dimitry Andric > AuthorDate: 2021-02-23 20:03:32 +0000 > Commit: Dimitry Andric > CommitDate: 2021-02-23 20:10:01 +0000 > > Build lib/msun tests with compiler builtins disabled > > This forces the compiler to emit calls to libm functions, instead of > possibly substituting pre-calculated results at compile time, which > should help to actually test those functions. > > Reviewed by: emaste, arichardson, ngie > Differential Revision: https://reviews.freebsd.org/D28577 > MFC after: 3 days > --- > lib/msun/tests/Makefile | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/lib/msun/tests/Makefile b/lib/msun/tests/Makefile > index d58333271e9b..85a558bb0733 100644 > --- a/lib/msun/tests/Makefile > +++ b/lib/msun/tests/Makefile > @@ -19,6 +19,10 @@ CFLAGS+= -I${TESTSRC:H}/libc/gen > CFLAGS+= -D__HAVE_LONG_DOUBLE > .endif > > +# Avoid builtins, to force the compiler to emit calls to the libm > +# functions, and not calculate any results in advance. > +CFLAGS+= -fno-builtin > + > NETBSD_ATF_TESTS_C= acos_test > NETBSD_ATF_TESTS_C+= asin_test > NETBSD_ATF_TESTS_C+= atan_test > -- Mateusz Guzik From owner-dev-commits-src-main@freebsd.org Mon Mar 1 07:43:59 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C3BAE552F96; Mon, 1 Mar 2021 07:43:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dpshb59w6z3QZ1; Mon, 1 Mar 2021 07:43:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A48C41FEE0; Mon, 1 Mar 2021 07:43:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1217hxXp038575; Mon, 1 Mar 2021 07:43:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1217hxVH038574; Mon, 1 Mar 2021 07:43:59 GMT (envelope-from git) Date: Mon, 1 Mar 2021 07:43:59 GMT Message-Id: <202103010743.1217hxVH038574@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 2c1c1255e41a - main - kcsan: add atomic_interrupt_fence MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2c1c1255e41ac3fecd79f9f704c934642f34fd60 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2021 07:43:59 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=2c1c1255e41ac3fecd79f9f704c934642f34fd60 commit 2c1c1255e41ac3fecd79f9f704c934642f34fd60 Author: Mateusz Guzik AuthorDate: 2021-03-01 07:42:15 +0000 Commit: Mateusz Guzik CommitDate: 2021-03-01 07:43:27 +0000 kcsan: add atomic_interrupt_fence Unbreaks building GENERIC-KCSAN. --- sys/sys/_cscan_atomic.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/sys/_cscan_atomic.h b/sys/sys/_cscan_atomic.h index aed96580e1e4..b458c24841bf 100644 --- a/sys/sys/_cscan_atomic.h +++ b/sys/sys/_cscan_atomic.h @@ -373,6 +373,7 @@ void kcsan_atomic_thread_fence_seq_cst(void); #define atomic_thread_fence_acq_rel kcsan_atomic_thread_fence_acq_rel #define atomic_thread_fence_rel kcsan_atomic_thread_fence_rel #define atomic_thread_fence_seq_cst kcsan_atomic_thread_fence_seq_cst +#define atomic_interrupt_fence __compiler_membar #endif /* !KCSAN_RUNTIME */ From owner-dev-commits-src-main@freebsd.org Mon Mar 1 10:34:38 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3925E55787E; Mon, 1 Mar 2021 10:34:38 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DpxTV15DNz3rZ9; Mon, 1 Mar 2021 10:34:38 +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 "R3" (verified OK)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id F25D53152B; Mon, 1 Mar 2021 10:34:37 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:470:7a58::5d25:8d0f:9793:2693] (unknown [IPv6:2001:470:7a58:0:5d25:8d0f:9793:2693]) (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 E50585AE22; Mon, 1 Mar 2021 11:34:35 +0100 (CET) From: Dimitry Andric Message-Id: Content-Type: multipart/signed; boundary="Apple-Mail=_B55500EF-8766-40D8-9872-35C64F09EE34"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.17\)) Subject: Re: git: cf97d2a1dab8 - main - Build lib/msun tests with compiler builtins disabled Date: Mon, 1 Mar 2021 11:34:25 +0100 In-Reply-To: Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org To: Mateusz Guzik References: <202102232010.11NKAMFt014918@gitrepo.freebsd.org> X-Mailer: Apple Mail (2.3445.104.17) X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2021 10:34:38 -0000 --Apple-Mail=_B55500EF-8766-40D8-9872-35C64F09EE34 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 1 Mar 2021, at 08:34, Mateusz Guzik wrote: >=20 > This breaks riscv: >=20 > ld: error: undefined symbol: fabs >>>> referenced by t_acos.c:93 = (/usr/src/contrib/netbsd-tests/lib/libm/t_acos.c:93) = >>> = t_acos.o:(atfu_acos_is_plus_zero_body) >>>> referenced by t_acos.c:94 = (/usr/src/contrib/netbsd-tests/lib/libm/t_acos.c:94) = >>> = t_acos.o:(atfu_acos_is_plus_zero_body) >>>> did you mean: cabs = >>> = defined in: /usr/obj/usr/src/riscv.riscv64sf/tmp/usr/lib/libm.so >=20 >=20 > On 2/23/21, Dimitry Andric wrote: >> The branch main has been updated by dim: >>=20 >> URL: >> = https://cgit.FreeBSD.org/src/commit/?id=3Dcf97d2a1dab8f2cddc4466fe64d37818= 339c73be >>=20 >> commit cf97d2a1dab8f2cddc4466fe64d37818339c73be >> Author: Dimitry Andric >> AuthorDate: 2021-02-23 20:03:32 +0000 >> Commit: Dimitry Andric >> CommitDate: 2021-02-23 20:10:01 +0000 >>=20 >> Build lib/msun tests with compiler builtins disabled Hm, there isn't any reference machine for riscv, so any ideas on how to figure out whether fabs() is being built or not being built for riscv? I don't see anything in lib/msun/Makefile that would exclude it. -Dimitry --Apple-Mail=_B55500EF-8766-40D8-9872-35C64F09EE34 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 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCYDzDMQAKCRCwXqMKLiCW o5nyAJ9bFY8qEARQxUNeEmnMwDsURs3DWwCgrzEQqvEzd+jyz/e0yee41Ij02g0= =g3tz -----END PGP SIGNATURE----- --Apple-Mail=_B55500EF-8766-40D8-9872-35C64F09EE34-- From owner-dev-commits-src-main@freebsd.org Mon Mar 1 10:35:44 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 42425557E1A; Mon, 1 Mar 2021 10:35:44 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-lj1-x234.google.com (mail-lj1-x234.google.com [IPv6:2a00:1450:4864:20::234]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DpxVm1Gs4z3rdv; Mon, 1 Mar 2021 10:35:43 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-lj1-x234.google.com with SMTP id r25so17815902ljk.11; Mon, 01 Mar 2021 02:35:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=wIH0uXqxGQirevpdymqhgCM8buLIBtU9yyiUAdcR7PE=; b=JD+HXyHJvPtfI2lwax9yDUDS9qRUJdSnAYBqxNZOlovF8L75WKG/+6jFFeSWI/ZfET 4rcM/kuf64q/VYgJe+TE7A2Z4xgLPIb5q3t4dDbxnRPTr/C+mSf+2HWkwSWcR/MEz7pV aOnHrQs8WbTeI7tQAFqGVnyOMzaMY9U/SydLzr7TBi8ULNhH/g6L8eSPjhvkKaH6Tq29 dVod9azU+0YGZRByjmJkm7Fu+oKu1xdy4adAhw8ykZPfUlvWSIdY1QlMMYLlhVTxdb/A v0Rq1oAuaWje3yyvFEWuG/z51iL6IknflXwRwkHRkJ05Y1a32G1I2auiWSSO7p+ttYMe wmsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=wIH0uXqxGQirevpdymqhgCM8buLIBtU9yyiUAdcR7PE=; b=JE6CHNZCzvuxSVAKbX9Vee/G+lPhxfHHao09Yq0fGAMYmQTGKJGvI2WciKmD2YzhxX al9VqvbT099B15rg9ISpKE9VJS/oRXWaXQ/+uPBZGGfK6vfNVIqiBC/B9Ex9BXywePhG bUBkJHN01SaV9AS+SVO0JcUw7Y4EcRNdJsX78H4t6m9hUyYCfHbvYGwZSTvFyJfbgGsw QPooIZLJstkmcgesJzAO/sEvwm+QIsyUoRUgZxJpR+zeVkK/gYojS9QLHg1ohwOQKs3m UVamUs6FfcVtFc0MAg1VvGeTkLqTsYlMhsNxlKMZHCQzutbGqPiW0Y7y+3F7kSkK+xaU eirw== X-Gm-Message-State: AOAM533DIU4WprCrowOR9XLj2ea52MHzl3nzpqNCfkCe1u1DvfPcKgbM vVrv1fbhCvz8B84+waJu8cKlERDiF7DCrmei+e4tykeOQVo= X-Google-Smtp-Source: ABdhPJxIDN/wK3Qs0JLTbdtm14HMbf9q5BtdptiIQ7VDnneIlPySWA1oNGtlIGh36UpBPNuREnWDjJBkz8NoclOIYto= X-Received: by 2002:a2e:534a:: with SMTP id t10mr9012357ljd.499.1614594942267; Mon, 01 Mar 2021 02:35:42 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a2e:958d:0:0:0:0:0 with HTTP; Mon, 1 Mar 2021 02:35:41 -0800 (PST) In-Reply-To: References: <202102232010.11NKAMFt014918@gitrepo.freebsd.org> From: Mateusz Guzik Date: Mon, 1 Mar 2021 11:35:41 +0100 Message-ID: Subject: Re: git: cf97d2a1dab8 - main - Build lib/msun tests with compiler builtins disabled To: Dimitry Andric Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4DpxVm1Gs4z3rdv X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2021 10:35:44 -0000 You can crossbuild with TARGET_ARCH=riscv64sf On 3/1/21, Dimitry Andric wrote: > On 1 Mar 2021, at 08:34, Mateusz Guzik wrote: >> >> This breaks riscv: >> >> ld: error: undefined symbol: fabs >>>>> referenced by t_acos.c:93 >>>>> (/usr/src/contrib/netbsd-tests/lib/libm/t_acos.c:93) >>>>> >>> >>>>> t_acos.o:(atfu_acos_is_plus_zero_body) >>>>> referenced by t_acos.c:94 >>>>> (/usr/src/contrib/netbsd-tests/lib/libm/t_acos.c:94) >>>>> >>> >>>>> t_acos.o:(atfu_acos_is_plus_zero_body) >>>>> did you mean: cabs >>>>> >>> defined >>>>> in: /usr/obj/usr/src/riscv.riscv64sf/tmp/usr/lib/libm.so >> >> >> On 2/23/21, Dimitry Andric wrote: >>> The branch main has been updated by dim: >>> >>> URL: >>> https://cgit.FreeBSD.org/src/commit/?id=cf97d2a1dab8f2cddc4466fe64d37818339c73be >>> >>> commit cf97d2a1dab8f2cddc4466fe64d37818339c73be >>> Author: Dimitry Andric >>> AuthorDate: 2021-02-23 20:03:32 +0000 >>> Commit: Dimitry Andric >>> CommitDate: 2021-02-23 20:10:01 +0000 >>> >>> Build lib/msun tests with compiler builtins disabled > > Hm, there isn't any reference machine for riscv, so any ideas on how to > figure out whether fabs() is being built or not being built for riscv? > I don't see anything in lib/msun/Makefile that would exclude it. > > -Dimitry > > -- Mateusz Guzik From owner-dev-commits-src-main@freebsd.org Mon Mar 1 12:33:18 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DC1B155C0DC; Mon, 1 Mar 2021 12:33:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dq06Q5rw4z4Sxt; Mon, 1 Mar 2021 12:33:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BBD4923A0A; Mon, 1 Mar 2021 12:33:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 121CXIHZ020733; Mon, 1 Mar 2021 12:33:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 121CXI7Q020732; Mon, 1 Mar 2021 12:33:18 GMT (envelope-from git) Date: Mon, 1 Mar 2021 12:33:18 GMT Message-Id: <202103011233.121CXI7Q020732@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Roger Pau Monné Subject: git: a2c0e94ccfaf - main - xen: remove x86-ism from Xen common code MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: royger X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a2c0e94ccfafc6a873fc6acbaccee8a14f968acf Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2021 12:33:18 -0000 The branch main has been updated by royger: URL: https://cgit.FreeBSD.org/src/commit/?id=a2c0e94ccfafc6a873fc6acbaccee8a14f968acf commit a2c0e94ccfafc6a873fc6acbaccee8a14f968acf Author: Elliott Mitchell AuthorDate: 2021-03-01 11:44:54 +0000 Commit: Roger Pau Monné CommitDate: 2021-03-01 12:33:01 +0000 xen: remove x86-ism from Xen common code PAT_WRITE_BACK is x86-only, whereas sys/dev/xen could be shared between multiple architectures. Reviewed by: royger Differential Revision: https://reviews.freebsd.org/D28831 --- sys/dev/xen/console/xen_console.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/xen/console/xen_console.c b/sys/dev/xen/console/xen_console.c index 8e366bba2319..7eed30885e6b 100644 --- a/sys/dev/xen/console/xen_console.c +++ b/sys/dev/xen/console/xen_console.c @@ -273,7 +273,7 @@ static void xencons_early_init_ring(struct xencons_priv *cons) { cons->intf = pmap_mapdev_attr(ptoa(xen_get_console_mfn()), PAGE_SIZE, - PAT_WRITE_BACK); + VM_MEMATTR_WRITE_BACK); cons->evtchn = xen_get_console_evtchn(); } From owner-dev-commits-src-main@freebsd.org Mon Mar 1 12:55:57 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AAAF055C544; Mon, 1 Mar 2021 12:55:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dq0cY4VRFz4VPt; Mon, 1 Mar 2021 12:55:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8CBFF23F4A; Mon, 1 Mar 2021 12:55:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 121CtvgZ046984; Mon, 1 Mar 2021 12:55:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 121CtvCc046983; Mon, 1 Mar 2021 12:55:57 GMT (envelope-from git) Date: Mon, 1 Mar 2021 12:55:57 GMT Message-Id: <202103011255.121CtvCc046983@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: 98202829d1b3 - main - tests/sys/netpfil/pf: Add missing python3 requirements MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 98202829d1b3727a8706f45d052fc9e9507b562b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2021 12:55:57 -0000 The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=98202829d1b3727a8706f45d052fc9e9507b562b commit 98202829d1b3727a8706f45d052fc9e9507b562b Author: Alex Richardson AuthorDate: 2021-02-23 19:04:01 +0000 Commit: Alex Richardson CommitDate: 2021-03-01 12:53:45 +0000 tests/sys/netpfil/pf: Add missing python3 requirements This also fixes a typo in the dup test that caused the head function to not be called. On my test system without python3 the tests are now skipped instead of failing. Reviewed By: kp Differential Revision: https://reviews.freebsd.org/D28903 --- tests/sys/netpfil/pf/checksum.sh | 1 + tests/sys/netpfil/pf/dup.sh | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/sys/netpfil/pf/checksum.sh b/tests/sys/netpfil/pf/checksum.sh index 778ae1cd6e9f..836bc1233963 100644 --- a/tests/sys/netpfil/pf/checksum.sh +++ b/tests/sys/netpfil/pf/checksum.sh @@ -32,6 +32,7 @@ unaligned_head() { atf_set descr 'Test unaligned checksum updates' atf_set require.user root + atf_set require.progs scapy } unaligned_body() diff --git a/tests/sys/netpfil/pf/dup.sh b/tests/sys/netpfil/pf/dup.sh index 7b9a91804e96..3b3bef976fc2 100644 --- a/tests/sys/netpfil/pf/dup.sh +++ b/tests/sys/netpfil/pf/dup.sh @@ -30,10 +30,11 @@ common_dir=$(atf_get_srcdir)/../common atf_test_case "dup_to" "cleanup" -do_to_head() +dup_to_head() { atf_set descr 'dup-to test' atf_set require.user root + atf_set require.progs scapy } dup_to_body() From owner-dev-commits-src-main@freebsd.org Mon Mar 1 12:55:58 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D7E0C55C7B8; Mon, 1 Mar 2021 12:55:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dq0cZ5pQRz4VPy; Mon, 1 Mar 2021 12:55:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BA4D223948; Mon, 1 Mar 2021 12:55:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 121CtwAW047003; Mon, 1 Mar 2021 12:55:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 121Ctw93047002; Mon, 1 Mar 2021 12:55:58 GMT (envelope-from git) Date: Mon, 1 Mar 2021 12:55:58 GMT Message-Id: <202103011255.121Ctw93047002@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: 760b2ffc5529 - main - Update scalbn* functions to the musl versions MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 760b2ffc552985017c5bc74fb9966d4dc1b5b691 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2021 12:55:58 -0000 The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=760b2ffc552985017c5bc74fb9966d4dc1b5b691 commit 760b2ffc552985017c5bc74fb9966d4dc1b5b691 Author: Alex Richardson AuthorDate: 2021-02-24 16:56:53 +0000 Commit: Alex Richardson CommitDate: 2021-03-01 12:53:45 +0000 Update scalbn* functions to the musl versions The only diff compared to musl is a minor change to scalbnl() to replace musl's union ldshape with union IEEEl2bits. This fixes the scalbn tests on non-x86 (since x86 has an assembly version that is used instead). Musl commit messages: commit 8c44a060243f04283ca68dad199aab90336141db Author: Szabolcs Nagy Date: Mon Apr 3 02:38:13 2017 +0200 fix scalbn when result is in the subnormal range in nearest rounding mode scalbn could introduce double rounding error when an intermediate value and the final result were both in the subnormal range e.g. scalbn(0x1.7ffffffffffffp-1, -1073) returned 0x1p-1073 instead of 0x1p-1074, because the intermediate computation got rounded to 0x1.8p-1023. with the fix an intermediate value can only be in the subnormal range if the final result is 0 which is correct even after double rounding. (there still can be two roundings so signals may be raised twice, but that's only observable with trapping exceptions which is not supported.) commit 2eaed464e2080d8321d3903b71086a1ecfc4ee4a Author: Szabolcs Nagy Date: Wed Sep 4 15:52:54 2013 +0000 math: use float_t and double_t in scalbnf and scalbn remove STRICT_ASSIGN (c99 semantics is assumed) and use the conventional union to prepare the scaling factor (so libm.h is no longer needed) commit 1b77b9072f374bd26eb0574b83a0d5f18d75ec60 Author: Szabolcs Nagy Date: Thu Aug 15 10:07:46 2013 +0000 math: minor scalbn*.c simplification commit c4359e01303da2755fe7e8033826b132eb3659b1 Author: Szabolcs Nagy Date: Tue Nov 13 10:55:35 2012 +0100 math: excess precision fix modf, modff, scalbn, scalbnf old code was correct only if the result was stored (without the excess precision) or musl was compiled with -ffloat-store. now we use STRICT_ASSIGN to work around the issue. (see note 160 in c11 section 6.8.6.4) commit 666271c105e4137bdfa195e217799d74143370d4 Author: Szabolcs Nagy Date: Tue Nov 13 10:30:40 2012 +0100 math: fix scalbn and scalbnf on overflow/underflow old code was correct only if the result was stored (without the excess precision) or musl was compiled with -ffloat-store. (see note 160 in n1570.pdf section 6.8.6.4) commit 8051e08e10d2b739fcfcbc6bc7466e8d77fa49f1 Author: nsz Date: Mon Mar 19 10:54:07 2012 +0100 simplify scalbn*.c implementations The old scalbn.c was wrong and slow, the new one is just slow. (scalbn(0x1p+1023,-2097) should give 0x1p-1074, but the old code gave 0) Reviewed By: dim Differential Revision: https://reviews.freebsd.org/D28872 --- lib/msun/src/s_scalbn.c | 86 +++++++++++++++----------------------------- lib/msun/src/s_scalbnf.c | 78 ++++++++++++++-------------------------- lib/msun/src/s_scalbnl.c | 92 ++++++++++++++++++------------------------------ 3 files changed, 90 insertions(+), 166 deletions(-) diff --git a/lib/msun/src/s_scalbn.c b/lib/msun/src/s_scalbn.c index b048b0596b67..219cd8f0c989 100644 --- a/lib/msun/src/s_scalbn.c +++ b/lib/msun/src/s_scalbn.c @@ -1,63 +1,35 @@ -/* @(#)s_scalbn.c 5.1 93/09/24 */ -/* - * ==================================================== - * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - * - * Developed at SunPro, a Sun Microsystems, Inc. business. - * Permission to use, copy, modify, and distribute this - * software is freely granted, provided that this notice - * is preserved. - * ==================================================== - */ +#include +#include -#include -__FBSDID("$FreeBSD$"); - -/* - * scalbn (double x, int n) - * scalbn(x,n) returns x* 2**n computed by exponent - * manipulation rather than by actually performing an - * exponentiation or a multiplication. - */ - -#include - -#include "math.h" -#include "math_private.h" - -static const double -two54 = 1.80143985094819840000e+16, /* 0x43500000, 0x00000000 */ -twom54 = 5.55111512312578270212e-17, /* 0x3C900000, 0x00000000 */ -huge = 1.0e+300, -tiny = 1.0e-300; - -double -scalbn (double x, int n) +double scalbn(double x, int n) { - int32_t k,hx,lx; - EXTRACT_WORDS(hx,lx,x); - k = (hx&0x7ff00000)>>20; /* extract exponent */ - if (k==0) { /* 0 or subnormal x */ - if ((lx|(hx&0x7fffffff))==0) return x; /* +-0 */ - x *= two54; - GET_HIGH_WORD(hx,x); - k = ((hx&0x7ff00000)>>20) - 54; - if (n< -50000) return tiny*x; /*underflow*/ - } - if (k==0x7ff) return x+x; /* NaN or Inf */ - k = k+n; - if (k > 0x7fe) return huge*copysign(huge,x); /* overflow */ - if (k > 0) /* normal result */ - {SET_HIGH_WORD(x,(hx&0x800fffff)|(k<<20)); return x;} - if (k <= -54) { - if (n > 50000) /* in case integer overflow in n+k */ - return huge*copysign(huge,x); /*overflow*/ - else - return tiny*copysign(tiny,x); /*underflow*/ + union {double f; uint64_t i;} u; + double_t y = x; + + if (n > 1023) { + y *= 0x1p1023; + n -= 1023; + if (n > 1023) { + y *= 0x1p1023; + n -= 1023; + if (n > 1023) + n = 1023; + } + } else if (n < -1022) { + /* make sure final n < -53 to avoid double + rounding in the subnormal range */ + y *= 0x1p-1022 * 0x1p53; + n += 1022 - 53; + if (n < -1022) { + y *= 0x1p-1022 * 0x1p53; + n += 1022 - 53; + if (n < -1022) + n = -1022; + } } - k += 54; /* subnormal result */ - SET_HIGH_WORD(x,(hx&0x800fffff)|(k<<20)); - return x*twom54; + u.i = (uint64_t)(0x3ff+n)<<52; + x = y * u.f; + return x; } #if (LDBL_MANT_DIG == 53) diff --git a/lib/msun/src/s_scalbnf.c b/lib/msun/src/s_scalbnf.c index 21d001c1faf1..3a46470b5661 100644 --- a/lib/msun/src/s_scalbnf.c +++ b/lib/msun/src/s_scalbnf.c @@ -1,57 +1,33 @@ -/* s_scalbnf.c -- float version of s_scalbn.c. - * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com. - */ +#include +#include -/* - * ==================================================== - * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - * - * Developed at SunPro, a Sun Microsystems, Inc. business. - * Permission to use, copy, modify, and distribute this - * software is freely granted, provided that this notice - * is preserved. - * ==================================================== - */ - -#include -__FBSDID("$FreeBSD$"); - -#include "math.h" -#include "math_private.h" - -static const float -two25 = 3.355443200e+07, /* 0x4c000000 */ -twom25 = 2.9802322388e-08, /* 0x33000000 */ -huge = 1.0e+30, -tiny = 1.0e-30; - -float -scalbnf (float x, int n) +float scalbnf(float x, int n) { - int32_t k,ix; - GET_FLOAT_WORD(ix,x); - k = (ix&0x7f800000)>>23; /* extract exponent */ - if (k==0) { /* 0 or subnormal x */ - if ((ix&0x7fffffff)==0) return x; /* +-0 */ - x *= two25; - GET_FLOAT_WORD(ix,x); - k = ((ix&0x7f800000)>>23) - 25; - if (n< -50000) return tiny*x; /*underflow*/ - } - if (k==0xff) return x+x; /* NaN or Inf */ - k = k+n; - if (k > 0xfe) return huge*copysignf(huge,x); /* overflow */ - if (k > 0) /* normal result */ - {SET_FLOAT_WORD(x,(ix&0x807fffff)|(k<<23)); return x;} - if (k <= -25) { - if (n > 50000) /* in case integer overflow in n+k */ - return huge*copysignf(huge,x); /*overflow*/ - else - return tiny*copysignf(tiny,x); /*underflow*/ + union {float f; uint32_t i;} u; + float_t y = x; + + if (n > 127) { + y *= 0x1p127f; + n -= 127; + if (n > 127) { + y *= 0x1p127f; + n -= 127; + if (n > 127) + n = 127; + } + } else if (n < -126) { + y *= 0x1p-126f * 0x1p24f; + n += 126 - 24; + if (n < -126) { + y *= 0x1p-126f * 0x1p24f; + n += 126 - 24; + if (n < -126) + n = -126; + } } - k += 25; /* subnormal result */ - SET_FLOAT_WORD(x,(ix&0x807fffff)|(k<<23)); - return x*twom25; + u.i = (uint32_t)(0x7f+n)<<23; + x = y * u.f; + return x; } __strong_reference(scalbnf, ldexpf); diff --git a/lib/msun/src/s_scalbnl.c b/lib/msun/src/s_scalbnl.c index 28b0cf9b7294..65a9415b0d21 100644 --- a/lib/msun/src/s_scalbnl.c +++ b/lib/msun/src/s_scalbnl.c @@ -1,18 +1,7 @@ -/* @(#)s_scalbn.c 5.1 93/09/24 */ -/* - * ==================================================== - * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - * - * Developed at SunPro, a Sun Microsystems, Inc. business. - * Permission to use, copy, modify, and distribute this - * software is freely granted, provided that this notice - * is preserved. - * ==================================================== - */ - -#include -__FBSDID("$FreeBSD$"); - +#include +#include +#include "math_private.h" +#include "fpmath.h" /* * scalbnl (long double x, int n) * scalbnl(x,n) returns x* 2**n computed by exponent @@ -20,52 +9,39 @@ __FBSDID("$FreeBSD$"); * exponentiation or a multiplication. */ -/* - * We assume that a long double has a 15-bit exponent. On systems - * where long double is the same as double, scalbnl() is an alias - * for scalbn(), so we don't use this routine. - */ - -#include -#include - -#include "fpmath.h" - -#if LDBL_MAX_EXP != 0x4000 -#error "Unsupported long double format" -#endif - -static const long double -huge = 0x1p16000L, -tiny = 0x1p-16000L; - -long double -scalbnl (long double x, int n) +#if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024 +long double scalbnl(long double x, int n) +{ + return scalbn(x, n); +} +#elif (LDBL_MANT_DIG == 64 || LDBL_MANT_DIG == 113) && LDBL_MAX_EXP == 16384 +long double scalbnl(long double x, int n) { union IEEEl2bits u; - int k; - u.e = x; - k = u.bits.exp; /* extract exponent */ - if (k==0) { /* 0 or subnormal x */ - if ((u.bits.manh|u.bits.manl)==0) return x; /* +-0 */ - u.e *= 0x1p+128; - k = u.bits.exp - 128; - if (n< -50000) return tiny*x; /*underflow*/ - } - if (k==0x7fff) return x+x; /* NaN or Inf */ - k = k+n; - if (k >= 0x7fff) return huge*copysignl(huge,x); /* overflow */ - if (k > 0) /* normal result */ - {u.bits.exp = k; return u.e;} - if (k <= -128) { - if (n > 50000) /* in case integer overflow in n+k */ - return huge*copysign(huge,x); /*overflow*/ - else - return tiny*copysign(tiny,x); /*underflow*/ + + if (n > 16383) { + x *= 0x1p16383L; + n -= 16383; + if (n > 16383) { + x *= 0x1p16383L; + n -= 16383; + if (n > 16383) + n = 16383; + } + } else if (n < -16382) { + x *= 0x1p-16382L * 0x1p113L; + n += 16382 - 113; + if (n < -16382) { + x *= 0x1p-16382L * 0x1p113L; + n += 16382 - 113; + if (n < -16382) + n = -16382; + } } - k += 128; /* subnormal result */ - u.bits.exp = k; - return u.e*0x1p-128; + u.e = 1.0; + u.xbits.expsign = 0x3fff + n; + return x * u.e; } +#endif __strong_reference(scalbnl, ldexpl); From owner-dev-commits-src-main@freebsd.org Mon Mar 1 12:56:00 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 657FF55C176; Mon, 1 Mar 2021 12:56:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dq0cc0TZMz4VVf; Mon, 1 Mar 2021 12:56:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E6CF323F4B; Mon, 1 Mar 2021 12:55:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 121CtxC0047025; Mon, 1 Mar 2021 12:55:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 121CtxZo047024; Mon, 1 Mar 2021 12:55:59 GMT (envelope-from git) Date: Mon, 1 Mar 2021 12:55:59 GMT Message-Id: <202103011255.121CtxZo047024@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: aac21e66f94e - main - Also use the musl scalbn code for ldexp() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aac21e66f94e0a8ad52c1f8cd8dce50fcdd35cca Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2021 12:56:00 -0000 The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=aac21e66f94e0a8ad52c1f8cd8dce50fcdd35cca commit aac21e66f94e0a8ad52c1f8cd8dce50fcdd35cca Author: Alex Richardson AuthorDate: 2021-02-25 14:29:44 +0000 Commit: Alex Richardson CommitDate: 2021-03-01 12:53:46 +0000 Also use the musl scalbn code for ldexp() Instead of copying the code as 00646ca2047305fce32d99edc7a8e6dfd801f3b4 did, include the implementation with the function name re-defined. --- lib/libc/gen/ldexp.c | 126 +++------------------------------------------------ 1 file changed, 6 insertions(+), 120 deletions(-) diff --git a/lib/libc/gen/ldexp.c b/lib/libc/gen/ldexp.c index 887f673ee9a5..878271576313 100644 --- a/lib/libc/gen/ldexp.c +++ b/lib/libc/gen/ldexp.c @@ -1,123 +1,9 @@ -/* @(#)s_scalbn.c 5.1 93/09/24 */ -/* @(#)fdlibm.h 5.1 93/09/24 */ -/* - * ==================================================== - * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - * - * Developed at SunPro, a Sun Microsystems, Inc. business. - * Permission to use, copy, modify, and distribute this - * software is freely granted, provided that this notice - * is preserved. - * ==================================================== - */ - #include __FBSDID("$FreeBSD$"); -#include -#include -#include - -/* Bit fiddling routines copied from msun/src/math_private.h,v 1.15 */ - -#if BYTE_ORDER == BIG_ENDIAN - -typedef union -{ - double value; - struct - { - u_int32_t msw; - u_int32_t lsw; - } parts; -} ieee_double_shape_type; - -#endif - -#if BYTE_ORDER == LITTLE_ENDIAN - -typedef union -{ - double value; - struct - { - u_int32_t lsw; - u_int32_t msw; - } parts; -} ieee_double_shape_type; - -#endif - -/* Get two 32 bit ints from a double. */ - -#define EXTRACT_WORDS(ix0,ix1,d) \ -do { \ - ieee_double_shape_type ew_u; \ - ew_u.value = (d); \ - (ix0) = ew_u.parts.msw; \ - (ix1) = ew_u.parts.lsw; \ -} while (0) - -/* Get the more significant 32 bit int from a double. */ - -#define GET_HIGH_WORD(i,d) \ -do { \ - ieee_double_shape_type gh_u; \ - gh_u.value = (d); \ - (i) = gh_u.parts.msw; \ -} while (0) - -/* Set the more significant 32 bits of a double from an int. */ - -#define SET_HIGH_WORD(d,v) \ -do { \ - ieee_double_shape_type sh_u; \ - sh_u.value = (d); \ - sh_u.parts.msw = (v); \ - (d) = sh_u.value; \ -} while (0) - - -static const double -two54 = 1.80143985094819840000e+16, /* 0x43500000, 0x00000000 */ -twom54 = 5.55111512312578270212e-17, /* 0x3C900000, 0x00000000 */ -huge = 1.0e+300, -tiny = 1.0e-300; - -static double -_copysign(double x, double y) -{ - u_int32_t hx,hy; - GET_HIGH_WORD(hx,x); - GET_HIGH_WORD(hy,y); - SET_HIGH_WORD(x,(hx&0x7fffffff)|(hy&0x80000000)); - return x; -} - -double -ldexp(double x, int n) -{ - int32_t k,hx,lx; - EXTRACT_WORDS(hx,lx,x); - k = (hx&0x7ff00000)>>20; /* extract exponent */ - if (k==0) { /* 0 or subnormal x */ - if ((lx|(hx&0x7fffffff))==0) return x; /* +-0 */ - x *= two54; - GET_HIGH_WORD(hx,x); - k = ((hx&0x7ff00000)>>20) - 54; - if (n< -50000) return tiny*x; /*underflow*/ - } - if (k==0x7ff) return x+x; /* NaN or Inf */ - k = k+n; - if (k > 0x7fe) return huge*_copysign(huge,x); /* overflow */ - if (k > 0) /* normal result */ - {SET_HIGH_WORD(x,(hx&0x800fffff)|(k<<20)); return x;} - if (k <= -54) { - if (n > 50000) /* in case integer overflow in n+k */ - return huge*_copysign(huge,x); /*overflow*/ - else return tiny*_copysign(tiny,x); /*underflow*/ - } - k += 54; /* subnormal result */ - SET_HIGH_WORD(x,(hx&0x800fffff)|(k<<20)); - return x*twom54; -} +/* + * ldexp() and scalbn() are defined to be identical, but ldexp() lives in libc + * for backwards compatibility. + */ +#define scalbn ldexp +#include "../../msun/src/s_scalbn.c" From owner-dev-commits-src-main@freebsd.org Mon Mar 1 12:56:02 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DC98255C7C0; Mon, 1 Mar 2021 12:56:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dq0cd41lBz4V7X; Mon, 1 Mar 2021 12:56:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2A56B23E27; Mon, 1 Mar 2021 12:56:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 121Cu0Tw047047; Mon, 1 Mar 2021 12:56:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 121Cu0xk047046; Mon, 1 Mar 2021 12:56:00 GMT (envelope-from git) Date: Mon, 1 Mar 2021 12:56:00 GMT Message-Id: <202103011256.121Cu0xk047046@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: a26ace4db6d9 - main - tools/build/make.py: Don't call brew --prefix if --cross-bindir is set MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a26ace4db6d974215a4d882948da80eae2b3b0d4 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2021 12:56:03 -0000 The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=a26ace4db6d974215a4d882948da80eae2b3b0d4 commit a26ace4db6d974215a4d882948da80eae2b3b0d4 Author: Alex Richardson AuthorDate: 2021-02-26 17:49:03 +0000 Commit: Alex Richardson CommitDate: 2021-03-01 12:53:46 +0000 tools/build/make.py: Don't call brew --prefix if --cross-bindir is set Also updated the logic to use subprocess.run() instead of the old subprocess.getoutput() which also includes stderr and therefore can trigger an exception inside Path().exists(). Reported by: gnn --- tools/build/make.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/tools/build/make.py b/tools/build/make.py index bc6d8fb449bb..c34147f6ac21 100755 --- a/tools/build/make.py +++ b/tools/build/make.py @@ -124,9 +124,14 @@ def default_cross_toolchain(): # default to homebrew-installed clang on MacOS if available if sys.platform.startswith("darwin"): if shutil.which("brew"): - llvm_dir = subprocess.getoutput("brew --prefix llvm") - if llvm_dir and Path(llvm_dir, "bin").exists(): - return str(Path(llvm_dir, "bin")) + llvm_dir = subprocess.run(["brew", "--prefix", "llvm"], + capture_output=True).stdout.strip() + debug("Inferred LLVM dir as", llvm_dir) + try: + if llvm_dir and Path(llvm_dir.decode("utf-8"), "bin").exists(): + return str(Path(llvm_dir.decode("utf-8"), "bin")) + except OSError: + return None return None @@ -137,7 +142,7 @@ if __name__ == "__main__": help="Directory to look for cc/c++/cpp/ld to build " "host (" + sys.platform + ") binaries", default="/usr/bin") - parser.add_argument("--cross-bindir", default=default_cross_toolchain(), + parser.add_argument("--cross-bindir", default=None, help="Directory to look for cc/c++/cpp/ld to build " "target binaries (only needed if XCC/XCPP/XLD " "are not set)") @@ -165,6 +170,8 @@ if __name__ == "__main__": except ImportError: pass parsed_args, bmake_args = parser.parse_known_args() + if parsed_args.cross_bindir is None: + parsed_args.cross_bindir = default_cross_toolchain() MAKEOBJDIRPREFIX = os.getenv("MAKEOBJDIRPREFIX") if not MAKEOBJDIRPREFIX: From owner-dev-commits-src-main@freebsd.org Mon Mar 1 12:56:06 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F063E55C9F7; Mon, 1 Mar 2021 12:56:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dq0cg3L9Rz4VDJ; Mon, 1 Mar 2021 12:56:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5964823CCC; Mon, 1 Mar 2021 12:56:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 121Cu2k9047065; Mon, 1 Mar 2021 12:56:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 121Cu24D047064; Mon, 1 Mar 2021 12:56:02 GMT (envelope-from git) Date: Mon, 1 Mar 2021 12:56:02 GMT Message-Id: <202103011256.121Cu24D047064@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: 524b018d2004 - main - riscv: Add a soft-float implementation of fabs() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 524b018d200408bed5eb0d2b892db5b9fb46808b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2021 12:56:07 -0000 The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=524b018d200408bed5eb0d2b892db5b9fb46808b commit 524b018d200408bed5eb0d2b892db5b9fb46808b Author: Alex Richardson AuthorDate: 2021-03-01 12:46:30 +0000 Commit: Alex Richardson CommitDate: 2021-03-01 12:53:46 +0000 riscv: Add a soft-float implementation of fabs() We could just use a C implementation using __builtin_fabs(), but using this assembly version guarantees that there is no additional prolog/epilog code. Additionally, clang generates worse code for masking off the top bit than GCC: https://bugs.llvm.org/show_bug.cgi?id=49377. This fixes the RISCV64 softfloat world build after cf97d2a1dab8. That commit added -fno-builtin to the msun tests which resulted in the first references to fabs (previously the compiler inlined all calls). Reviewed By: dim Reported by: mjg Differential Revision: https://reviews.freebsd.org/D28994 --- lib/libc/riscv/gen/fabs.S | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/libc/riscv/gen/fabs.S b/lib/libc/riscv/gen/fabs.S index 44249252e9c1..09042af3b4c0 100644 --- a/lib/libc/riscv/gen/fabs.S +++ b/lib/libc/riscv/gen/fabs.S @@ -1,5 +1,6 @@ /*- * Copyright (c) 2015-2017 Ruslan Bukin + * Copyright (c) 2021 Alex Richardson * All rights reserved. * * Portions of this software were developed by SRI International and the @@ -10,6 +11,9 @@ * Computer Laboratory as part of the CTSRD Project, with support from the * UK Higher Education Innovation Fund (HEIF). * + * This work was supported by Innovate UK project 105694, "Digital Security + * by Design (DSbD) Technology Platform Prototype". + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -35,9 +39,12 @@ #include __FBSDID("$FreeBSD$"); -#ifdef __riscv_float_abi_double ENTRY(fabs) +#ifdef __riscv_float_abi_double fabs.d fa0, fa0 +#else + slli a0,a0,1 + srli a0,a0,1 +#endif ret END(fabs) -#endif From owner-dev-commits-src-main@freebsd.org Mon Mar 1 13:03:53 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8700D55CE61; Mon, 1 Mar 2021 13:03:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dq0nj3Ph1z4WD7; Mon, 1 Mar 2021 13:03:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 67BED23B6F; Mon, 1 Mar 2021 13:03:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 121D3rCH060456; Mon, 1 Mar 2021 13:03:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 121D3rah060455; Mon, 1 Mar 2021 13:03:53 GMT (envelope-from git) Date: Mon, 1 Mar 2021 13:03:53 GMT Message-Id: <202103011303.121D3rah060455@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michal Meloun Subject: git: ce5a4083de2d - main - pci_dw_mv: Don't enable unhandled interrupts. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mmel X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ce5a4083de2d79bc44d209c9e355a09ede47346c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2021 13:03:53 -0000 The branch main has been updated by mmel: URL: https://cgit.FreeBSD.org/src/commit/?id=ce5a4083de2d79bc44d209c9e355a09ede47346c commit ce5a4083de2d79bc44d209c9e355a09ede47346c Author: Michal Meloun AuthorDate: 2021-01-27 11:45:32 +0000 Commit: Michal Meloun CommitDate: 2021-03-01 13:03:34 +0000 pci_dw_mv: Don't enable unhandled interrupts. Mainly link errors interrupts should only be activated on fully linked port, otherwise noise on lanes can cause livelock. But we don't have error counters yet, so leave these interrupts disabled. --- sys/dev/pci/pci_dw_mv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/pci/pci_dw_mv.c b/sys/dev/pci/pci_dw_mv.c index 5d39228dd182..43f45ddef54e 100644 --- a/sys/dev/pci/pci_dw_mv.c +++ b/sys/dev/pci/pci_dw_mv.c @@ -166,8 +166,8 @@ pci_mv_init(struct pci_mv_softc *sc) /* Enable local interrupts */ pci_dw_dbi_wr4(sc->dev, DW_MSI_INTR0_MASK, 0xFFFFFFFF); - pci_dw_dbi_wr4(sc->dev, MV_INT_MASK1, 0xFFFFFFFF); - pci_dw_dbi_wr4(sc->dev, MV_INT_MASK2, 0xFFFFFFFD); + pci_dw_dbi_wr4(sc->dev, MV_INT_MASK1, 0x0001FE00); + pci_dw_dbi_wr4(sc->dev, MV_INT_MASK2, 0x00000000); pci_dw_dbi_wr4(sc->dev, MV_INT_CAUSE1, 0xFFFFFFFF); pci_dw_dbi_wr4(sc->dev, MV_INT_CAUSE2, 0xFFFFFFFF); From owner-dev-commits-src-main@freebsd.org Mon Mar 1 13:23:04 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3F11555D805; Mon, 1 Mar 2021 13:23:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dq1Cr1HL5z4XKF; Mon, 1 Mar 2021 13:23:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1F10F24246; Mon, 1 Mar 2021 13:23:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 121DN4DS086760; Mon, 1 Mar 2021 13:23:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 121DN4VO086759; Mon, 1 Mar 2021 13:23:04 GMT (envelope-from git) Date: Mon, 1 Mar 2021 13:23:04 GMT Message-Id: <202103011323.121DN4VO086759@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: e5e4845959ac - main - Makefile.inc1 "Avoid duplicate script for target" warning MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e5e4845959ac60110677df302a68c220dff75abe Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2021 13:23:04 -0000 The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=e5e4845959ac60110677df302a68c220dff75abe commit e5e4845959ac60110677df302a68c220dff75abe Author: Alex Richardson AuthorDate: 2021-03-01 13:20:32 +0000 Commit: Alex Richardson CommitDate: 2021-03-01 13:22:15 +0000 Makefile.inc1 "Avoid duplicate script for target" warning This happens if -DBOOTSTRAP_ALL_TOOLS or when building on non-FreeBSD. --- Makefile.inc1 | 3 --- 1 file changed, 3 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index fd5097d1f8dd..9b52372288f7 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -2433,9 +2433,6 @@ ${_bt}-usr.sbin/config: ${_bt}-usr.bin/file2c ${_bt_lex_depend} # since "make" will usually point to GNU make there. _other_bootstrap_tools+=usr.bin/bmake -_other_bootstrap_tools+=lib/ncurses/ncurses -${_bt}-usr.bin/ncurses: ${_bt}-lib/ncurses/ncurses - # Avoid dependency on host bz2 headers: _other_bootstrap_tools+=lib/libbz2 ${_bt}-usr.bin/grep: ${_bt}-lib/libbz2 From owner-dev-commits-src-main@freebsd.org Mon Mar 1 13:23:05 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 562E055D80C; Mon, 1 Mar 2021 13:23:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dq1Cs23mxz4XHM; Mon, 1 Mar 2021 13:23:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 39B69241B6; Mon, 1 Mar 2021 13:23:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 121DN5lH086779; Mon, 1 Mar 2021 13:23:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 121DN5it086778; Mon, 1 Mar 2021 13:23:05 GMT (envelope-from git) Date: Mon, 1 Mar 2021 13:23:05 GMT Message-Id: <202103011323.121DN5it086778@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: 79fbd483787a - main - Fix ncurses bootstrap on macOS MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 79fbd483787a1b2d91d3bed231e6912270aa04c6 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2021 13:23:05 -0000 The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=79fbd483787a1b2d91d3bed231e6912270aa04c6 commit 79fbd483787a1b2d91d3bed231e6912270aa04c6 Author: Alex Richardson AuthorDate: 2021-03-01 13:21:35 +0000 Commit: Alex Richardson CommitDate: 2021-03-01 13:22:15 +0000 Fix ncurses bootstrap on macOS Avoid including machine/console.h when bootstrapping on non-FreeBSD. --- lib/ncurses/ncurses/ncurses_cfg.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ncurses/ncurses/ncurses_cfg.h b/lib/ncurses/ncurses/ncurses_cfg.h index ca4ce6b5f32a..2217eabd3580 100644 --- a/lib/ncurses/ncurses/ncurses_cfg.h +++ b/lib/ncurses/ncurses/ncurses_cfg.h @@ -62,7 +62,9 @@ #endif #define HAVE_LONG_FILE_NAMES 1 #define MIXEDCASE_FILENAMES 1 +#ifdef __FreeBSD__ #define USE_SYSMOUSE 1 +#endif #define TERMINFO_DIRS "/usr/share/terminfo:/usr/local/share/site-terminfo" #define TERMINFO "/usr/share/terminfo" #define HAVE_BIG_CORE 1 From owner-dev-commits-src-main@freebsd.org Mon Mar 1 14:08:21 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 57FC755E816; Mon, 1 Mar 2021 14:08:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dq2D521Nnz4ZM0; Mon, 1 Mar 2021 14:08:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 29455247F4; Mon, 1 Mar 2021 14:08:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 121E8LFR040516; Mon, 1 Mar 2021 14:08:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 121E8LDl040515; Mon, 1 Mar 2021 14:08:21 GMT (envelope-from git) Date: Mon, 1 Mar 2021 14:08:21 GMT Message-Id: <202103011408.121E8LDl040515@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 874635e38173 - main - arm64: fix hardware single-stepping from EL1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 874635e381731e1fbd5e2d0459ca87814f1e455c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2021 14:08:21 -0000 The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=874635e381731e1fbd5e2d0459ca87814f1e455c commit 874635e381731e1fbd5e2d0459ca87814f1e455c Author: Mitchell Horne AuthorDate: 2021-03-01 13:59:25 +0000 Commit: Mitchell Horne CommitDate: 2021-03-01 14:04:22 +0000 arm64: fix hardware single-stepping from EL1 The main issue is that debug exceptions must to be disabled for the entire duration that SS bit in MDSCR_EL1 is set. Otherwise, a single-step exception will be generated immediately. This can occur before returning from the debugger (when MDSCR is written to) or before re-entering it after the single-step (when debug exceptions are unmasked in the exception handler). Solve this by delaying the unmask to C code for EL1, and avoid unmasking at all while handling debug exceptions, thus avoiding any recursive debug traps. Reviewed by: markj, jhb MFC after: 5 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28944 --- sys/arm64/arm64/debug_monitor.c | 6 ++++++ sys/arm64/arm64/exception.S | 6 +++++- sys/arm64/arm64/trap.c | 8 ++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/sys/arm64/arm64/debug_monitor.c b/sys/arm64/arm64/debug_monitor.c index eb5d19567697..c6622650f1ad 100644 --- a/sys/arm64/arm64/debug_monitor.c +++ b/sys/arm64/arm64/debug_monitor.c @@ -186,6 +186,9 @@ void kdb_cpu_set_singlestep(void) { + KASSERT((READ_SPECIALREG(daif) & PSR_D) == PSR_D, + ("%s: debug exceptions are not masked", __func__)); + kdb_frame->tf_spsr |= DBG_SPSR_SS; WRITE_SPECIALREG(mdscr_el1, READ_SPECIALREG(mdscr_el1) | DBG_MDSCR_SS | DBG_MDSCR_KDE); @@ -205,6 +208,9 @@ void kdb_cpu_clear_singlestep(void) { + KASSERT((READ_SPECIALREG(daif) & PSR_D) == PSR_D, + ("%s: debug exceptions are not masked", __func__)); + WRITE_SPECIALREG(mdscr_el1, READ_SPECIALREG(mdscr_el1) & ~(DBG_MDSCR_SS | DBG_MDSCR_KDE)); diff --git a/sys/arm64/arm64/exception.S b/sys/arm64/arm64/exception.S index 9fe825fd12b5..9a28a5eac022 100644 --- a/sys/arm64/arm64/exception.S +++ b/sys/arm64/arm64/exception.S @@ -75,8 +75,12 @@ __FBSDID("$FreeBSD$"); ldr x0, [x18, #(PC_CURTHREAD)] bl dbg_monitor_enter -.endif msr daifclr, #8 /* Enable the debug exception */ +.endif + /* + * For EL1, debug exceptions are conditionally unmasked in + * do_el1h_sync(). + */ .endm .macro restore_registers el diff --git a/sys/arm64/arm64/trap.c b/sys/arm64/arm64/trap.c index cb3a05ad0163..d793e34a6894 100644 --- a/sys/arm64/arm64/trap.c +++ b/sys/arm64/arm64/trap.c @@ -377,6 +377,14 @@ do_el1h_sync(struct thread *td, struct trapframe *frame) "do_el1_sync: curthread: %p, esr %lx, elr: %lx, frame: %p", td, esr, frame->tf_elr, frame); + /* + * Enable debug exceptions if we aren't already handling one. They will + * be masked again in the exception handler's epilogue. + */ + if (exception != EXCP_BRK && exception != EXCP_WATCHPT_EL1 && + exception != EXCP_SOFTSTP_EL1) + dbg_enable(); + switch (exception) { case EXCP_FP_SIMD: case EXCP_TRAP_FP: From owner-dev-commits-src-main@freebsd.org Mon Mar 1 14:08:22 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5FEF055E88D; Mon, 1 Mar 2021 14:08:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dq2D62HqSz4ZJl; Mon, 1 Mar 2021 14:08:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 41C2024A5F; Mon, 1 Mar 2021 14:08:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 121E8MX2040539; Mon, 1 Mar 2021 14:08:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 121E8MX6040538; Mon, 1 Mar 2021 14:08:22 GMT (envelope-from git) Date: Mon, 1 Mar 2021 14:08:22 GMT Message-Id: <202103011408.121E8MX6040538@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: bd0b7cbf5ac1 - main - arm64: update kdb_thrctx->pcb_lr with BKPT_SKIP MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bd0b7cbf5ac1baff4211e09584e0b86d4d96228b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2021 14:08:22 -0000 The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=bd0b7cbf5ac1baff4211e09584e0b86d4d96228b commit bd0b7cbf5ac1baff4211e09584e0b86d4d96228b Author: Mitchell Horne AuthorDate: 2021-03-01 14:00:17 +0000 Commit: Mitchell Horne CommitDate: 2021-03-01 14:04:22 +0000 arm64: update kdb_thrctx->pcb_lr with BKPT_SKIP This value should be kept in sync with updates to kdb_frame->tf_elr, since it is queried by PC_REGS() in several places. Reviewed by: markj, jhb MFC after: 5 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28943 --- sys/arm64/include/db_machdep.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/arm64/include/db_machdep.h b/sys/arm64/include/db_machdep.h index f2fd2a57a9c3..61b58415e41c 100644 --- a/sys/arm64/include/db_machdep.h +++ b/sys/arm64/include/db_machdep.h @@ -49,8 +49,9 @@ typedef long db_expr_t; #define BKPT_SIZE (4) #define BKPT_SET(inst) (BKPT_INST) -#define BKPT_SKIP do { \ - kdb_frame->tf_elr += BKPT_SIZE; \ +#define BKPT_SKIP do { \ + kdb_frame->tf_elr += BKPT_SIZE; \ + kdb_thrctx->pcb_lr += BKPT_SIZE; \ } while (0) #define db_clear_single_step kdb_cpu_clear_singlestep From owner-dev-commits-src-main@freebsd.org Mon Mar 1 14:08:24 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EF63755E79D; Mon, 1 Mar 2021 14:08:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dq2D74CrCz4ZXJ; Mon, 1 Mar 2021 14:08:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6C9FB24BF0; Mon, 1 Mar 2021 14:08:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 121E8NEH040559; Mon, 1 Mar 2021 14:08:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 121E8NSR040558; Mon, 1 Mar 2021 14:08:23 GMT (envelope-from git) Date: Mon, 1 Mar 2021 14:08:23 GMT Message-Id: <202103011408.121E8NSR040558@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: e152c882738f - main - arm64: add definition for IS_SSTEP_TRAP() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e152c882738ffe26a2f52e420e2a92c014943207 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2021 14:08:24 -0000 The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=e152c882738ffe26a2f52e420e2a92c014943207 commit e152c882738ffe26a2f52e420e2a92c014943207 Author: Mitchell Horne AuthorDate: 2021-03-01 14:01:25 +0000 Commit: Mitchell Horne CommitDate: 2021-03-01 14:04:23 +0000 arm64: add definition for IS_SSTEP_TRAP() arm64 has a distinct exception code for single-step, so we can use this to detect when an unexpected SS trap is encountered, or when an expected one is not. See db_stop_at_pc(). Reviewed by: markj, jhb MFC after: 5 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28942 --- sys/arm64/include/db_machdep.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/arm64/include/db_machdep.h b/sys/arm64/include/db_machdep.h index 61b58415e41c..105e8e507ce3 100644 --- a/sys/arm64/include/db_machdep.h +++ b/sys/arm64/include/db_machdep.h @@ -38,6 +38,7 @@ #include #define T_BREAKPOINT (EXCP_BRK) +#define T_SINGLESTEP (EXCP_SOFTSTP_EL1) #define T_WATCHPOINT (EXCP_WATCHPT_EL1) typedef vm_offset_t db_addr_t; @@ -58,6 +59,7 @@ typedef long db_expr_t; #define db_set_single_step kdb_cpu_set_singlestep #define IS_BREAKPOINT_TRAP(type, code) (type == T_BREAKPOINT) +#define IS_SSTEP_TRAP(type, code) (type == T_SINGLESTEP) #define IS_WATCHPOINT_TRAP(type, code) (type == T_WATCHPOINT) #define inst_trap_return(ins) (0) From owner-dev-commits-src-main@freebsd.org Mon Mar 1 14:23:33 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DB1C055EA67; Mon, 1 Mar 2021 14:23:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dq2Yd5s52z4bvX; Mon, 1 Mar 2021 14:23:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BBD7D24F6F; Mon, 1 Mar 2021 14:23:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 121ENXQx066194; Mon, 1 Mar 2021 14:23:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 121ENXdc066193; Mon, 1 Mar 2021 14:23:33 GMT (envelope-from git) Date: Mon, 1 Mar 2021 14:23:33 GMT Message-Id: <202103011423.121ENXdc066193@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: f5542795b992 - main - s_scalbn.c: Add missing float.h include MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f5542795b99206a2b4e5a57429d18b9478264e24 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2021 14:23:33 -0000 The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=f5542795b99206a2b4e5a57429d18b9478264e24 commit f5542795b99206a2b4e5a57429d18b9478264e24 Author: Alex Richardson AuthorDate: 2021-03-01 14:10:24 +0000 Commit: Alex Richardson CommitDate: 2021-03-01 14:22:47 +0000 s_scalbn.c: Add missing float.h include This caused LDBL_MANT_DIG to not be defined and therefore the scalbnl alias was not being emitted for double==long double platforms. Fixes: 760b2ffc ("Update scalbn* functions to the musl versions") Reported by: Jenkins --- lib/libc/gen/ldexp.c | 1 + lib/msun/src/s_scalbn.c | 3 ++- lib/msun/src/s_scalbnl.c | 10 ++-------- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/lib/libc/gen/ldexp.c b/lib/libc/gen/ldexp.c index 878271576313..cbbcf0782387 100644 --- a/lib/libc/gen/ldexp.c +++ b/lib/libc/gen/ldexp.c @@ -7,3 +7,4 @@ __FBSDID("$FreeBSD$"); */ #define scalbn ldexp #include "../../msun/src/s_scalbn.c" +#undef scalbn diff --git a/lib/msun/src/s_scalbn.c b/lib/msun/src/s_scalbn.c index 219cd8f0c989..3de663f8b670 100644 --- a/lib/msun/src/s_scalbn.c +++ b/lib/msun/src/s_scalbn.c @@ -1,3 +1,4 @@ +#include #include #include @@ -32,7 +33,7 @@ double scalbn(double x, int n) return x; } -#if (LDBL_MANT_DIG == 53) +#if (LDBL_MANT_DIG == 53) && !defined(scalbn) __weak_reference(scalbn, ldexpl); __weak_reference(scalbn, scalbnl); #endif diff --git a/lib/msun/src/s_scalbnl.c b/lib/msun/src/s_scalbnl.c index 65a9415b0d21..a79f79b33480 100644 --- a/lib/msun/src/s_scalbnl.c +++ b/lib/msun/src/s_scalbnl.c @@ -8,13 +8,7 @@ * manipulation rather than by actually performing an * exponentiation or a multiplication. */ - -#if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024 -long double scalbnl(long double x, int n) -{ - return scalbn(x, n); -} -#elif (LDBL_MANT_DIG == 64 || LDBL_MANT_DIG == 113) && LDBL_MAX_EXP == 16384 +#if (LDBL_MANT_DIG == 64 || LDBL_MANT_DIG == 113) && LDBL_MAX_EXP == 16384 long double scalbnl(long double x, int n) { union IEEEl2bits u; @@ -42,6 +36,6 @@ long double scalbnl(long double x, int n) u.xbits.expsign = 0x3fff + n; return x * u.e; } +__strong_reference(scalbnl, ldexpl); #endif -__strong_reference(scalbnl, ldexpl); From owner-dev-commits-src-main@freebsd.org Mon Mar 1 14:23:35 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3383E55EA69; Mon, 1 Mar 2021 14:23:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dq2Yg0XrQz4by8; Mon, 1 Mar 2021 14:23:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F16C425059; Mon, 1 Mar 2021 14:23:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 121ENYLh066215; Mon, 1 Mar 2021 14:23:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 121ENYxE066214; Mon, 1 Mar 2021 14:23:34 GMT (envelope-from git) Date: Mon, 1 Mar 2021 14:23:34 GMT Message-Id: <202103011423.121ENYxE066214@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: 10f2a0c2e876 - main - Silence a macro-redefined warning when crossbuilding MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 10f2a0c2e8766e9878ad4181f555d8dda84da34e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2021 14:23:35 -0000 The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=10f2a0c2e8766e9878ad4181f555d8dda84da34e commit 10f2a0c2e8766e9878ad4181f555d8dda84da34e Author: Alex Richardson AuthorDate: 2021-03-01 14:11:20 +0000 Commit: Alex Richardson CommitDate: 2021-03-01 14:22:47 +0000 Silence a macro-redefined warning when crossbuilding This is already defined by the ncurses headers, so just undef it before defining it again. --- tools/build/cross-build/include/common/string.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/build/cross-build/include/common/string.h b/tools/build/cross-build/include/common/string.h index dd039d54583e..8a33f4d4ff19 100644 --- a/tools/build/cross-build/include/common/string.h +++ b/tools/build/cross-build/include/common/string.h @@ -38,7 +38,9 @@ #pragma once /* Avoid incompatible opensolaris redeclarations (without _FORTIFY_SOURCE). */ +#undef HAVE_STRLCAT #define HAVE_STRLCAT 1 +#undef HAVE_STRLCPY #define HAVE_STRLCPY 1 #include_next From owner-dev-commits-src-main@freebsd.org Mon Mar 1 14:28:05 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E346D55F0DF; Mon, 1 Mar 2021 14:28:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dq2fs69LXz4c5F; Mon, 1 Mar 2021 14:28:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C6ACE24E77; Mon, 1 Mar 2021 14:28:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 121ES5m0066995; Mon, 1 Mar 2021 14:28:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 121ES5tq066994; Mon, 1 Mar 2021 14:28:05 GMT (envelope-from git) Date: Mon, 1 Mar 2021 14:28:05 GMT Message-Id: <202103011428.121ES5tq066994@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: 0e4ff0acbe80 - main - AArch64: Don't set flush-subnormals-to-zero flag on startup MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0e4ff0acbe80c547988bede738af2e227c7eb47c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2021 14:28:05 -0000 The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=0e4ff0acbe80c547988bede738af2e227c7eb47c commit 0e4ff0acbe80c547988bede738af2e227c7eb47c Author: Alex Richardson AuthorDate: 2021-03-01 14:27:30 +0000 Commit: Alex Richardson CommitDate: 2021-03-01 14:27:30 +0000 AArch64: Don't set flush-subnormals-to-zero flag on startup This flag has been set on startup since 65618fdda0f272a823e6701966421bdca0efa301. However, This causes some of the math-related tests to fail as they report zero instead of a tiny number. This fixes at least /usr/tests/lib/msun/ldexp_test and possibly others. Additionally, setting this flag prevents printf() from printing subnormal numbers in decimal form. See also https://www.openwall.com/lists/musl/2021/02/26/1 PR: 253847 Reviewed By: mmel Differential Revision: https://reviews.freebsd.org/D28938 --- lib/libc/tests/stdio/printfloat_test.c | 35 +++++++++++++++++++++++++++++++++- sys/arm64/arm64/vm_machdep.c | 2 +- 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/lib/libc/tests/stdio/printfloat_test.c b/lib/libc/tests/stdio/printfloat_test.c index 97629fb0d2b1..736ba1b493ef 100644 --- a/lib/libc/tests/stdio/printfloat_test.c +++ b/lib/libc/tests/stdio/printfloat_test.c @@ -50,7 +50,7 @@ smash_stack(void) { static uint32_t junk = 0xdeadbeef; uint32_t buf[512]; - int i; + size_t i; for (i = 0; i < sizeof(buf) / sizeof(buf[0]); i++) buf[i] = junk; @@ -370,6 +370,37 @@ ATF_TC_BODY(hexadecimal_rounding, tc) testfmt("0x1.83p+0", "%.2a", 1.51); } +ATF_TC_WITHOUT_HEAD(subnormal_double); +ATF_TC_BODY(subnormal_double, tc) +{ + /* Regression test for https://bugs.freebsd.org/253847 */ + double positive = __DBL_DENORM_MIN__; + testfmt("4.9406564584124654418e-324", "%20.20g", positive); + testfmt("4.9406564584124654418E-324", "%20.20G", positive); + testfmt("0x1p-1074", "%a", positive); + testfmt("0X1P-1074", "%A", positive); + double negative = -__DBL_DENORM_MIN__; + testfmt("-4.9406564584124654418e-324", "%20.20g", negative); + testfmt("-4.9406564584124654418E-324", "%20.20G", negative); + testfmt("-0x1p-1074", "%a", negative); + testfmt("-0X1P-1074", "%A", negative); +} + +ATF_TC_WITHOUT_HEAD(subnormal_float); +ATF_TC_BODY(subnormal_float, tc) +{ + float positive = __FLT_DENORM_MIN__; + testfmt("1.4012984643248170709e-45", "%20.20g", positive); + testfmt("1.4012984643248170709E-45", "%20.20G", positive); + testfmt("0x1p-149", "%a", positive); + testfmt("0X1P-149", "%A", positive); + float negative = -__FLT_DENORM_MIN__; + testfmt("-1.4012984643248170709e-45", "%20.20g", negative); + testfmt("-1.4012984643248170709E-45", "%20.20G", negative); + testfmt("-0x1p-149", "%a", negative); + testfmt("-0X1P-149", "%A", negative); +} + ATF_TP_ADD_TCS(tp) { @@ -384,6 +415,8 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, decimal_rounding); ATF_TP_ADD_TC(tp, hexadecimal_floating_point); ATF_TP_ADD_TC(tp, hexadecimal_rounding); + ATF_TP_ADD_TC(tp, subnormal_double); + ATF_TP_ADD_TC(tp, subnormal_float); return (atf_no_error()); } diff --git a/sys/arm64/arm64/vm_machdep.c b/sys/arm64/arm64/vm_machdep.c index d4dd32caef06..9a496b40ec98 100644 --- a/sys/arm64/arm64/vm_machdep.c +++ b/sys/arm64/arm64/vm_machdep.c @@ -55,7 +55,7 @@ __FBSDID("$FreeBSD$"); #include #endif -uint32_t initial_fpcr = VFPCR_DN | VFPCR_FZ; +uint32_t initial_fpcr = VFPCR_DN; #include From owner-dev-commits-src-main@freebsd.org Mon Mar 1 14:32:14 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8716455F165; Mon, 1 Mar 2021 14:32:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dq2lf3T0pz4cj1; Mon, 1 Mar 2021 14:32:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6AAC925399; Mon, 1 Mar 2021 14:32:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 121EWEdN078980; Mon, 1 Mar 2021 14:32:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 121EWEYJ078979; Mon, 1 Mar 2021 14:32:14 GMT (envelope-from git) Date: Mon, 1 Mar 2021 14:32:14 GMT Message-Id: <202103011432.121EWEYJ078979@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: a5f9fe2bab78 - main - copy_file_range(2): Fix for small values of input file offset and len MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a5f9fe2bab789f49e8b53da3a62dbd34725e23ea Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2021 14:32:14 -0000 The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=a5f9fe2bab789f49e8b53da3a62dbd34725e23ea commit a5f9fe2bab789f49e8b53da3a62dbd34725e23ea Author: Rick Macklem AuthorDate: 2021-03-01 14:28:30 +0000 Commit: Rick Macklem CommitDate: 2021-03-01 14:31:10 +0000 copy_file_range(2): Fix for small values of input file offset and len r366302 broke copy_file_range(2) for small values of input file offset and len. It was possible for rem to be greater than len and then "len - rem" was a large value, since both variables are unsigned. Reported by: koobs, Pablo (Python) Reviewed by: asomers, koobs MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D28981 --- sys/kern/vfs_vnops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index 781968f2db53..7a0951fb07ca 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -3143,7 +3143,7 @@ vn_generic_copy_file_range(struct vnode *invp, off_t *inoffp, rem = *inoffp % blksize; if (rem > 0) rem = blksize - rem; - if (len - rem > blksize) + if (len > rem && len - rem > blksize) len = savlen = rounddown(len - rem, blksize) + rem; } From owner-dev-commits-src-main@freebsd.org Mon Mar 1 14:50:43 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2262955FDC5; Mon, 1 Mar 2021 14:50:43 +0000 (UTC) (envelope-from arichardson.kde@gmail.com) Received: from mail-ed1-f46.google.com (mail-ed1-f46.google.com [209.85.208.46]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dq38y31bFz4dpt; Mon, 1 Mar 2021 14:50:42 +0000 (UTC) (envelope-from arichardson.kde@gmail.com) Received: by mail-ed1-f46.google.com with SMTP id w9so4950988edt.13; Mon, 01 Mar 2021 06:50:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=AgZVFNTgcwSBTnqXfA5mRPbtXNUHYv1wpNtw0MjAoy0=; b=cCuPp5aIulsF0iUTwdNFFDBO3DBan6B3rSZlSt/eD6jY8vpsFuLh5/oXyPrTY67uW5 +fB5Ud4tkvNzW9pQbYlmEUUG+Ej32vGZhGwvSxfdsEgbrLIqoGqxzjLqXK8+wck+q2TD f2tElxVqF6ZXOPJGRD83Km5P5+UwbUoJlj69utcKRO9mnZ7wR3L+Vr9afa2N1p1WJnQv citFijvVEXscYTQS1ydE8lCPyS+CHsSp8P53wnXywt+Uu7ySSAkvrxxU5GA3vXMLHWoa rmDm/fXasb+MhXWbHtkYCWvTZI0iDAy94+LpPMzermnwfunu6GEeImMMU2d/eqUZkNNb tw6w== X-Gm-Message-State: AOAM532w++3qgl4C2AomhvPDTuuUzOtQ+HgmMJ18k43AqUg9sLNAOD9y GwexnHeD05dHgPkAW7Pw88SBj013751WRg== X-Google-Smtp-Source: ABdhPJx4JdxcWuCcXZcZnXh6Qf0RFA2gLQ87GRDq5FoGbcxHzTuDSkqdNVcSmIhD89ogTM4e2dmvPA== X-Received: by 2002:aa7:cd8d:: with SMTP id x13mr16457611edv.286.1614610240380; Mon, 01 Mar 2021 06:50:40 -0800 (PST) Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com. [209.85.128.52]) by smtp.gmail.com with ESMTPSA id v24sm4798433ejw.17.2021.03.01.06.50.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 01 Mar 2021 06:50:40 -0800 (PST) Received: by mail-wm1-f52.google.com with SMTP id i9so13442402wml.0; Mon, 01 Mar 2021 06:50:40 -0800 (PST) X-Received: by 2002:a7b:c119:: with SMTP id w25mr15878706wmi.127.1614610239791; Mon, 01 Mar 2021 06:50:39 -0800 (PST) MIME-Version: 1.0 References: <202102260917.11Q9HUnx061198@gitrepo.freebsd.org> In-Reply-To: <202102260917.11Q9HUnx061198@gitrepo.freebsd.org> From: Alexander Richardson Date: Mon, 1 Mar 2021 14:50:28 +0000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: ec74116ace52 - main - dialog: finish update to 1.3-20210117 To: Baptiste Daroussin Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4Dq38y31bFz4dpt X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of arichardsonkde@gmail.com designates 209.85.208.46 as permitted sender) smtp.mailfrom=arichardsonkde@gmail.com X-Spamd-Result: default: False [-2.71 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; RCVD_COUNT_THREE(0.00)[4]; NEURAL_HAM_SHORT(-0.71)[-0.707]; FORGED_SENDER(0.30)[arichardson@freebsd.org,arichardsonkde@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]; FROM_NEQ_ENVFROM(0.00)[arichardson@freebsd.org,arichardsonkde@gmail.com]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; TAGGED_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[freebsd.org]; RBL_DBL_DONT_QUERY_IPS(0.00)[209.85.208.46:from]; SPAMHAUS_ZRD(0.00)[209.85.208.46:from:127.0.2.255]; RCVD_IN_DNSWL_NONE(0.00)[209.85.208.46:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.208.46:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[dev-commits-src-all,dev-commits-src-main] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2021 14:50:43 -0000 On Fri, 26 Feb 2021 at 09:17, Baptiste Daroussin wrote: > > The branch main has been updated by bapt: > > URL: https://cgit.FreeBSD.org/src/commit/?id=ec74116ace52591cf121623e2010ae5efab5524a > > commit ec74116ace52591cf121623e2010ae5efab5524a > Author: Baptiste Daroussin > AuthorDate: 2021-02-26 09:13:13 +0000 > Commit: Baptiste Daroussin > CommitDate: 2021-02-26 09:17:19 +0000 > > dialog: finish update to 1.3-20210117 > > patch dialog.c which requires stddef for the usage of offsetof > catchup on the config header > --- > contrib/dialog/dialog.c | 1 + > gnu/lib/libdialog/Makefile | 2 +- > gnu/lib/libdialog/dlg_config.h | 15 ++++++++++++--- > 3 files changed, 14 insertions(+), 4 deletions(-) > > diff --git a/contrib/dialog/dialog.c b/contrib/dialog/dialog.c > index 510baeb97add..f59c9dc03c13 100644 > --- a/contrib/dialog/dialog.c > +++ b/contrib/dialog/dialog.c > @@ -26,6 +26,7 @@ > > #include > > +#include > #include > #include > #include > diff --git a/gnu/lib/libdialog/Makefile b/gnu/lib/libdialog/Makefile > index e4f1b62121d9..8c6b84b64f90 100644 > --- a/gnu/lib/libdialog/Makefile > +++ b/gnu/lib/libdialog/Makefile > @@ -15,7 +15,7 @@ MAN= dialog.3 > > LIBADD= ncursesw m > > -CFLAGS+= -I${.CURDIR} -I${DIALOG} -D_XOPEN_SOURCE_EXTENDED -DGCC_UNUSED=__unused > +CFLAGS+= -I${.CURDIR} -I${DIALOG} -D_XOPEN_SOURCE_EXTENDED -Wno-macro-redefined This appears to have broken the GCC build: cc1: error: unrecognized command line option '-Wno-macro-redefined' [-Werror] Probably fixable by using CFLAGS.clang? Thanks, Alex > .PATH: ${DIALOG} > WARNS?= 1 > > diff --git a/gnu/lib/libdialog/dlg_config.h b/gnu/lib/libdialog/dlg_config.h > index ee1d3f9ad3cb..1bd45183f509 100644 > --- a/gnu/lib/libdialog/dlg_config.h > +++ b/gnu/lib/libdialog/dlg_config.h > @@ -6,8 +6,15 @@ > */ > > #define CURSES_WACS_ARRAY _nc_wacs > -#define DIALOG_PATCHDATE 20180621 > +#define CURSES_WACS_SYMBOLS 1 > +#define DIALOG_PATCHDATE 20210117 > #define DIALOG_VERSION "1.3" > +#define GCC_NORETURN __attribute__((noreturn)) > +#define GCC_PRINTF 1 > +#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var))) > +#define GCC_SCANF 1 > +#define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var))) > +#define GCC_UNUSED __attribute__((unused)) > #define HAVE_ALLOCA 1 > #define HAVE_BTOWC 1 > #define HAVE_COLOR 1 > @@ -58,6 +65,7 @@ > #define HAVE_NL_TYPES_H 1 > #define HAVE_PUTENV 1 > #define HAVE_RC_FILE 1 > +#define HAVE_RC_FILE2 1 > #define HAVE_SEARCH_H 1 > #define HAVE_SETENV 1 > #define HAVE_SETLOCALE 1 > @@ -93,11 +101,11 @@ > #define HAVE_WCTOMB 1 > #define HAVE_WCURSYNCUP 1 > #define HAVE_WGETPARENT 1 > +#define HAVE_WGET_WCH 1 > #define HAVE_WHIPTAIL 1 > #define HAVE_WSYNCUP 1 > #define HAVE_XDIALOG 1 > #define HAVE_XDIALOG2 1 > -#define HAVE__NC_FREE_AND_EXIT 1 > #define ICONV_CONST > #define MIXEDCASE_FILENAMES 1 > #define NCURSES 1 > @@ -105,7 +113,8 @@ > #define PACKAGE "dialog" > #define RETSIGTYPE void > #define STDC_HEADERS 1 > -#define SYSTEM_NAME "freebsd12.0" > +#define SYSTEM_NAME "FreeBSD" > #define TIME_WITH_SYS_TIME 1 > #define TYPE_CHTYPE_IS_SCALAR 1 > #define USE_WIDE_CURSES 1 > +#define WIDEC_CURSES 1 From owner-dev-commits-src-main@freebsd.org Mon Mar 1 15:01:54 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 93E7F5606EC; Mon, 1 Mar 2021 15:01:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dq3Pt3s8jz4fTt; Mon, 1 Mar 2021 15:01:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 77B17257A3; Mon, 1 Mar 2021 15:01:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 121F1sX6017445; Mon, 1 Mar 2021 15:01:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 121F1soq017444; Mon, 1 Mar 2021 15:01:54 GMT (envelope-from git) Date: Mon, 1 Mar 2021 15:01:54 GMT Message-Id: <202103011501.121F1soq017444@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 95da5e131a0a - main - dialog: fix macro redefinition MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 95da5e131a0a9e48f0a063e3ff75000434cc5c52 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2021 15:01:54 -0000 The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=95da5e131a0a9e48f0a063e3ff75000434cc5c52 commit 95da5e131a0a9e48f0a063e3ff75000434cc5c52 Author: Baptiste Daroussin AuthorDate: 2021-03-01 14:58:34 +0000 Commit: Baptiste Daroussin CommitDate: 2021-03-01 15:01:44 +0000 dialog: fix macro redefinition dialog.h defines MIN and MAX (making sure to undefine the previous macros if it already exists), but sys/param.h also defines those macros (without guards) and is included after dialog.h resulting in both gcc and clang complaining about macro redefiniton While clang do accept -Wno-macro-redefined to ignore the redefinition warning, gcc does not [1] Undefine both macros prior inclusion of sys/param.h to avoid the warning Reported by: arichardson --- contrib/dialog/util.c | 2 ++ gnu/lib/libdialog/Makefile | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/contrib/dialog/util.c b/contrib/dialog/util.c index 992be3f433f5..726a36a5031d 100644 --- a/contrib/dialog/util.c +++ b/contrib/dialog/util.c @@ -39,6 +39,8 @@ #endif #ifdef HAVE_SYS_PARAM_H +#undef MIN +#undef MAX #include #endif diff --git a/gnu/lib/libdialog/Makefile b/gnu/lib/libdialog/Makefile index 8c6b84b64f90..b97e4df9373a 100644 --- a/gnu/lib/libdialog/Makefile +++ b/gnu/lib/libdialog/Makefile @@ -15,7 +15,7 @@ MAN= dialog.3 LIBADD= ncursesw m -CFLAGS+= -I${.CURDIR} -I${DIALOG} -D_XOPEN_SOURCE_EXTENDED -Wno-macro-redefined +CFLAGS+= -I${.CURDIR} -I${DIALOG} -D_XOPEN_SOURCE_EXTENDED .PATH: ${DIALOG} WARNS?= 1 From owner-dev-commits-src-main@freebsd.org Mon Mar 1 15:03:01 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 555845607DA; Mon, 1 Mar 2021 15:03:01 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dq3R91yNnz4fkf; Mon, 1 Mar 2021 15:03:01 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from aniel.nours.eu (ns393929.ip-176-31-115.eu [176.31.115.77]) (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 211103371B; Mon, 1 Mar 2021 15:03:01 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: by aniel.nours.eu (Postfix, from userid 1001) id 911D772076; Mon, 1 Mar 2021 16:02:58 +0100 (CET) Date: Mon, 1 Mar 2021 16:02:58 +0100 From: Baptiste Daroussin To: Alexander Richardson Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: ec74116ace52 - main - dialog: finish update to 1.3-20210117 Message-ID: <20210301150258.6clx2knt5i7xc7zd@aniel.nours.eu> References: <202102260917.11Q9HUnx061198@gitrepo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="rbvnhix2rpa5opuf" Content-Disposition: inline In-Reply-To: X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2021 15:03:01 -0000 --rbvnhix2rpa5opuf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 01, 2021 at 02:50:28PM +0000, Alexander Richardson wrote: > On Fri, 26 Feb 2021 at 09:17, Baptiste Daroussin wrote: > > > > The branch main has been updated by bapt: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=3Dec74116ace52591cf121623e= 2010ae5efab5524a > > > > commit ec74116ace52591cf121623e2010ae5efab5524a > > Author: Baptiste Daroussin > > AuthorDate: 2021-02-26 09:13:13 +0000 > > Commit: Baptiste Daroussin > > CommitDate: 2021-02-26 09:17:19 +0000 > > > > dialog: finish update to 1.3-20210117 > > > > patch dialog.c which requires stddef for the usage of offsetof > > catchup on the config header > > --- > > contrib/dialog/dialog.c | 1 + > > gnu/lib/libdialog/Makefile | 2 +- > > gnu/lib/libdialog/dlg_config.h | 15 ++++++++++++--- > > 3 files changed, 14 insertions(+), 4 deletions(-) > > > > diff --git a/contrib/dialog/dialog.c b/contrib/dialog/dialog.c > > index 510baeb97add..f59c9dc03c13 100644 > > --- a/contrib/dialog/dialog.c > > +++ b/contrib/dialog/dialog.c > > @@ -26,6 +26,7 @@ > > > > #include > > > > +#include > > #include > > #include > > #include > > diff --git a/gnu/lib/libdialog/Makefile b/gnu/lib/libdialog/Makefile > > index e4f1b62121d9..8c6b84b64f90 100644 > > --- a/gnu/lib/libdialog/Makefile > > +++ b/gnu/lib/libdialog/Makefile > > @@ -15,7 +15,7 @@ MAN=3D dialog.3 > > > > LIBADD=3D ncursesw m > > > > -CFLAGS+=3D -I${.CURDIR} -I${DIALOG} -D_XOPEN_SOURCE_EXTENDED -DG= CC_UNUSED=3D__unused > > +CFLAGS+=3D -I${.CURDIR} -I${DIALOG} -D_XOPEN_SOURCE_EXTENDED -Wn= o-macro-redefined >=20 > This appears to have broken the GCC build: > cc1: error: unrecognized command line option '-Wno-macro-redefined' [-Wer= ror] > Probably fixable by using CFLAGS.clang? >=20 > Thanks, > Alex >=20 I have fixed the warning instead. Bapt --rbvnhix2rpa5opuf Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEgOTj3suS2urGXVU3Y4mL3PG3PloFAmA9Ah8ACgkQY4mL3PG3 PlrSrw/+KRY2aR26L6ZYr3Rnpx6XmYK9hKcrOiSc95hr95AWa8d/rYGWxE0447dR XGC+RpHY7Hn2OYK8pGDYvIXMs+opHnouEk+k4Q7LJeoBqnATfK5Azju39/B6DHg8 PlP3YvDUZHpAE8ZnkkslCHeYBCNbsO7a1ITH4TtmrXocANG3+3zSnTynwhIYWE+P j0CTPfPyyH8KsS934YQnyPJwXYaV9kzxsujDndfsfV6HMJqFZZyqaZ//8dj9cwSz D9FSehF7kbhge+86kvr5eUgHs2VFY5pto+186sb3ZMPOGgpYWH8OG3PmD1scSxz8 VnAx6rC7Gn3px41+gKlAIzL/QlojfGE6hCHWWjxhOph9TClTuSRbW5dkg6OujFk4 ONNsH6CaEZBZvWk0yDlhKcKU2+dFmf65xR8k99cRgBK2ZL2iyuwv3FcW9/zBdiEB 0YJbzaifc2wo2CH4K4r/eQBqiAPx5iAXN1XQNmNdvyP4k2HSAu9UaJNTCQUT/t+y RCSPVW0uBuOZnXnBOLbIJNe/Ct4zAbAXXHNFblYsPZX+jGA3vSYbERCoOWnlL6+1 74KghC4cSzH1PDKQJmcytatRgdFVSmwFHyEdQfvah6VUkI6q7p0glUOoEhNDBBZL kbPzGy/9wuCBJzHvYLVmP0qNkxddtJUf0b+Uu6Rnh5cOiHitaE8= =1ael -----END PGP SIGNATURE----- --rbvnhix2rpa5opuf-- From owner-dev-commits-src-main@freebsd.org Mon Mar 1 15:19:53 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5AE07560F27; Mon, 1 Mar 2021 15:19:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dq3pd28zBz4gcN; Mon, 1 Mar 2021 15:19:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3D4ED25BA9; Mon, 1 Mar 2021 15:19:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 121FJrTU033343; Mon, 1 Mar 2021 15:19:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 121FJrG1033342; Mon, 1 Mar 2021 15:19:53 GMT (envelope-from git) Date: Mon, 1 Mar 2021 15:19:53 GMT Message-Id: <202103011519.121FJrG1033342@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: 066dab17e7a4 - main - riscv: Fix whitespace issues in fabs added in 524b018d2004 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 066dab17e7a4a78d43dbcef8119960ddc8090a73 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2021 15:19:53 -0000 The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=066dab17e7a4a78d43dbcef8119960ddc8090a73 commit 066dab17e7a4a78d43dbcef8119960ddc8090a73 Author: Jessica Clarke AuthorDate: 2021-03-01 14:01:13 +0000 Commit: Jessica Clarke CommitDate: 2021-03-01 15:19:36 +0000 riscv: Fix whitespace issues in fabs added in 524b018d2004 --- lib/libc/riscv/gen/fabs.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libc/riscv/gen/fabs.S b/lib/libc/riscv/gen/fabs.S index 09042af3b4c0..036d50eddf90 100644 --- a/lib/libc/riscv/gen/fabs.S +++ b/lib/libc/riscv/gen/fabs.S @@ -43,8 +43,8 @@ ENTRY(fabs) #ifdef __riscv_float_abi_double fabs.d fa0, fa0 #else - slli a0,a0,1 - srli a0,a0,1 + slli a0, a0, 1 + srli a0, a0, 1 #endif ret END(fabs) From owner-dev-commits-src-main@freebsd.org Mon Mar 1 15:52:58 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AD628562936; Mon, 1 Mar 2021 15:52:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dq4Xp3F2nz4lqF; Mon, 1 Mar 2021 15:52:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3FD832658F; Mon, 1 Mar 2021 15:52:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 121Fqw7f084291; Mon, 1 Mar 2021 15:52:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 121Fqw7m084290; Mon, 1 Mar 2021 15:52:58 GMT (envelope-from git) Date: Mon, 1 Mar 2021 15:52:58 GMT Message-Id: <202103011552.121Fqw7m084290@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Richard Scheffenegger Subject: git: 0b0f8b359d0b - main - calculate prr_out correctly when pipe < ssthresh MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0b0f8b359d0b94b09cfec35e5d5de01b23c7fbf1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2021 15:52:58 -0000 The branch main has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=0b0f8b359d0b94b09cfec35e5d5de01b23c7fbf1 commit 0b0f8b359d0b94b09cfec35e5d5de01b23c7fbf1 Author: Richard Scheffenegger AuthorDate: 2021-03-01 15:25:46 +0000 Commit: Richard Scheffenegger CommitDate: 2021-03-01 15:26:05 +0000 calculate prr_out correctly when pipe < ssthresh Reviewed By: #transport, tuexen MFC after: 3 days Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D28998 --- sys/netinet/tcp_input.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index d802bc8f47ae..eda41d36ab88 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -2600,10 +2600,12 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so, } else { if (V_tcp_do_prr_conservative) limit = tp->sackhint.prr_delivered - - tp->sackhint.sack_bytes_rexmit; + (tp->sackhint.sack_bytes_rexmit + + (tp->snd_nxt - tp->snd_recover)); else limit = imax(tp->sackhint.prr_delivered - - tp->sackhint.sack_bytes_rexmit, + (tp->sackhint.sack_bytes_rexmit + + (tp->snd_nxt - tp->snd_recover)), del_data) + maxseg; snd_cnt = imin(tp->snd_ssthresh - pipe, limit); } @@ -3976,10 +3978,12 @@ tcp_prr_partialack(struct tcpcb *tp, struct tcphdr *th) } else { if (V_tcp_do_prr_conservative) limit = tp->sackhint.prr_delivered - - tp->sackhint.sack_bytes_rexmit; + (tp->sackhint.sack_bytes_rexmit + + (tp->snd_nxt - tp->snd_recover)); else limit = imax(tp->sackhint.prr_delivered - - tp->sackhint.sack_bytes_rexmit, + (tp->sackhint.sack_bytes_rexmit + + (tp->snd_nxt - tp->snd_recover)), del_data) + maxseg; snd_cnt = imin((tp->snd_ssthresh - pipe), limit); } From owner-dev-commits-src-main@freebsd.org Mon Mar 1 16:39:50 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 999D156418F; Mon, 1 Mar 2021 16:39:50 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dq5Zt3lRrz4vRn; Mon, 1 Mar 2021 16:39:50 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from comporellon.tachypleus.net (unknown [IPv6:2601:405:4a00:acd:85ea:d09e:32a:9875]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: nwhitehorn/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 1E34F34179; Mon, 1 Mar 2021 16:39:50 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Subject: Re: git: 0b7472b3d8d2 - main - Mount the EFI system partition (ESP) on newly-installed systems. To: Brandon Bergren , Warner Losh , Kevin Bowling Cc: Jessica Clarke , Colin Percival , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202102232124.11NLOT27012354@gitrepo.freebsd.org> <01000177d0e7f033-389acb59-2004-4040-ba7c-762878ef86b4-000000@email.amazonses.com> <583f83d8-c78b-d961-d2c5-9693bd36563b@freebsd.org> <743fd126-2077-49b1-9c85-7ccc61616b98@www.fastmail.com> <460ceb98-e0c1-42b3-8e3c-2587c5ce8398@www.fastmail.com> <8215cd95-6905-49da-ab07-65796845613c@www.fastmail.com> From: Nathan Whitehorn Message-ID: Date: Mon, 1 Mar 2021 11:39:49 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: <8215cd95-6905-49da-ab07-65796845613c@www.fastmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2021 16:39:50 -0000 On 2/28/21 3:44 PM, Brandon Bergren wrote: > > On Sun, Feb 28, 2021, at 2:25 PM, Warner Losh wrote: >> Yes. I agree as well. I was just hoping to say just that: EFI is barely >> theoretically possible, but in reality we'll likely never use it.... >> >> The net effect is that we don't want to install efi on powerpc on freebsd. >> >> Warner >> > Yeah. The code before the change excluded mips and powerpc platforms, and it should continue to do so instead of using the existence of a /boot/efi directory as the only clue. > > Currently bsdinstall bails out and leaves powerpc* in a half-installed state because the die in the uname case propagates to the main script, so it never runs the bits after the bootconfig. > So that was a deliberate choice to keep the list of places that know about efi vs. non-EFI centralized. I'd prefer to just not make that directory on systems where it doesn't apply rather than messing with the installer. Do you know where it is being made? -Nathan From owner-dev-commits-src-main@freebsd.org Mon Mar 1 16:42:31 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 40258563F71; Mon, 1 Mar 2021 16:42:31 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dq5dz14gBz3C3r; Mon, 1 Mar 2021 16:42:31 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qk1-f176.google.com (mail-qk1-f176.google.com [209.85.222.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 13B0134830; Mon, 1 Mar 2021 16:42:31 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qk1-f176.google.com with SMTP id q85so17141676qke.8; Mon, 01 Mar 2021 08:42:31 -0800 (PST) X-Gm-Message-State: AOAM530EIVPuwQwsNokl18sVFhWVFYaybeWtmWhcK+rY3suafHrNkhk9 c/CgIf8t2+ycvkGSywAdSwZjGBe0NXMNESQDH/c= X-Google-Smtp-Source: ABdhPJxnd9X2OyMAyB7ts7qSjSpIsoaggv6O5bnlxAA4Vk3NU3ceskKkreyHDbeqilyEX6wpqSl1DhHno8Jy0Vqu/II= X-Received: by 2002:a05:620a:89d:: with SMTP id b29mr5285480qka.103.1614616950665; Mon, 01 Mar 2021 08:42:30 -0800 (PST) MIME-Version: 1.0 References: <202102232124.11NLOT27012354@gitrepo.freebsd.org> <01000177d0e7f033-389acb59-2004-4040-ba7c-762878ef86b4-000000@email.amazonses.com> <583f83d8-c78b-d961-d2c5-9693bd36563b@freebsd.org> <743fd126-2077-49b1-9c85-7ccc61616b98@www.fastmail.com> <460ceb98-e0c1-42b3-8e3c-2587c5ce8398@www.fastmail.com> <8215cd95-6905-49da-ab07-65796845613c@www.fastmail.com> In-Reply-To: From: Kyle Evans Date: Mon, 1 Mar 2021 10:42:17 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 0b7472b3d8d2 - main - Mount the EFI system partition (ESP) on newly-installed systems. To: Nathan Whitehorn Cc: Brandon Bergren , Warner Losh , Kevin Bowling , Jessica Clarke , Colin Percival , src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2021 16:42:31 -0000 On Mon, Mar 1, 2021 at 10:39 AM Nathan Whitehorn wrote: > > > > On 2/28/21 3:44 PM, Brandon Bergren wrote: > > > > On Sun, Feb 28, 2021, at 2:25 PM, Warner Losh wrote: > >> Yes. I agree as well. I was just hoping to say just that: EFI is barely > >> theoretically possible, but in reality we'll likely never use it.... > >> > >> The net effect is that we don't want to install efi on powerpc on freebsd. > >> > >> Warner > >> > > Yeah. The code before the change excluded mips and powerpc platforms, and it should continue to do so instead of using the existence of a /boot/efi directory as the only clue. > > > > Currently bsdinstall bails out and leaves powerpc* in a half-installed state because the die in the uname case propagates to the main script, so it never runs the bits after the bootconfig. > > > > So that was a deliberate choice to keep the list of places that know > about efi vs. non-EFI centralized. I'd prefer to just not make that > directory on systems where it doesn't apply rather than messing with the > installer. Do you know where it is being made? > -Nathan It's part of the hierarchy in ^/etc/mtree/BSD.root.dist From owner-dev-commits-src-main@freebsd.org Mon Mar 1 16:45:00 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0DE1A5641C2; Mon, 1 Mar 2021 16:45:00 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dq5hq6svrz3C4m; Mon, 1 Mar 2021 16:44:59 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from comporellon.tachypleus.net (unknown [IPv6:2601:405:4a00:acd:85ea:d09e:32a:9875]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: nwhitehorn/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 873A234940; Mon, 1 Mar 2021 16:44:59 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Subject: Re: git: 0b7472b3d8d2 - main - Mount the EFI system partition (ESP) on newly-installed systems. To: Kyle Evans Cc: Brandon Bergren , Warner Losh , Kevin Bowling , Jessica Clarke , Colin Percival , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202102232124.11NLOT27012354@gitrepo.freebsd.org> <583f83d8-c78b-d961-d2c5-9693bd36563b@freebsd.org> <743fd126-2077-49b1-9c85-7ccc61616b98@www.fastmail.com> <460ceb98-e0c1-42b3-8e3c-2587c5ce8398@www.fastmail.com> <8215cd95-6905-49da-ab07-65796845613c@www.fastmail.com> From: Nathan Whitehorn Message-ID: <82f307a1-d7e2-0950-510d-148a1a7e61a2@freebsd.org> Date: Mon, 1 Mar 2021 11:44:59 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2021 16:45:00 -0000 On 3/1/21 11:42 AM, Kyle Evans wrote: > On Mon, Mar 1, 2021 at 10:39 AM Nathan Whitehorn wrote: >> >> >> On 2/28/21 3:44 PM, Brandon Bergren wrote: >>> On Sun, Feb 28, 2021, at 2:25 PM, Warner Losh wrote: >>>> Yes. I agree as well. I was just hoping to say just that: EFI is barely >>>> theoretically possible, but in reality we'll likely never use it.... >>>> >>>> The net effect is that we don't want to install efi on powerpc on freebsd. >>>> >>>> Warner >>>> >>> Yeah. The code before the change excluded mips and powerpc platforms, and it should continue to do so instead of using the existence of a /boot/efi directory as the only clue. >>> >>> Currently bsdinstall bails out and leaves powerpc* in a half-installed state because the die in the uname case propagates to the main script, so it never runs the bits after the bootconfig. >>> >> So that was a deliberate choice to keep the list of places that know >> about efi vs. non-EFI centralized. I'd prefer to just not make that >> directory on systems where it doesn't apply rather than messing with the >> installer. Do you know where it is being made? >> -Nathan > It's part of the hierarchy in ^/etc/mtree/BSD.root.dist > Is there a reason it needs to be? The installer bits all make it when needed already, so just removing it there seems like the simplest path. -Nathan From owner-dev-commits-src-main@freebsd.org Mon Mar 1 16:50:24 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BC943564273; Mon, 1 Mar 2021 16:50:24 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dq5q44nJbz3CMR; Mon, 1 Mar 2021 16:50:24 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qv1-f54.google.com (mail-qv1-f54.google.com [209.85.219.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 8E37E34A05; Mon, 1 Mar 2021 16:50:24 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qv1-f54.google.com with SMTP id dj14so829331qvb.1; Mon, 01 Mar 2021 08:50:24 -0800 (PST) X-Gm-Message-State: AOAM533rheAmQNdoGEDl0x2vlYvlnkAjcDxtK4gIHAoZs/VRPy4Dy8ZZ ZumnoBE2vD4AMA7+jYC9kmXB1xkj+bqTOspnG1g= X-Google-Smtp-Source: ABdhPJxxtvD84NcW4djlS83mCTjJicYJU1oKQuYygD+jaxWl/tvsCAed5xJwDmwV81mdlHqge784reCPNtxJ87LC7HY= X-Received: by 2002:a05:6214:1424:: with SMTP id o4mr15704344qvx.34.1614617424200; Mon, 01 Mar 2021 08:50:24 -0800 (PST) MIME-Version: 1.0 References: <202102232124.11NLOT27012354@gitrepo.freebsd.org> <583f83d8-c78b-d961-d2c5-9693bd36563b@freebsd.org> <743fd126-2077-49b1-9c85-7ccc61616b98@www.fastmail.com> <460ceb98-e0c1-42b3-8e3c-2587c5ce8398@www.fastmail.com> <8215cd95-6905-49da-ab07-65796845613c@www.fastmail.com> <82f307a1-d7e2-0950-510d-148a1a7e61a2@freebsd.org> In-Reply-To: <82f307a1-d7e2-0950-510d-148a1a7e61a2@freebsd.org> From: Kyle Evans Date: Mon, 1 Mar 2021 10:50:10 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 0b7472b3d8d2 - main - Mount the EFI system partition (ESP) on newly-installed systems. To: Nathan Whitehorn Cc: Brandon Bergren , Warner Losh , Kevin Bowling , Jessica Clarke , Colin Percival , src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2021 16:50:24 -0000 On Mon, Mar 1, 2021 at 10:45 AM Nathan Whitehorn wrote: > > > > On 3/1/21 11:42 AM, Kyle Evans wrote: > > On Mon, Mar 1, 2021 at 10:39 AM Nathan Whitehorn wrote: > >> > >> > >> On 2/28/21 3:44 PM, Brandon Bergren wrote: > >>> On Sun, Feb 28, 2021, at 2:25 PM, Warner Losh wrote: > >>>> Yes. I agree as well. I was just hoping to say just that: EFI is barely > >>>> theoretically possible, but in reality we'll likely never use it.... > >>>> > >>>> The net effect is that we don't want to install efi on powerpc on freebsd. > >>>> > >>>> Warner > >>>> > >>> Yeah. The code before the change excluded mips and powerpc platforms, and it should continue to do so instead of using the existence of a /boot/efi directory as the only clue. > >>> > >>> Currently bsdinstall bails out and leaves powerpc* in a half-installed state because the die in the uname case propagates to the main script, so it never runs the bits after the bootconfig. > >>> > >> So that was a deliberate choice to keep the list of places that know > >> about efi vs. non-EFI centralized. I'd prefer to just not make that > >> directory on systems where it doesn't apply rather than messing with the > >> installer. Do you know where it is being made? > >> -Nathan > > It's part of the hierarchy in ^/etc/mtree/BSD.root.dist > > > > Is there a reason it needs to be? The installer bits all make it when > needed already, so just removing it there seems like the simplest path. I can't think of a reason, as long as both the release(7) scripts and the installer create it as needed -- I note that vmimage.subr seems to create it itself, but arm.subr seems to get it wrong atm. It'll need to create /boot/efi for PART_SCHEME == GPT, and /boot/msdos should probably be scoped down to PART_SCHEME == MBR where it's used at the moment. From owner-dev-commits-src-main@freebsd.org Mon Mar 1 16:55:33 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D67A5564625; Mon, 1 Mar 2021 16:55:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dq5x15ffjz3CbG; Mon, 1 Mar 2021 16:55:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B4F7426FCD; Mon, 1 Mar 2021 16:55:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 121GtXjj063968; Mon, 1 Mar 2021 16:55:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 121GtX1M063966; Mon, 1 Mar 2021 16:55:33 GMT (envelope-from git) Date: Mon, 1 Mar 2021 16:55:33 GMT Message-Id: <202103011655.121GtX1M063966@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: af11c2029006 - main - Cirrus-CI: show mounted filesystems and free space at start MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: af11c2029006b64da41a78f2e2dcc910e13ce07a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2021 16:55:33 -0000 The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=af11c2029006b64da41a78f2e2dcc910e13ce07a commit af11c2029006b64da41a78f2e2dcc910e13ce07a Author: Ed Maste AuthorDate: 2021-03-01 03:07:05 +0000 Commit: Ed Maste CommitDate: 2021-03-01 16:54:37 +0000 Cirrus-CI: show mounted filesystems and free space at start CI runs have been encountering disk full errors. Add a `df` invocation so that we can see what we're working with. --- .cirrus.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index c577ca8aeca3..e34b99523561 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -14,7 +14,8 @@ task: timeout_in: 120m install_script: - pkg install -y qemu42 uefi-edk2-qemu-x86_64 llvm11 - setup_user_script: + setup_script: + - df -h - pw useradd user - mkdir -p /usr/obj/$(pwd -P) - chown user:user /usr/obj/$(pwd -P) From owner-dev-commits-src-main@freebsd.org Mon Mar 1 16:56:41 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 35991564721; Mon, 1 Mar 2021 16:56:41 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dq5yK0tFMz3D3Q; Mon, 1 Mar 2021 16:56:41 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from comporellon.tachypleus.net (unknown [IPv6:2601:405:4a00:acd:85ea:d09e:32a:9875]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: nwhitehorn/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id ADF0E34B76; Mon, 1 Mar 2021 16:56:40 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Subject: Re: git: 0b7472b3d8d2 - main - Mount the EFI system partition (ESP) on newly-installed systems. To: Kyle Evans Cc: Brandon Bergren , Warner Losh , Kevin Bowling , Jessica Clarke , Colin Percival , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202102232124.11NLOT27012354@gitrepo.freebsd.org> <583f83d8-c78b-d961-d2c5-9693bd36563b@freebsd.org> <743fd126-2077-49b1-9c85-7ccc61616b98@www.fastmail.com> <460ceb98-e0c1-42b3-8e3c-2587c5ce8398@www.fastmail.com> <8215cd95-6905-49da-ab07-65796845613c@www.fastmail.com> <82f307a1-d7e2-0950-510d-148a1a7e61a2@freebsd.org> From: Nathan Whitehorn Message-ID: <6a409997-24b7-1e25-33b6-a866c3790c5a@freebsd.org> Date: Mon, 1 Mar 2021 11:56:40 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2021 16:56:41 -0000 On 3/1/21 11:50 AM, Kyle Evans wrote: > On Mon, Mar 1, 2021 at 10:45 AM Nathan Whitehorn wrote: >> >> >> On 3/1/21 11:42 AM, Kyle Evans wrote: >>> On Mon, Mar 1, 2021 at 10:39 AM Nathan Whitehorn wrote: >>>> >>>> On 2/28/21 3:44 PM, Brandon Bergren wrote: >>>>> On Sun, Feb 28, 2021, at 2:25 PM, Warner Losh wrote: >>>>>> Yes. I agree as well. I was just hoping to say just that: EFI is barely >>>>>> theoretically possible, but in reality we'll likely never use it.... >>>>>> >>>>>> The net effect is that we don't want to install efi on powerpc on freebsd. >>>>>> >>>>>> Warner >>>>>> >>>>> Yeah. The code before the change excluded mips and powerpc platforms, and it should continue to do so instead of using the existence of a /boot/efi directory as the only clue. >>>>> >>>>> Currently bsdinstall bails out and leaves powerpc* in a half-installed state because the die in the uname case propagates to the main script, so it never runs the bits after the bootconfig. >>>>> >>>> So that was a deliberate choice to keep the list of places that know >>>> about efi vs. non-EFI centralized. I'd prefer to just not make that >>>> directory on systems where it doesn't apply rather than messing with the >>>> installer. Do you know where it is being made? >>>> -Nathan >>> It's part of the hierarchy in ^/etc/mtree/BSD.root.dist >>> >> Is there a reason it needs to be? The installer bits all make it when >> needed already, so just removing it there seems like the simplest path. > I can't think of a reason, as long as both the release(7) scripts and > the installer create it as needed -- I note that vmimage.subr seems to > create it itself, but arm.subr seems to get it wrong atm. It'll need > to create /boot/efi for PART_SCHEME == GPT, and /boot/msdos should > probably be scoped down to PART_SCHEME == MBR where it's used at the > moment. > I can take a look at arm.subr today. Everywhere else (the installer and vmimage.subr) create it already, since I didn't realize it was part of mtree. -Nathan From owner-dev-commits-src-main@freebsd.org Mon Mar 1 17:24:55 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DF6BC5658C1 for ; Mon, 1 Mar 2021 17:24:55 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x831.google.com (mail-qt1-x831.google.com [IPv6:2607:f8b0:4864:20::831]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dq6Zv5K0Rz3Fwq for ; Mon, 1 Mar 2021 17:24:55 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x831.google.com with SMTP id 18so9947353qty.3 for ; Mon, 01 Mar 2021 09:24:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=vB8sWkJ6mWtwfb+ywf/YDRbHtUOAArg1rmqQRWL2qjc=; b=rsqppuwpuVyp/yvvmbiNTujaxPCOrGIXkSzBfZPpJUDFSoq3tQZQ8tCBKiGuQH6Kfw r3G/bec6bNJrYsYvQ6QKAqSwdey6on6Ksijj45UfwGmkiGT/a2EZjTb6C9vQhQCYkgr+ Wg6U3nqSK/D5ZKkd8STDWwE5w5od9TUC23KJ0py4kwWpqgZSE58lYIoyttLlamNZh0hv +UDadOKwE6fFlySpsRkwXnOvF7ZhLa7xRmZlXL+nek0t0n/T8i/p5fZgENMrrZOeklTp i1egkeF2i1swLINigAAHxMOu76mHNp9/tdqu14bCTKCRTg6Qx04noAO/k7ZNQXo9xzsq EDTA== 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=vB8sWkJ6mWtwfb+ywf/YDRbHtUOAArg1rmqQRWL2qjc=; b=dlQj0+EnMljTkgD804WyyWQSYesCbSM7vS79ePR/6glK+jHVHl+je9eJFVH1pkAyA8 jdexhP0qS2Dtosb4ISGO/BF4BHJuffHG7tMhOXoioelZYvyHFUrVd05MPqEPRef6sQU8 lZHdkjXd75LoywLISmzPK0P5GvyOISA81qc/sgODqy/QZT8MdhOeNxzR9/L8VAe0hAyh bIJ3lji9p+ZpY4PwEyqd/hSSoaWIAe4CBb5aOItj1awmu0wn3GJgyuZFPYMeUx8Y7jv5 z489NE2BmRQ1qtHIGra4qZzAVsUCx7Kcck0og6q/hSaQWNypuczcM8sUvXPJB8WTmkjm tw4w== X-Gm-Message-State: AOAM531VW8C/XLtL949CXv0ziM8TxkCuU6iuO5ew2lV3N4AnmoTp1M4x DZh8GHu2804XxI6UbjPF5h+Z9bDtNEXmVV/BlVW6fQ== X-Google-Smtp-Source: ABdhPJy9y7wtaDh559vd7SHBARfgzijpD1GxMnNJJPXf9H3IKB3UDLxUtoh+/WYrxlLP2hdczh+jAqHEsmL9/hXyr78= X-Received: by 2002:a05:622a:1c9:: with SMTP id t9mr14440370qtw.244.1614619494757; Mon, 01 Mar 2021 09:24:54 -0800 (PST) MIME-Version: 1.0 References: <202102232124.11NLOT27012354@gitrepo.freebsd.org> <583f83d8-c78b-d961-d2c5-9693bd36563b@freebsd.org> <743fd126-2077-49b1-9c85-7ccc61616b98@www.fastmail.com> <460ceb98-e0c1-42b3-8e3c-2587c5ce8398@www.fastmail.com> <8215cd95-6905-49da-ab07-65796845613c@www.fastmail.com> <82f307a1-d7e2-0950-510d-148a1a7e61a2@freebsd.org> In-Reply-To: From: Warner Losh Date: Mon, 1 Mar 2021 10:24:43 -0700 Message-ID: Subject: Re: git: 0b7472b3d8d2 - main - Mount the EFI system partition (ESP) on newly-installed systems. To: Kyle Evans Cc: Nathan Whitehorn , Brandon Bergren , Kevin Bowling , Jessica Clarke , Colin Percival , src-committers , "" , dev-commits-src-main@freebsd.org X-Rspamd-Queue-Id: 4Dq6Zv5K0Rz3Fwq X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2021 17:24:55 -0000 On Mon, Mar 1, 2021 at 9:50 AM Kyle Evans wrote: > On Mon, Mar 1, 2021 at 10:45 AM Nathan Whitehorn > wrote: > > > > > > > > On 3/1/21 11:42 AM, Kyle Evans wrote: > > > On Mon, Mar 1, 2021 at 10:39 AM Nathan Whitehorn < > nwhitehorn@freebsd.org> wrote: > > >> > > >> > > >> On 2/28/21 3:44 PM, Brandon Bergren wrote: > > >>> On Sun, Feb 28, 2021, at 2:25 PM, Warner Losh wrote: > > >>>> Yes. I agree as well. I was just hoping to say just that: EFI is > barely > > >>>> theoretically possible, but in reality we'll likely never use it.... > > >>>> > > >>>> The net effect is that we don't want to install efi on powerpc on > freebsd. > > >>>> > > >>>> Warner > > >>>> > > >>> Yeah. The code before the change excluded mips and powerpc > platforms, and it should continue to do so instead of using the existence > of a /boot/efi directory as the only clue. > > >>> > > >>> Currently bsdinstall bails out and leaves powerpc* in a > half-installed state because the die in the uname case propagates to the > main script, so it never runs the bits after the bootconfig. > > >>> > > >> So that was a deliberate choice to keep the list of places that know > > >> about efi vs. non-EFI centralized. I'd prefer to just not make that > > >> directory on systems where it doesn't apply rather than messing with > the > > >> installer. Do you know where it is being made? > > >> -Nathan > > > It's part of the hierarchy in ^/etc/mtree/BSD.root.dist > > > > > > > Is there a reason it needs to be? The installer bits all make it when > > needed already, so just removing it there seems like the simplest path. > > I can't think of a reason, as long as both the release(7) scripts and > the installer create it as needed -- I note that vmimage.subr seems to > create it itself, but arm.subr seems to get it wrong atm. It'll need > to create /boot/efi for PART_SCHEME == GPT, and /boot/msdos should > probably be scoped down to PART_SCHEME == MBR where it's used at the > moment. > I think that it should be /boot/efi for both, with a symlink from /boot/msdos to /boot/efi so we can migrate away from that old scheme... Warner From owner-dev-commits-src-main@freebsd.org Mon Mar 1 17:54:01 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F0071566584; Mon, 1 Mar 2021 17:54:01 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dq7DT6MlCz3HSd; Mon, 1 Mar 2021 17:54:01 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from comporellon.tachypleus.net (unknown [IPv6:2601:405:4a00:acd:85ea:d09e:32a:9875]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: nwhitehorn/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 7407734F9E; Mon, 1 Mar 2021 17:54:01 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) To: Kyle Evans Cc: Brandon Bergren , Warner Losh , Kevin Bowling , Jessica Clarke , Colin Percival , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202102232124.11NLOT27012354@gitrepo.freebsd.org> <583f83d8-c78b-d961-d2c5-9693bd36563b@freebsd.org> <743fd126-2077-49b1-9c85-7ccc61616b98@www.fastmail.com> <460ceb98-e0c1-42b3-8e3c-2587c5ce8398@www.fastmail.com> <8215cd95-6905-49da-ab07-65796845613c@www.fastmail.com> <82f307a1-d7e2-0950-510d-148a1a7e61a2@freebsd.org> From: Nathan Whitehorn Subject: Re: git: 0b7472b3d8d2 - main - Mount the EFI system partition (ESP) on newly-installed systems. Message-ID: Date: Mon, 1 Mar 2021 12:54:00 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Content-Language: en-US X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2021 17:54:02 -0000 On 3/1/21 11:50 AM, Kyle Evans wrote: > On Mon, Mar 1, 2021 at 10:45 AM Nathan Whitehorn wrote: >> >> >> On 3/1/21 11:42 AM, Kyle Evans wrote: >>> On Mon, Mar 1, 2021 at 10:39 AM Nathan Whitehorn wrote: >>>> >>>> On 2/28/21 3:44 PM, Brandon Bergren wrote: >>>>> On Sun, Feb 28, 2021, at 2:25 PM, Warner Losh wrote: >>>>>> Yes. I agree as well. I was just hoping to say just that: EFI is b= arely >>>>>> theoretically possible, but in reality we'll likely never use it..= =2E. >>>>>> >>>>>> The net effect is that we don't want to install efi on powerpc on = freebsd. >>>>>> >>>>>> Warner >>>>>> >>>>> Yeah. The code before the change excluded mips and powerpc platform= s, and it should continue to do so instead of using the existence of a /b= oot/efi directory as the only clue. >>>>> >>>>> Currently bsdinstall bails out and leaves powerpc* in a half-instal= led state because the die in the uname case propagates to the main script= , so it never runs the bits after the bootconfig. >>>>> >>>> So that was a deliberate choice to keep the list of places that know= >>>> about efi vs. non-EFI centralized. I'd prefer to just not make that >>>> directory on systems where it doesn't apply rather than messing with= the >>>> installer. Do you know where it is being made? >>>> -Nathan >>> It's part of the hierarchy in ^/etc/mtree/BSD.root.dist >>> >> Is there a reason it needs to be? The installer bits all make it when >> needed already, so just removing it there seems like the simplest path= =2E > I can't think of a reason, as long as both the release(7) scripts and > the installer create it as needed -- I note that vmimage.subr seems to > create it itself, but arm.subr seems to get it wrong atm. It'll need > to create /boot/efi for PART_SCHEME =3D=3D GPT, and /boot/msdos should > probably be scoped down to PART_SCHEME =3D=3D MBR where it's used at th= e > moment. > The /boot/uboot in BSD.root.dist also looks like cruft to me, but maybe=20 best to leave for now? -Nathan From owner-dev-commits-src-main@freebsd.org Mon Mar 1 18:28:34 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3DCB65674E9; Mon, 1 Mar 2021 18:28:34 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dq80L0tC8z3Kpq; Mon, 1 Mar 2021 18:28:34 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com [66.111.4.227]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bdragon/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 0A12635491; Mon, 1 Mar 2021 18:28:34 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailauth.nyi.internal (Postfix) with ESMTP id 586B827C0054; Mon, 1 Mar 2021 13:28:33 -0500 (EST) Received: from imap38 ([10.202.2.88]) by compute3.internal (MEProxy); Mon, 01 Mar 2021 13:28:33 -0500 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrleekgdduuddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdluddtmdenucfjughrpefofgggkfgjfhffhffvufgtsehttdertder reejnecuhfhrohhmpedfuehrrghnughonhcuuegvrhhgrhgvnhdfuceosggurhgrghhonh eshfhrvggvuefuffdrohhrgheqnecuggftrfgrthhtvghrnhepjefhfedtuddtleegkeeg tdegjeekffdvjedttdehgffgveeugffgfeelvdeghffgnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepsggurhgrghhonhdomhgvshhmthhprghu thhhphgvrhhsohhnrghlihhthidquddtgedvfeehkeeigedqudekuddtkeehuddqsggurh grghhonheppefhrhgvvgeuufffrdhorhhgsehimhgrphdrtggt X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 99480CA005D; Mon, 1 Mar 2021 13:28:32 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-206-g078a48fda5-fm-20210226.001-g078a48fd Mime-Version: 1.0 Message-Id: In-Reply-To: References: <202102232124.11NLOT27012354@gitrepo.freebsd.org> <583f83d8-c78b-d961-d2c5-9693bd36563b@freebsd.org> <743fd126-2077-49b1-9c85-7ccc61616b98@www.fastmail.com> <460ceb98-e0c1-42b3-8e3c-2587c5ce8398@www.fastmail.com> <8215cd95-6905-49da-ab07-65796845613c@www.fastmail.com> <82f307a1-d7e2-0950-510d-148a1a7e61a2@freebsd.org> Date: Mon, 01 Mar 2021 12:28:12 -0600 From: "Brandon Bergren" To: "Nathan Whitehorn" , "Kyle Evans" Cc: "Warner Losh" , "Kevin Bowling" , "Jessica Clarke" , "Colin Percival" , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: =?UTF-8?Q?Re:_git:_0b7472b3d8d2_-_main_-_Mount_the_EFI_system_partition_?= =?UTF-8?Q?(ESP)_on_newly-installed_systems.?= Content-Type: text/plain X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2021 18:28:34 -0000 On Mon, Mar 1, 2021, at 11:54 AM, Nathan Whitehorn wrote: > The /boot/uboot in BSD.root.dist also looks like cruft to me, but maybe > best to leave for now? > -Nathan It's used on Book-E powerpc* in some cases (and the bootloader is compiled and installed there by default on powerpc*) but it's a regular directory. I don't believe there's any custom behavior to treat it as a mount point because setting up booting is a machine specific thing in this case, and the user is expected to do something like copy it to the boot server or a partition on the bootstrap media. For example, on the X5000, the boot firmware is stored on an onboard SD card that has space left to install loaders and stuff, but this is something that is set up by hand. -- Brandon Bergren bdragon@FreeBSD.org From owner-dev-commits-src-main@freebsd.org Mon Mar 1 18:38:45 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4A2DD567D52; Mon, 1 Mar 2021 18:38:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dq8D519lnz3M7F; Mon, 1 Mar 2021 18:38:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1B0B2374; Mon, 1 Mar 2021 18:38:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 121Icjwn096414; Mon, 1 Mar 2021 18:38:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 121IciVK096411; Mon, 1 Mar 2021 18:38:44 GMT (envelope-from git) Date: Mon, 1 Mar 2021 18:38:44 GMT Message-Id: <202103011838.121IciVK096411@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 60c4ec806dfd - main - jail: allow root to implicitly widen its cpuset to attach MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 60c4ec806dfd0f79edf8ca3abc04bbb69c0418f7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2021 18:38:45 -0000 The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=60c4ec806dfd0f79edf8ca3abc04bbb69c0418f7 commit 60c4ec806dfd0f79edf8ca3abc04bbb69c0418f7 Author: Kyle Evans AuthorDate: 2021-02-26 21:46:47 +0000 Commit: Kyle Evans CommitDate: 2021-03-01 18:38:31 +0000 jail: allow root to implicitly widen its cpuset to attach The default behavior for attaching processes to jails is that the jail's cpuset augments the attaching processes, so that it cannot be used to escalate a user's ability to take advantage of more CPUs than the administrator wanted them to. This is problematic when root needs to manage jails that have disjoint sets with whatever process is attaching, as this would otherwise result in a deadlock. Therefore, if we did not have an appropriate common subset of cpus/domains for our new policy, we now allow the process to simply take on the jail set *if* it has the privilege to widen its mask anyways. With the new logic, root can still usefully cpuset a process that attaches to a jail with the desire of maintaining the set it was given pre-attachment while still retaining the ability to manage child jails without jumping through hoops. A test has been added to demonstrate the issue; cpuset of a process down to just the first CPU and attempting to attach to a jail without access to any of the same CPUs previously resulted in EDEADLK and now results in taking on the jail's mask for privileged users. PR: 253724 Reviewed by: jamie (also discussed with) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D28952 --- lib/libc/tests/sys/cpuset_test.c | 203 ++++++++++++++++++++++++++++++++++++++- sys/kern/kern_cpuset.c | 8 ++ 2 files changed, 210 insertions(+), 1 deletion(-) diff --git a/lib/libc/tests/sys/cpuset_test.c b/lib/libc/tests/sys/cpuset_test.c index d6dd69e7e3c1..52c0dc877ab8 100644 --- a/lib/libc/tests/sys/cpuset_test.c +++ b/lib/libc/tests/sys/cpuset_test.c @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2020 Kyle Evans + * Copyright (c) 2020-2021 Kyle Evans * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -31,6 +31,8 @@ __FBSDID("$FreeBSD"); #include #include #include +#include +#include #include #include #include @@ -64,6 +66,10 @@ typedef void (*jail_test_cb)(struct jail_test_cb_params *); #define FAILURE_JAILSET 44 #define FAILURE_PIDSET 45 #define FAILURE_SEND 46 +#define FAILURE_DEADLK 47 +#define FAILURE_ATTACH 48 +#define FAILURE_BADAFFIN 49 +#define FAILURE_SUCCESS 50 static const char * do_jail_errstr(int error) @@ -80,6 +86,14 @@ do_jail_errstr(int error) return ("Failed to get the pid setid"); case FAILURE_SEND: return ("Failed to send(2) cpuset information"); + case FAILURE_DEADLK: + return ("Deadlock hit trying to attach to jail"); + case FAILURE_ATTACH: + return ("jail_attach(2) failed"); + case FAILURE_BADAFFIN: + return ("Unexpected post-attach affinity"); + case FAILURE_SUCCESS: + return ("jail_attach(2) succeeded, but should have failed."); default: return (NULL); } @@ -444,6 +458,192 @@ ATF_TC_BODY(jail_attach_plain, tc) do_jail_test(1, false, &jail_attach_plain_pro, &jail_attach_jset_epi); } +static int +jail_attach_disjoint_newjail(int fd) +{ + struct iovec iov[2]; + char *name; + int jid; + + if (asprintf(&name, "cpuset_%d", getpid()) == -1) + _exit(42); + + iov[0].iov_base = "name"; + iov[0].iov_len = sizeof("name"); + + iov[1].iov_base = name; + iov[1].iov_len = strlen(name) + 1; + + if ((jid = jail_set(iov, 2, JAIL_CREATE | JAIL_ATTACH)) < 0) + return (FAILURE_JAIL); + + /* Signal that we're ready. */ + write(fd, &jid, sizeof(jid)); + for (;;) { + /* Spin */ + } +} + +static int +wait_jail(int fd, int pfd) +{ + fd_set lset; + struct timeval tv; + int error, jid, maxfd; + + FD_ZERO(&lset); + FD_SET(fd, &lset); + FD_SET(pfd, &lset); + + maxfd = MAX(fd, pfd); + + tv.tv_sec = 5; + tv.tv_usec = 0; + + /* Wait for jid to be written. */ + do { + error = select(maxfd + 1, &lset, NULL, NULL, &tv); + } while (error == -1 && errno == EINTR); + + if (error == 0) { + atf_tc_fail("Jail creator did not respond in time."); + } + + ATF_REQUIRE_MSG(error > 0, "Unexpected error %d from select()", errno); + + if (FD_ISSET(pfd, &lset)) { + /* Process died */ + atf_tc_fail("Jail creator died unexpectedly."); + } + + ATF_REQUIRE(FD_ISSET(fd, &lset)); + ATF_REQUIRE_EQ(sizeof(jid), recv(fd, &jid, sizeof(jid), 0)); + + return (jid); +} + +static int +try_attach_child(int jid, cpuset_t *expected_mask) +{ + cpuset_t mask; + + if (jail_attach(jid) == -1) { + if (errno == EDEADLK) + return (FAILURE_DEADLK); + return (FAILURE_ATTACH); + } + + if (expected_mask == NULL) + return (FAILURE_SUCCESS); + + /* If we had an expected mask, check it against the new process mask. */ + CPU_ZERO(&mask); + if (cpuset_getaffinity(CPU_LEVEL_CPUSET, CPU_WHICH_PID, + -1, sizeof(mask), &mask) != 0) { + return (FAILURE_MASK); + } + + if (CPU_CMP(expected_mask, &mask) != 0) + return (FAILURE_BADAFFIN); + + return (0); +} + +static void +try_attach(int jid, cpuset_t *expected_mask) +{ + const char *errstr; + pid_t pid; + int error, fail, status; + + ATF_REQUIRE(expected_mask != NULL); + ATF_REQUIRE((pid = fork()) != -1); + if (pid == 0) + _exit(try_attach_child(jid, expected_mask)); + + while ((error = waitpid(pid, &status, 0)) == -1 && errno == EINTR) { + /* Try again. */ + } + + /* Sanity check the exit info. */ + ATF_REQUIRE_EQ(pid, error); + ATF_REQUIRE(WIFEXITED(status)); + if ((fail = WEXITSTATUS(status)) != 0) { + errstr = do_jail_errstr(fail); + if (errstr != NULL) + atf_tc_fail("%s", errstr); + else + atf_tc_fail("Unknown error '%d'", WEXITSTATUS(status)); + } +} + +ATF_TC(jail_attach_disjoint); +ATF_TC_HEAD(jail_attach_disjoint, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Test root attachment into completely disjoint jail cpuset."); + atf_tc_set_md_var(tc, "require.user", "root"); +} +ATF_TC_BODY(jail_attach_disjoint, tc) +{ + cpuset_t smask, jmask; + int sockpair[2]; + cpusetid_t setid; + pid_t pid; + int fcpu, jid, pfd, sock, scpu; + + ATF_REQUIRE_EQ(0, cpuset(&setid)); + + skip_ltncpu(2, &jmask); + fcpu = CPU_FFS(&jmask) - 1; + ATF_REQUIRE_EQ(0, socketpair(PF_UNIX, SOCK_STREAM, 0, sockpair)); + + /* We'll wait on the procdesc, too, so we can fail faster if it dies. */ + ATF_REQUIRE((pid = pdfork(&pfd, 0)) != -1); + + if (pid == 0) { + /* First child sets up the jail. */ + sock = sockpair[SP_CHILD]; + close(sockpair[SP_PARENT]); + + _exit(jail_attach_disjoint_newjail(sock)); + } + + close(sockpair[SP_CHILD]); + sock = sockpair[SP_PARENT]; + + ATF_REQUIRE((jid = wait_jail(sock, pfd)) > 0); + + /* + * This process will be clamped down to the first cpu, while the jail + * will simply have the first CPU removed to make it a completely + * disjoint operation. + */ + CPU_ZERO(&smask); + CPU_SET(fcpu, &smask); + CPU_CLR(fcpu, &jmask); + + /* + * We'll test with the first and second cpu set as well. Only the + * second cpu should be used. + */ + scpu = CPU_FFS(&jmask) - 1; + + ATF_REQUIRE_EQ(0, cpuset_setaffinity(CPU_LEVEL_ROOT, CPU_WHICH_JAIL, + jid, sizeof(jmask), &jmask)); + ATF_REQUIRE_EQ(0, cpuset_setaffinity(CPU_LEVEL_CPUSET, CPU_WHICH_CPUSET, + setid, sizeof(smask), &smask)); + + try_attach(jid, &jmask); + + CPU_SET(scpu, &smask); + ATF_REQUIRE_EQ(0, cpuset_setaffinity(CPU_LEVEL_CPUSET, CPU_WHICH_CPUSET, + setid, sizeof(smask), &smask)); + + CPU_CLR(fcpu, &smask); + try_attach(jid, &smask); +} + ATF_TC(badparent); ATF_TC_HEAD(badparent, tc) { @@ -488,6 +688,7 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, jail_attach_newbase_plain); ATF_TP_ADD_TC(tp, jail_attach_prevbase); ATF_TP_ADD_TC(tp, jail_attach_plain); + ATF_TP_ADD_TC(tp, jail_attach_disjoint); ATF_TP_ADD_TC(tp, badparent); return (atf_no_error()); } diff --git a/sys/kern/kern_cpuset.c b/sys/kern/kern_cpuset.c index 18cc0c56d697..19ad3fd20955 100644 --- a/sys/kern/kern_cpuset.c +++ b/sys/kern/kern_cpuset.c @@ -1255,6 +1255,11 @@ cpuset_setproc(pid_t pid, struct cpuset *set, cpuset_t *mask, * as the parent, then we'll check if the process was previously using * the root set and, if it wasn't, create a new base with the process's * mask applied to it. + * + * If the new root is incompatible with the existing mask, then we allow + * the process to take on the new root if and only if they have + * privilege to widen their mask anyways. Unprivileged processes get + * rejected with EDEADLK. */ if (set != NULL && rebase && nroot != tdroot) { cpusetid_t base_id, root_id; @@ -1265,6 +1270,9 @@ cpuset_setproc(pid_t pid, struct cpuset *set, cpuset_t *mask, if (base_id != root_id) { error = cpuset_setproc_newbase(td, set, nroot, &base, &freelist, &domainlist); + if (error == EDEADLK && + priv_check(td, PRIV_SCHED_CPUSET) == 0) + error = 0; if (error != 0) goto unlock_out; } From owner-dev-commits-src-main@freebsd.org Mon Mar 1 19:34:56 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 72AC154A09C; Mon, 1 Mar 2021 19:34:56 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dq9Sw2QX1z3jqh; Mon, 1 Mar 2021 19:34:56 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from comporellon.tachypleus.net (unknown [IPv6:2601:405:4a00:acd:85ea:d09e:32a:9875]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: nwhitehorn/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id D950F35E99; Mon, 1 Mar 2021 19:34:55 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Subject: Re: git: 0b7472b3d8d2 - main - Mount the EFI system partition (ESP) on newly-installed systems. To: Brandon Bergren , Kyle Evans Cc: Warner Losh , Kevin Bowling , Jessica Clarke , Colin Percival , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202102232124.11NLOT27012354@gitrepo.freebsd.org> <460ceb98-e0c1-42b3-8e3c-2587c5ce8398@www.fastmail.com> <8215cd95-6905-49da-ab07-65796845613c@www.fastmail.com> <82f307a1-d7e2-0950-510d-148a1a7e61a2@freebsd.org> <6611975a-f126-4a65-9a48-d3ed73c4d073@www.fastmail.com> From: Nathan Whitehorn Message-ID: <836d1eb1-83dd-e704-56c3-e351e7817c59@freebsd.org> Date: Mon, 1 Mar 2021 14:34:55 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: <6611975a-f126-4a65-9a48-d3ed73c4d073@www.fastmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2021 19:34:56 -0000 On 3/1/21 1:39 PM, Brandon Bergren wrote: > On Mon, Mar 1, 2021, at 12:28 PM, Brandon Bergren wrote: >> >> On Mon, Mar 1, 2021, at 11:54 AM, Nathan Whitehorn wrote: >>> The /boot/uboot in BSD.root.dist also looks like cruft to me, but maybe >>> best to leave for now? >>> -Nathan >> It's used on Book-E powerpc* in some cases (and the bootloader is >> compiled and installed there by default on powerpc*) but it's a regular >> directory. I don't believe there's any custom behavior to treat it as a >> mount point because setting up booting is a machine specific thing in >> this case, and the user is expected to do something like copy it to the >> boot server or a partition on the bootstrap media. >> >> For example, on the X5000, the boot firmware is stored on an onboard SD >> card that has space left to install loaders and stuff, but this is >> something that is set up by hand. >> > Another thing to be aware of: > > On PowerNV (and Playstation 3, although that has bitrotted a bit), we currently use a ms-basic-data or fat32 partition mounted as /boot so that petitboot can load the kernel for direct execution. We do this because fat32 is the only filesystem we have in common with petitboot that we can easily write to. > > Be aware of this when changing detection behavior that we do in fact need this mounted as /boot and not as a subdirectory because of the way we currently do direct-execution on PowerNV. At the moment the behavior is isolated in partedit/partedit.powerpc but if the generic scripts are changed in a way where some assumption that /boot itself lives on the root filesystem comes into play, that they will have to special-case this. > This is one reason I really don't want any of this mechanism to be generic. I'd like the knowledge about the layout to be limited to the partition editor, which can signal to later parts of the install/upgrade process as needed. As written here for EFI, it is meant to do this by the presence of the EFI partition. -Nathan From owner-dev-commits-src-main@freebsd.org Mon Mar 1 19:56:26 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E4A5C54A4C3; Mon, 1 Mar 2021 19:56:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dq9xk614yz3kwL; Mon, 1 Mar 2021 19:56:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C0E7B1716; Mon, 1 Mar 2021 19:56:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 121JuQH5002711; Mon, 1 Mar 2021 19:56:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 121JuQjX002710; Mon, 1 Mar 2021 19:56:26 GMT (envelope-from git) Date: Mon, 1 Mar 2021 19:56:26 GMT Message-Id: <202103011956.121JuQjX002710@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: 96a9e50e63bf - main - ptrace_test: Add more debug output on test failures MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 96a9e50e63bfcbca7309c012c2c7a477c8826824 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2021 19:56:27 -0000 The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=96a9e50e63bfcbca7309c012c2c7a477c8826824 commit 96a9e50e63bfcbca7309c012c2c7a477c8826824 Author: Alex Richardson AuthorDate: 2021-03-01 18:49:31 +0000 Commit: Alex Richardson CommitDate: 2021-03-01 19:55:43 +0000 ptrace_test: Add more debug output on test failures Mostly automatic, using `CHILD_REQUIRE\(([^|&\n]*) ==` -> `CHILD_REQUIRE_EQ_INT($1,` `ATF_REQUIRE\(([^|&\n]*) ==` -> `REQUIRE_EQ_INT($1,` followed by git-clang-format -f and then manually checking ones that contain ||/&&. Test Plan: Still getting the same failure but now it prints `psr.sr_error (0) == EBADF (9) not met` instead of just failing without printing the values. PR: 243605 Reviewed By: jhb Differential Revision: https://reviews.freebsd.org/D28887 --- tests/sys/kern/ptrace_test.c | 1516 +++++++++++++++++++++--------------------- 1 file changed, 770 insertions(+), 746 deletions(-) diff --git a/tests/sys/kern/ptrace_test.c b/tests/sys/kern/ptrace_test.c index 5422cce80713..a5655008eaa1 100644 --- a/tests/sys/kern/ptrace_test.c +++ b/tests/sys/kern/ptrace_test.c @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -88,22 +89,45 @@ __FBSDID("$FreeBSD$"); * processes. This only works if the parent process is tripped up by * the early exit and fails some requirement itself. */ -#define CHILD_REQUIRE(exp) do { \ - if (!(exp)) \ - child_fail_require(__FILE__, __LINE__, \ - #exp " not met"); \ - } while (0) +#define CHILD_REQUIRE(exp) do { \ + if (!(exp)) \ + child_fail_require(__FILE__, __LINE__, \ + #exp " not met\n"); \ +} while (0) + +#define CHILD_REQUIRE_EQ(actual, expected) do { \ + __typeof__(expected) _e = expected; \ + __typeof__(actual) _a = actual; \ + if (_e != _a) \ + child_fail_require(__FILE__, __LINE__, #actual \ + " (%jd) == " #expected " (%jd) not met\n", \ + (intmax_t)_a, (intmax_t)_e); \ +} while (0) static __dead2 void -child_fail_require(const char *file, int line, const char *str) +child_fail_require(const char *file, int line, const char *fmt, ...) { - char buf[128]; + va_list ap; + char buf[1024]; + + /* Use write() not fprintf() to avoid possible duplicate output. */ + snprintf(buf, sizeof(buf), "%s:%d: ", file, line); + write(STDERR_FILENO, buf, strlen(buf)); + va_start(ap, fmt); + vsnprintf(buf, sizeof(buf), fmt, ap); + write(STDERR_FILENO, buf, strlen(buf)); + va_end(ap); - snprintf(buf, sizeof(buf), "%s:%d: %s\n", file, line, str); - write(2, buf, strlen(buf)); _exit(32); } +#define REQUIRE_EQ(actual, expected) do { \ + __typeof__(expected) _e = expected; \ + __typeof__(actual) _a = actual; \ + ATF_REQUIRE_MSG(_e == _a, #actual " (%jd) == " \ + #expected " (%jd) not met", (intmax_t)_a, (intmax_t)_e); \ +} while (0) + static void trace_me(void) { @@ -121,12 +145,12 @@ attach_child(pid_t pid) pid_t wpid; int status; - ATF_REQUIRE(ptrace(PT_ATTACH, pid, NULL, 0) == 0); + REQUIRE_EQ(ptrace(PT_ATTACH, pid, NULL, 0), 0); wpid = waitpid(pid, &status, 0); - ATF_REQUIRE(wpid == pid); + REQUIRE_EQ(wpid, pid); ATF_REQUIRE(WIFSTOPPED(status)); - ATF_REQUIRE(WSTOPSIG(status) == SIGSTOP); + REQUIRE_EQ(WSTOPSIG(status), SIGSTOP); } static void @@ -152,7 +176,7 @@ wait_for_zombie(pid_t pid) mib[3] = pid; len = sizeof(kp); if (sysctl(mib, nitems(mib), &kp, &len, NULL, 0) == -1) { - ATF_REQUIRE(errno == ESRCH); + REQUIRE_EQ(errno, ESRCH); break; } if (kp.ki_stat == SZOMB) @@ -183,23 +207,23 @@ ATF_TC_BODY(ptrace__parent_wait_after_trace_me, tc) /* The first wait() should report the stop from SIGSTOP. */ wpid = waitpid(child, &status, 0); - ATF_REQUIRE(wpid == child); + REQUIRE_EQ(wpid, child); ATF_REQUIRE(WIFSTOPPED(status)); - ATF_REQUIRE(WSTOPSIG(status) == SIGSTOP); + REQUIRE_EQ(WSTOPSIG(status), SIGSTOP); /* Continue the child ignoring the SIGSTOP. */ ATF_REQUIRE(ptrace(PT_CONTINUE, child, (caddr_t)1, 0) != -1); /* The second wait() should report the exit status. */ wpid = waitpid(child, &status, 0); - ATF_REQUIRE(wpid == child); + REQUIRE_EQ(wpid, child); ATF_REQUIRE(WIFEXITED(status)); - ATF_REQUIRE(WEXITSTATUS(status) == 1); + REQUIRE_EQ(WEXITSTATUS(status), 1); /* The child should no longer exist. */ wpid = waitpid(child, &status, 0); - ATF_REQUIRE(wpid == -1); - ATF_REQUIRE(errno == ECHILD); + REQUIRE_EQ(wpid, -1); + REQUIRE_EQ(errno, ECHILD); } /* @@ -216,14 +240,14 @@ ATF_TC_BODY(ptrace__parent_wait_after_attach, tc) if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) atf_tc_skip("https://bugs.freebsd.org/244055"); - ATF_REQUIRE(pipe(cpipe) == 0); + REQUIRE_EQ(pipe(cpipe), 0); ATF_REQUIRE((child = fork()) != -1); if (child == 0) { /* Child process. */ close(cpipe[0]); /* Wait for the parent to attach. */ - CHILD_REQUIRE(read(cpipe[1], &c, sizeof(c)) == 0); + CHILD_REQUIRE_EQ(0, read(cpipe[1], &c, sizeof(c))); _exit(1); } @@ -242,14 +266,14 @@ ATF_TC_BODY(ptrace__parent_wait_after_attach, tc) /* The second wait() should report the exit status. */ wpid = waitpid(child, &status, 0); - ATF_REQUIRE(wpid == child); + REQUIRE_EQ(wpid, child); ATF_REQUIRE(WIFEXITED(status)); - ATF_REQUIRE(WEXITSTATUS(status) == 1); + REQUIRE_EQ(WEXITSTATUS(status), 1); /* The child should no longer exist. */ wpid = waitpid(child, &status, 0); - ATF_REQUIRE(wpid == -1); - ATF_REQUIRE(errno == ECHILD); + REQUIRE_EQ(wpid, -1); + REQUIRE_EQ(errno, ECHILD); } /* @@ -266,7 +290,7 @@ ATF_TC_BODY(ptrace__parent_sees_exit_after_child_debugger, tc) if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) atf_tc_skip("https://bugs.freebsd.org/239399"); - ATF_REQUIRE(pipe(cpipe) == 0); + REQUIRE_EQ(pipe(cpipe), 0); ATF_REQUIRE((child = fork()) != -1); if (child == 0) { @@ -274,13 +298,13 @@ ATF_TC_BODY(ptrace__parent_sees_exit_after_child_debugger, tc) close(cpipe[0]); /* Wait for parent to be ready. */ - CHILD_REQUIRE(read(cpipe[1], &c, sizeof(c)) == sizeof(c)); + CHILD_REQUIRE_EQ(read(cpipe[1], &c, sizeof(c)), sizeof(c)); _exit(1); } close(cpipe[1]); - ATF_REQUIRE(pipe(dpipe) == 0); + REQUIRE_EQ(pipe(dpipe), 0); ATF_REQUIRE((debugger = fork()) != -1); if (debugger == 0) { @@ -290,22 +314,22 @@ ATF_TC_BODY(ptrace__parent_sees_exit_after_child_debugger, tc) CHILD_REQUIRE(ptrace(PT_ATTACH, child, NULL, 0) != -1); wpid = waitpid(child, &status, 0); - CHILD_REQUIRE(wpid == child); + CHILD_REQUIRE_EQ(wpid, child); CHILD_REQUIRE(WIFSTOPPED(status)); - CHILD_REQUIRE(WSTOPSIG(status) == SIGSTOP); + CHILD_REQUIRE_EQ(WSTOPSIG(status), SIGSTOP); CHILD_REQUIRE(ptrace(PT_CONTINUE, child, (caddr_t)1, 0) != -1); /* Signal parent that debugger is attached. */ - CHILD_REQUIRE(write(dpipe[1], &c, sizeof(c)) == sizeof(c)); + CHILD_REQUIRE_EQ(write(dpipe[1], &c, sizeof(c)), sizeof(c)); /* Wait for parent's failed wait. */ - CHILD_REQUIRE(read(dpipe[1], &c, sizeof(c)) == 0); + CHILD_REQUIRE_EQ(read(dpipe[1], &c, sizeof(c)), 0); wpid = waitpid(child, &status, 0); - CHILD_REQUIRE(wpid == child); + CHILD_REQUIRE_EQ(wpid, child); CHILD_REQUIRE(WIFEXITED(status)); - CHILD_REQUIRE(WEXITSTATUS(status) == 1); + CHILD_REQUIRE_EQ(WEXITSTATUS(status), 1); _exit(0); } @@ -314,11 +338,11 @@ ATF_TC_BODY(ptrace__parent_sees_exit_after_child_debugger, tc) /* Parent process. */ /* Wait for the debugger to attach to the child. */ - ATF_REQUIRE(read(dpipe[0], &c, sizeof(c)) == sizeof(c)); + REQUIRE_EQ(read(dpipe[0], &c, sizeof(c)), sizeof(c)); /* Release the child. */ - ATF_REQUIRE(write(cpipe[0], &c, sizeof(c)) == sizeof(c)); - ATF_REQUIRE(read(cpipe[0], &c, sizeof(c)) == 0); + REQUIRE_EQ(write(cpipe[0], &c, sizeof(c)), sizeof(c)); + REQUIRE_EQ(read(cpipe[0], &c, sizeof(c)), 0); close(cpipe[0]); wait_for_zombie(child); @@ -329,22 +353,22 @@ ATF_TC_BODY(ptrace__parent_sees_exit_after_child_debugger, tc) * until the debugger sees the exit. */ wpid = waitpid(child, &status, WNOHANG); - ATF_REQUIRE(wpid == 0); + REQUIRE_EQ(wpid, 0); /* Signal the debugger to wait for the child. */ close(dpipe[0]); /* Wait for the debugger. */ wpid = waitpid(debugger, &status, 0); - ATF_REQUIRE(wpid == debugger); + REQUIRE_EQ(wpid, debugger); ATF_REQUIRE(WIFEXITED(status)); - ATF_REQUIRE(WEXITSTATUS(status) == 0); + REQUIRE_EQ(WEXITSTATUS(status), 0); /* The child process should now be ready. */ wpid = waitpid(child, &status, WNOHANG); - ATF_REQUIRE(wpid == child); + REQUIRE_EQ(wpid, child); ATF_REQUIRE(WIFEXITED(status)); - ATF_REQUIRE(WEXITSTATUS(status) == 1); + REQUIRE_EQ(WEXITSTATUS(status), 1); } /* @@ -360,7 +384,7 @@ ATF_TC_BODY(ptrace__parent_sees_exit_after_unrelated_debugger, tc) int cpipe[2], dpipe[2], status; char c; - ATF_REQUIRE(pipe(cpipe) == 0); + REQUIRE_EQ(pipe(cpipe), 0); ATF_REQUIRE((child = fork()) != -1); if (child == 0) { @@ -368,13 +392,13 @@ ATF_TC_BODY(ptrace__parent_sees_exit_after_unrelated_debugger, tc) close(cpipe[0]); /* Wait for parent to be ready. */ - CHILD_REQUIRE(read(cpipe[1], &c, sizeof(c)) == sizeof(c)); + CHILD_REQUIRE_EQ(read(cpipe[1], &c, sizeof(c)), sizeof(c)); _exit(1); } close(cpipe[1]); - ATF_REQUIRE(pipe(dpipe) == 0); + REQUIRE_EQ(pipe(dpipe), 0); ATF_REQUIRE((debugger = fork()) != -1); if (debugger == 0) { @@ -394,22 +418,22 @@ ATF_TC_BODY(ptrace__parent_sees_exit_after_unrelated_debugger, tc) CHILD_REQUIRE(ptrace(PT_ATTACH, child, NULL, 0) != -1); wpid = waitpid(child, &status, 0); - CHILD_REQUIRE(wpid == child); + CHILD_REQUIRE_EQ(wpid, child); CHILD_REQUIRE(WIFSTOPPED(status)); - CHILD_REQUIRE(WSTOPSIG(status) == SIGSTOP); + CHILD_REQUIRE_EQ(WSTOPSIG(status), SIGSTOP); CHILD_REQUIRE(ptrace(PT_CONTINUE, child, (caddr_t)1, 0) != -1); /* Signal parent that debugger is attached. */ - CHILD_REQUIRE(write(dpipe[1], &c, sizeof(c)) == sizeof(c)); + CHILD_REQUIRE_EQ(write(dpipe[1], &c, sizeof(c)), sizeof(c)); /* Wait for parent's failed wait. */ - CHILD_REQUIRE(read(dpipe[1], &c, sizeof(c)) == sizeof(c)); + CHILD_REQUIRE_EQ(read(dpipe[1], &c, sizeof(c)), sizeof(c)); wpid = waitpid(child, &status, 0); - CHILD_REQUIRE(wpid == child); + CHILD_REQUIRE_EQ(wpid, child); CHILD_REQUIRE(WIFEXITED(status)); - CHILD_REQUIRE(WEXITSTATUS(status) == 1); + CHILD_REQUIRE_EQ(WEXITSTATUS(status), 1); _exit(0); } @@ -419,20 +443,20 @@ ATF_TC_BODY(ptrace__parent_sees_exit_after_unrelated_debugger, tc) /* Wait for the debugger parent process to exit. */ wpid = waitpid(debugger, &status, 0); - ATF_REQUIRE(wpid == debugger); + REQUIRE_EQ(wpid, debugger); ATF_REQUIRE(WIFEXITED(status)); - ATF_REQUIRE(WEXITSTATUS(status) == 2); + REQUIRE_EQ(WEXITSTATUS(status), 2); /* A WNOHANG wait here should see the non-exited child. */ wpid = waitpid(child, &status, WNOHANG); - ATF_REQUIRE(wpid == 0); + REQUIRE_EQ(wpid, 0); /* Wait for the debugger to attach to the child. */ - ATF_REQUIRE(read(dpipe[0], &c, sizeof(c)) == sizeof(c)); + REQUIRE_EQ(read(dpipe[0], &c, sizeof(c)), sizeof(c)); /* Release the child. */ - ATF_REQUIRE(write(cpipe[0], &c, sizeof(c)) == sizeof(c)); - ATF_REQUIRE(read(cpipe[0], &c, sizeof(c)) == 0); + REQUIRE_EQ(write(cpipe[0], &c, sizeof(c)), sizeof(c)); + REQUIRE_EQ(read(cpipe[0], &c, sizeof(c)), 0); close(cpipe[0]); wait_for_zombie(child); @@ -443,20 +467,20 @@ ATF_TC_BODY(ptrace__parent_sees_exit_after_unrelated_debugger, tc) * until the debugger sees the exit. */ wpid = waitpid(child, &status, WNOHANG); - ATF_REQUIRE(wpid == 0); + REQUIRE_EQ(wpid, 0); /* Signal the debugger to wait for the child. */ - ATF_REQUIRE(write(dpipe[0], &c, sizeof(c)) == sizeof(c)); + REQUIRE_EQ(write(dpipe[0], &c, sizeof(c)), sizeof(c)); /* Wait for the debugger. */ - ATF_REQUIRE(read(dpipe[0], &c, sizeof(c)) == 0); + REQUIRE_EQ(read(dpipe[0], &c, sizeof(c)), 0); close(dpipe[0]); /* The child process should now be ready. */ wpid = waitpid(child, &status, WNOHANG); - ATF_REQUIRE(wpid == child); + REQUIRE_EQ(wpid, child); ATF_REQUIRE(WIFEXITED(status)); - ATF_REQUIRE(WEXITSTATUS(status) == 1); + REQUIRE_EQ(WEXITSTATUS(status), 1); } /* @@ -472,11 +496,11 @@ ATF_TC_BODY(ptrace__parent_exits_before_child, tc) if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) atf_tc_skip("https://bugs.freebsd.org/244056"); - ATF_REQUIRE(pipe(cpipe1) == 0); - ATF_REQUIRE(pipe(cpipe2) == 0); - ATF_REQUIRE(pipe(gcpipe) == 0); + REQUIRE_EQ(pipe(cpipe1), 0); + REQUIRE_EQ(pipe(cpipe2), 0); + REQUIRE_EQ(pipe(gcpipe), 0); - ATF_REQUIRE(procctl(P_PID, getpid(), PROC_REAP_ACQUIRE, NULL) == 0); + REQUIRE_EQ(procctl(P_PID, getpid(), PROC_REAP_ACQUIRE, NULL), 0); ATF_REQUIRE((child = fork()) != -1); if (child == 0) { @@ -496,31 +520,31 @@ ATF_TC_BODY(ptrace__parent_exits_before_child, tc) _exit(status); } - ATF_REQUIRE(read(cpipe1[0], &gchild, sizeof(gchild)) == sizeof(gchild)); + REQUIRE_EQ(read(cpipe1[0], &gchild, sizeof(gchild)), sizeof(gchild)); - ATF_REQUIRE(ptrace(PT_ATTACH, gchild, NULL, 0) == 0); + REQUIRE_EQ(ptrace(PT_ATTACH, gchild, NULL, 0), 0); status = 0; - ATF_REQUIRE(write(cpipe2[1], &status, sizeof(status)) == - sizeof(status)); - ATF_REQUIRE(waitpid(child, &status, 0) == child); - ATF_REQUIRE(WIFEXITED(status) && WEXITSTATUS(status) == 0); + REQUIRE_EQ(write(cpipe2[1], &status, sizeof(status)), sizeof(status)); + REQUIRE_EQ(waitpid(child, &status, 0), child); + ATF_REQUIRE(WIFEXITED(status)); + REQUIRE_EQ(WEXITSTATUS(status), 0); status = 0; - ATF_REQUIRE(write(gcpipe[1], &status, sizeof(status)) == - sizeof(status)); - ATF_REQUIRE(waitpid(gchild, &status, 0) == gchild); + REQUIRE_EQ(write(gcpipe[1], &status, sizeof(status)), sizeof(status)); + REQUIRE_EQ(waitpid(gchild, &status, 0), gchild); ATF_REQUIRE(WIFSTOPPED(status)); - ATF_REQUIRE(ptrace(PT_DETACH, gchild, (caddr_t)1, 0) == 0); - ATF_REQUIRE(waitpid(gchild, &status, 0) == gchild); - ATF_REQUIRE(WIFEXITED(status) && WEXITSTATUS(status) == 0); - - ATF_REQUIRE(close(cpipe1[0]) == 0); - ATF_REQUIRE(close(cpipe1[1]) == 0); - ATF_REQUIRE(close(cpipe2[0]) == 0); - ATF_REQUIRE(close(cpipe2[1]) == 0); - ATF_REQUIRE(close(gcpipe[0]) == 0); - ATF_REQUIRE(close(gcpipe[1]) == 0); + REQUIRE_EQ(ptrace(PT_DETACH, gchild, (caddr_t)1, 0), 0); + REQUIRE_EQ(waitpid(gchild, &status, 0), gchild); + ATF_REQUIRE(WIFEXITED(status)); + REQUIRE_EQ(WEXITSTATUS(status), 0); + + REQUIRE_EQ(close(cpipe1[0]), 0); + REQUIRE_EQ(close(cpipe1[1]), 0); + REQUIRE_EQ(close(cpipe2[0]), 0); + REQUIRE_EQ(close(cpipe2[1]), 0); + REQUIRE_EQ(close(gcpipe[0]), 0); + REQUIRE_EQ(close(gcpipe[1]), 0); } /* @@ -543,9 +567,9 @@ follow_fork_parent(bool use_vfork) _exit(2); wpid = waitpid(fpid, &status, 0); - CHILD_REQUIRE(wpid == fpid); + CHILD_REQUIRE_EQ(wpid, fpid); CHILD_REQUIRE(WIFEXITED(status)); - CHILD_REQUIRE(WEXITSTATUS(status) == 2); + CHILD_REQUIRE_EQ(WEXITSTATUS(status), 2); _exit(1); } @@ -585,23 +609,23 @@ handle_fork_events(pid_t parent, struct ptrace_lwpinfo *ppl) (PL_FLAG_FORKED | PL_FLAG_CHILD)); if (pl.pl_flags & PL_FLAG_CHILD) { ATF_REQUIRE(wpid != parent); - ATF_REQUIRE(WSTOPSIG(status) == SIGSTOP); + REQUIRE_EQ(WSTOPSIG(status), SIGSTOP); ATF_REQUIRE(!fork_reported[1]); if (child == -1) child = wpid; else - ATF_REQUIRE(child == wpid); + REQUIRE_EQ(child, wpid); if (ppl != NULL) ppl[1] = pl; fork_reported[1] = true; } else { - ATF_REQUIRE(wpid == parent); - ATF_REQUIRE(WSTOPSIG(status) == SIGTRAP); + REQUIRE_EQ(wpid, parent); + REQUIRE_EQ(WSTOPSIG(status), SIGTRAP); ATF_REQUIRE(!fork_reported[0]); if (child == -1) child = pl.pl_child_pid; else - ATF_REQUIRE(child == pl.pl_child_pid); + REQUIRE_EQ(child, pl.pl_child_pid); if (ppl != NULL) ppl[0] = pl; fork_reported[0] = true; @@ -633,9 +657,9 @@ ATF_TC_BODY(ptrace__follow_fork_both_attached, tc) /* The first wait() should report the stop from SIGSTOP. */ wpid = waitpid(children[0], &status, 0); - ATF_REQUIRE(wpid == children[0]); + REQUIRE_EQ(wpid, children[0]); ATF_REQUIRE(WIFSTOPPED(status)); - ATF_REQUIRE(WSTOPSIG(status) == SIGSTOP); + REQUIRE_EQ(WSTOPSIG(status), SIGSTOP); ATF_REQUIRE(ptrace(PT_FOLLOW_FORK, children[0], NULL, 1) != -1); @@ -653,18 +677,18 @@ ATF_TC_BODY(ptrace__follow_fork_both_attached, tc) * grandchild should report its exit first to the debugger. */ wpid = wait(&status); - ATF_REQUIRE(wpid == children[1]); + REQUIRE_EQ(wpid, children[1]); ATF_REQUIRE(WIFEXITED(status)); - ATF_REQUIRE(WEXITSTATUS(status) == 2); + REQUIRE_EQ(WEXITSTATUS(status), 2); wpid = wait(&status); - ATF_REQUIRE(wpid == children[0]); + REQUIRE_EQ(wpid, children[0]); ATF_REQUIRE(WIFEXITED(status)); - ATF_REQUIRE(WEXITSTATUS(status) == 1); + REQUIRE_EQ(WEXITSTATUS(status), 1); wpid = wait(&status); - ATF_REQUIRE(wpid == -1); - ATF_REQUIRE(errno == ECHILD); + REQUIRE_EQ(wpid, -1); + REQUIRE_EQ(errno, ECHILD); } /* @@ -689,9 +713,9 @@ ATF_TC_BODY(ptrace__follow_fork_child_detached, tc) /* The first wait() should report the stop from SIGSTOP. */ wpid = waitpid(children[0], &status, 0); - ATF_REQUIRE(wpid == children[0]); + REQUIRE_EQ(wpid, children[0]); ATF_REQUIRE(WIFSTOPPED(status)); - ATF_REQUIRE(WSTOPSIG(status) == SIGSTOP); + REQUIRE_EQ(WSTOPSIG(status), SIGSTOP); ATF_REQUIRE(ptrace(PT_FOLLOW_FORK, children[0], NULL, 1) != -1); @@ -709,13 +733,13 @@ ATF_TC_BODY(ptrace__follow_fork_child_detached, tc) * child. */ wpid = wait(&status); - ATF_REQUIRE(wpid == children[0]); + REQUIRE_EQ(wpid, children[0]); ATF_REQUIRE(WIFEXITED(status)); - ATF_REQUIRE(WEXITSTATUS(status) == 1); + REQUIRE_EQ(WEXITSTATUS(status), 1); wpid = wait(&status); - ATF_REQUIRE(wpid == -1); - ATF_REQUIRE(errno == ECHILD); + REQUIRE_EQ(wpid, -1); + REQUIRE_EQ(errno, ECHILD); } /* @@ -740,9 +764,9 @@ ATF_TC_BODY(ptrace__follow_fork_parent_detached, tc) /* The first wait() should report the stop from SIGSTOP. */ wpid = waitpid(children[0], &status, 0); - ATF_REQUIRE(wpid == children[0]); + REQUIRE_EQ(wpid, children[0]); ATF_REQUIRE(WIFSTOPPED(status)); - ATF_REQUIRE(WSTOPSIG(status) == SIGSTOP); + REQUIRE_EQ(WSTOPSIG(status), SIGSTOP); ATF_REQUIRE(ptrace(PT_FOLLOW_FORK, children[0], NULL, 1) != -1); @@ -764,18 +788,18 @@ ATF_TC_BODY(ptrace__follow_fork_parent_detached, tc) * after the grandchild. */ wpid = wait(&status); - ATF_REQUIRE(wpid == children[1]); + REQUIRE_EQ(wpid, children[1]); ATF_REQUIRE(WIFEXITED(status)); - ATF_REQUIRE(WEXITSTATUS(status) == 2); + REQUIRE_EQ(WEXITSTATUS(status), 2); wpid = wait(&status); - ATF_REQUIRE(wpid == children[0]); + REQUIRE_EQ(wpid, children[0]); ATF_REQUIRE(WIFEXITED(status)); - ATF_REQUIRE(WEXITSTATUS(status) == 1); + REQUIRE_EQ(WEXITSTATUS(status), 1); wpid = wait(&status); - ATF_REQUIRE(wpid == -1); - ATF_REQUIRE(errno == ECHILD); + REQUIRE_EQ(wpid, -1); + REQUIRE_EQ(errno, ECHILD); } static void @@ -792,10 +816,10 @@ attach_fork_parent(int cpipe[2]) /* Send the pid of the disassociated child to the debugger. */ fpid = getpid(); - CHILD_REQUIRE(write(cpipe[1], &fpid, sizeof(fpid)) == sizeof(fpid)); + CHILD_REQUIRE_EQ(write(cpipe[1], &fpid, sizeof(fpid)), sizeof(fpid)); /* Wait for the debugger to attach. */ - CHILD_REQUIRE(read(cpipe[1], &fpid, sizeof(fpid)) == 0); + CHILD_REQUIRE_EQ(read(cpipe[1], &fpid, sizeof(fpid)), 0); } /* @@ -813,7 +837,7 @@ ATF_TC_BODY(ptrace__follow_fork_both_attached_unrelated_debugger, tc) if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) atf_tc_skip("https://bugs.freebsd.org/239397"); - ATF_REQUIRE(pipe(cpipe) == 0); + REQUIRE_EQ(pipe(cpipe), 0); ATF_REQUIRE((fpid = fork()) != -1); if (fpid == 0) { attach_fork_parent(cpipe); @@ -825,12 +849,12 @@ ATF_TC_BODY(ptrace__follow_fork_both_attached_unrelated_debugger, tc) /* Wait for the direct child to exit. */ wpid = waitpid(fpid, &status, 0); - ATF_REQUIRE(wpid == fpid); + REQUIRE_EQ(wpid, fpid); ATF_REQUIRE(WIFEXITED(status)); - ATF_REQUIRE(WEXITSTATUS(status) == 3); + REQUIRE_EQ(WEXITSTATUS(status), 3); /* Read the pid of the fork parent. */ - ATF_REQUIRE(read(cpipe[0], &children[0], sizeof(children[0])) == + REQUIRE_EQ(read(cpipe[0], &children[0], sizeof(children[0])), sizeof(children[0])); /* Attach to the fork parent. */ @@ -855,18 +879,18 @@ ATF_TC_BODY(ptrace__follow_fork_both_attached_unrelated_debugger, tc) * so the child should report its exit first to the debugger. */ wpid = wait(&status); - ATF_REQUIRE(wpid == children[1]); + REQUIRE_EQ(wpid, children[1]); ATF_REQUIRE(WIFEXITED(status)); - ATF_REQUIRE(WEXITSTATUS(status) == 2); + REQUIRE_EQ(WEXITSTATUS(status), 2); wpid = wait(&status); - ATF_REQUIRE(wpid == children[0]); + REQUIRE_EQ(wpid, children[0]); ATF_REQUIRE(WIFEXITED(status)); - ATF_REQUIRE(WEXITSTATUS(status) == 1); + REQUIRE_EQ(WEXITSTATUS(status), 1); wpid = wait(&status); - ATF_REQUIRE(wpid == -1); - ATF_REQUIRE(errno == ECHILD); + REQUIRE_EQ(wpid, -1); + REQUIRE_EQ(errno, ECHILD); } /* @@ -884,7 +908,7 @@ ATF_TC_BODY(ptrace__follow_fork_child_detached_unrelated_debugger, tc) if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) atf_tc_skip("https://bugs.freebsd.org/239292"); - ATF_REQUIRE(pipe(cpipe) == 0); + REQUIRE_EQ(pipe(cpipe), 0); ATF_REQUIRE((fpid = fork()) != -1); if (fpid == 0) { attach_fork_parent(cpipe); @@ -896,12 +920,12 @@ ATF_TC_BODY(ptrace__follow_fork_child_detached_unrelated_debugger, tc) /* Wait for the direct child to exit. */ wpid = waitpid(fpid, &status, 0); - ATF_REQUIRE(wpid == fpid); + REQUIRE_EQ(wpid, fpid); ATF_REQUIRE(WIFEXITED(status)); - ATF_REQUIRE(WEXITSTATUS(status) == 3); + REQUIRE_EQ(WEXITSTATUS(status), 3); /* Read the pid of the fork parent. */ - ATF_REQUIRE(read(cpipe[0], &children[0], sizeof(children[0])) == + REQUIRE_EQ(read(cpipe[0], &children[0], sizeof(children[0])), sizeof(children[0])); /* Attach to the fork parent. */ @@ -926,13 +950,13 @@ ATF_TC_BODY(ptrace__follow_fork_child_detached_unrelated_debugger, tc) * parent. */ wpid = wait(&status); - ATF_REQUIRE(wpid == children[0]); + REQUIRE_EQ(wpid, children[0]); ATF_REQUIRE(WIFEXITED(status)); - ATF_REQUIRE(WEXITSTATUS(status) == 1); + REQUIRE_EQ(WEXITSTATUS(status), 1); wpid = wait(&status); - ATF_REQUIRE(wpid == -1); - ATF_REQUIRE(errno == ECHILD); + REQUIRE_EQ(wpid, -1); + REQUIRE_EQ(errno, ECHILD); } /* @@ -950,7 +974,7 @@ ATF_TC_BODY(ptrace__follow_fork_parent_detached_unrelated_debugger, tc) if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) atf_tc_skip("https://bugs.freebsd.org/239425"); - ATF_REQUIRE(pipe(cpipe) == 0); + REQUIRE_EQ(pipe(cpipe), 0); ATF_REQUIRE((fpid = fork()) != -1); if (fpid == 0) { attach_fork_parent(cpipe); @@ -962,12 +986,12 @@ ATF_TC_BODY(ptrace__follow_fork_parent_detached_unrelated_debugger, tc) /* Wait for the direct child to exit. */ wpid = waitpid(fpid, &status, 0); - ATF_REQUIRE(wpid == fpid); + REQUIRE_EQ(wpid, fpid); ATF_REQUIRE(WIFEXITED(status)); - ATF_REQUIRE(WEXITSTATUS(status) == 3); + REQUIRE_EQ(WEXITSTATUS(status), 3); /* Read the pid of the fork parent. */ - ATF_REQUIRE(read(cpipe[0], &children[0], sizeof(children[0])) == + REQUIRE_EQ(read(cpipe[0], &children[0], sizeof(children[0])), sizeof(children[0])); /* Attach to the fork parent. */ @@ -992,13 +1016,13 @@ ATF_TC_BODY(ptrace__follow_fork_parent_detached_unrelated_debugger, tc) * the child. */ wpid = wait(&status); - ATF_REQUIRE(wpid == children[1]); + REQUIRE_EQ(wpid, children[1]); ATF_REQUIRE(WIFEXITED(status)); - ATF_REQUIRE(WEXITSTATUS(status) == 2); + REQUIRE_EQ(WEXITSTATUS(status), 2); wpid = wait(&status); - ATF_REQUIRE(wpid == -1); - ATF_REQUIRE(errno == ECHILD); + REQUIRE_EQ(wpid, -1); + REQUIRE_EQ(errno, ECHILD); } /* @@ -1015,8 +1039,7 @@ ATF_TC_BODY(ptrace__getppid, tc) 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); + REQUIRE_EQ(pipe(cpipe), 0); ATF_REQUIRE((child = fork()) != -1); if (child == 0) { @@ -1024,7 +1047,7 @@ ATF_TC_BODY(ptrace__getppid, tc) close(cpipe[0]); /* Wait for parent to be ready. */ - CHILD_REQUIRE(read(cpipe[1], &c, sizeof(c)) == sizeof(c)); + CHILD_REQUIRE_EQ(read(cpipe[1], &c, sizeof(c)), sizeof(c)); /* Report the parent PID to the parent. */ ppid = getppid(); @@ -1035,7 +1058,7 @@ ATF_TC_BODY(ptrace__getppid, tc) } close(cpipe[1]); - ATF_REQUIRE(pipe(dpipe) == 0); + REQUIRE_EQ(pipe(dpipe), 0); ATF_REQUIRE((debugger = fork()) != -1); if (debugger == 0) { @@ -1045,20 +1068,20 @@ ATF_TC_BODY(ptrace__getppid, tc) CHILD_REQUIRE(ptrace(PT_ATTACH, child, NULL, 0) != -1); wpid = waitpid(child, &status, 0); - CHILD_REQUIRE(wpid == child); + CHILD_REQUIRE_EQ(wpid, child); CHILD_REQUIRE(WIFSTOPPED(status)); - CHILD_REQUIRE(WSTOPSIG(status) == SIGSTOP); + CHILD_REQUIRE_EQ(WSTOPSIG(status), SIGSTOP); CHILD_REQUIRE(ptrace(PT_CONTINUE, child, (caddr_t)1, 0) != -1); /* Signal parent that debugger is attached. */ - CHILD_REQUIRE(write(dpipe[1], &c, sizeof(c)) == sizeof(c)); + CHILD_REQUIRE_EQ(write(dpipe[1], &c, sizeof(c)), sizeof(c)); /* Wait for traced child to exit. */ wpid = waitpid(child, &status, 0); - CHILD_REQUIRE(wpid == child); + CHILD_REQUIRE_EQ(wpid, child); CHILD_REQUIRE(WIFEXITED(status)); - CHILD_REQUIRE(WEXITSTATUS(status) == 1); + CHILD_REQUIRE_EQ(WEXITSTATUS(status), 1); _exit(0); } @@ -1067,28 +1090,28 @@ ATF_TC_BODY(ptrace__getppid, tc) /* Parent process. */ /* Wait for the debugger to attach to the child. */ - ATF_REQUIRE(read(dpipe[0], &c, sizeof(c)) == sizeof(c)); + REQUIRE_EQ(read(dpipe[0], &c, sizeof(c)), sizeof(c)); /* Release the child. */ - ATF_REQUIRE(write(cpipe[0], &c, sizeof(c)) == sizeof(c)); + REQUIRE_EQ(write(cpipe[0], &c, sizeof(c)), sizeof(c)); /* Read the parent PID from the child. */ - ATF_REQUIRE(read(cpipe[0], &ppid, sizeof(ppid)) == sizeof(ppid)); + REQUIRE_EQ(read(cpipe[0], &ppid, sizeof(ppid)), sizeof(ppid)); close(cpipe[0]); - ATF_REQUIRE(ppid == getpid()); + REQUIRE_EQ(ppid, getpid()); /* Wait for the debugger. */ wpid = waitpid(debugger, &status, 0); - ATF_REQUIRE(wpid == debugger); + REQUIRE_EQ(wpid, debugger); ATF_REQUIRE(WIFEXITED(status)); - ATF_REQUIRE(WEXITSTATUS(status) == 0); + REQUIRE_EQ(WEXITSTATUS(status), 0); /* The child process should now be ready. */ wpid = waitpid(child, &status, WNOHANG); - ATF_REQUIRE(wpid == child); + REQUIRE_EQ(wpid, child); ATF_REQUIRE(WIFEXITED(status)); - ATF_REQUIRE(WEXITSTATUS(status) == 1); + REQUIRE_EQ(WEXITSTATUS(status), 1); } /* @@ -1113,9 +1136,9 @@ ATF_TC_BODY(ptrace__new_child_pl_syscall_code_fork, tc) /* The first wait() should report the stop from SIGSTOP. */ wpid = waitpid(children[0], &status, 0); - ATF_REQUIRE(wpid == children[0]); + REQUIRE_EQ(wpid, children[0]); ATF_REQUIRE(WIFSTOPPED(status)); - ATF_REQUIRE(WSTOPSIG(status) == SIGSTOP); + REQUIRE_EQ(WSTOPSIG(status), SIGSTOP); ATF_REQUIRE(ptrace(PT_FOLLOW_FORK, children[0], NULL, 1) != -1); @@ -1128,9 +1151,9 @@ ATF_TC_BODY(ptrace__new_child_pl_syscall_code_fork, tc) ATF_REQUIRE((pl[0].pl_flags & PL_FLAG_SCX) != 0); ATF_REQUIRE((pl[1].pl_flags & PL_FLAG_SCX) != 0); - ATF_REQUIRE(pl[0].pl_syscall_code == SYS_fork); - ATF_REQUIRE(pl[0].pl_syscall_code == pl[1].pl_syscall_code); - ATF_REQUIRE(pl[0].pl_syscall_narg == pl[1].pl_syscall_narg); + REQUIRE_EQ(pl[0].pl_syscall_code, SYS_fork); + REQUIRE_EQ(pl[0].pl_syscall_code, pl[1].pl_syscall_code); + REQUIRE_EQ(pl[0].pl_syscall_narg, pl[1].pl_syscall_narg); ATF_REQUIRE(ptrace(PT_CONTINUE, children[0], (caddr_t)1, 0) != -1); ATF_REQUIRE(ptrace(PT_CONTINUE, children[1], (caddr_t)1, 0) != -1); @@ -1140,18 +1163,18 @@ ATF_TC_BODY(ptrace__new_child_pl_syscall_code_fork, tc) * grandchild should report its exit first to the debugger. */ wpid = wait(&status); - ATF_REQUIRE(wpid == children[1]); + REQUIRE_EQ(wpid, children[1]); ATF_REQUIRE(WIFEXITED(status)); - ATF_REQUIRE(WEXITSTATUS(status) == 2); + REQUIRE_EQ(WEXITSTATUS(status), 2); wpid = wait(&status); - ATF_REQUIRE(wpid == children[0]); + REQUIRE_EQ(wpid, children[0]); ATF_REQUIRE(WIFEXITED(status)); - ATF_REQUIRE(WEXITSTATUS(status) == 1); + REQUIRE_EQ(WEXITSTATUS(status), 1); wpid = wait(&status); - ATF_REQUIRE(wpid == -1); - ATF_REQUIRE(errno == ECHILD); + REQUIRE_EQ(wpid, -1); + REQUIRE_EQ(errno, ECHILD); } /* @@ -1176,9 +1199,9 @@ ATF_TC_BODY(ptrace__new_child_pl_syscall_code_vfork, tc) /* The first wait() should report the stop from SIGSTOP. */ wpid = waitpid(children[0], &status, 0); - ATF_REQUIRE(wpid == children[0]); + REQUIRE_EQ(wpid, children[0]); ATF_REQUIRE(WIFSTOPPED(status)); - ATF_REQUIRE(WSTOPSIG(status) == SIGSTOP); + REQUIRE_EQ(WSTOPSIG(status), SIGSTOP); ATF_REQUIRE(ptrace(PT_FOLLOW_FORK, children[0], NULL, 1) != -1); @@ -1191,9 +1214,9 @@ ATF_TC_BODY(ptrace__new_child_pl_syscall_code_vfork, tc) ATF_REQUIRE((pl[0].pl_flags & PL_FLAG_SCX) != 0); ATF_REQUIRE((pl[1].pl_flags & PL_FLAG_SCX) != 0); - ATF_REQUIRE(pl[0].pl_syscall_code == SYS_vfork); - ATF_REQUIRE(pl[0].pl_syscall_code == pl[1].pl_syscall_code); - ATF_REQUIRE(pl[0].pl_syscall_narg == pl[1].pl_syscall_narg); + REQUIRE_EQ(pl[0].pl_syscall_code, SYS_vfork); + REQUIRE_EQ(pl[0].pl_syscall_code, pl[1].pl_syscall_code); + REQUIRE_EQ(pl[0].pl_syscall_narg, pl[1].pl_syscall_narg); ATF_REQUIRE(ptrace(PT_CONTINUE, children[0], (caddr_t)1, 0) != -1); ATF_REQUIRE(ptrace(PT_CONTINUE, children[1], (caddr_t)1, 0) != -1); @@ -1203,18 +1226,18 @@ ATF_TC_BODY(ptrace__new_child_pl_syscall_code_vfork, tc) * grandchild should report its exit first to the debugger. */ wpid = wait(&status); - ATF_REQUIRE(wpid == children[1]); + REQUIRE_EQ(wpid, children[1]); ATF_REQUIRE(WIFEXITED(status)); - ATF_REQUIRE(WEXITSTATUS(status) == 2); + REQUIRE_EQ(WEXITSTATUS(status), 2); wpid = wait(&status); - ATF_REQUIRE(wpid == children[0]); + REQUIRE_EQ(wpid, children[0]); ATF_REQUIRE(WIFEXITED(status)); - ATF_REQUIRE(WEXITSTATUS(status) == 1); + REQUIRE_EQ(WEXITSTATUS(status), 1); wpid = wait(&status); - ATF_REQUIRE(wpid == -1); - ATF_REQUIRE(errno == ECHILD); + REQUIRE_EQ(wpid, -1); + REQUIRE_EQ(errno, ECHILD); } static void * @@ -1229,8 +1252,8 @@ simple_thread_main(void) { pthread_t thread; - CHILD_REQUIRE(pthread_create(&thread, NULL, simple_thread, NULL) == 0); - CHILD_REQUIRE(pthread_join(thread, NULL) == 0); + CHILD_REQUIRE_EQ(pthread_create(&thread, NULL, simple_thread, NULL), 0); + CHILD_REQUIRE_EQ(pthread_join(thread, NULL), 0); exit(1); } @@ -1254,9 +1277,9 @@ ATF_TC_BODY(ptrace__new_child_pl_syscall_code_thread, tc) /* The first wait() should report the stop from SIGSTOP. */ wpid = waitpid(fpid, &status, 0); - ATF_REQUIRE(wpid == fpid); + REQUIRE_EQ(wpid, fpid); ATF_REQUIRE(WIFSTOPPED(status)); - ATF_REQUIRE(WSTOPSIG(status) == SIGSTOP); + REQUIRE_EQ(WSTOPSIG(status), SIGSTOP); ATF_REQUIRE(ptrace(PT_LWPINFO, wpid, (caddr_t)&pl, sizeof(pl)) != -1); @@ -1277,10 +1300,10 @@ ATF_TC_BODY(ptrace__new_child_pl_syscall_code_thread, tc) */ for (;;) { wpid = waitpid(fpid, &status, 0); - ATF_REQUIRE(wpid == fpid); + REQUIRE_EQ(wpid, fpid); ATF_REQUIRE(WIFSTOPPED(status)); - ATF_REQUIRE(WSTOPSIG(status) == SIGTRAP); - + REQUIRE_EQ(WSTOPSIG(status), SIGTRAP); + ATF_REQUIRE(ptrace(PT_LWPINFO, wpid, (caddr_t)&pl, sizeof(pl)) != -1); ATF_REQUIRE((pl.pl_flags & PL_FLAG_SCX) != 0); @@ -1289,27 +1312,27 @@ ATF_TC_BODY(ptrace__new_child_pl_syscall_code_thread, tc) /* New thread seen. */ break; - ATF_REQUIRE(ptrace(PT_CONTINUE, fpid, (caddr_t)1, 0) == 0); + REQUIRE_EQ(ptrace(PT_CONTINUE, fpid, (caddr_t)1, 0), 0); } *** 2627 LINES SKIPPED *** From owner-dev-commits-src-main@freebsd.org Mon Mar 1 19:56:28 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 171E954A917; Mon, 1 Mar 2021 19:56:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dq9xl6m9Fz3kyN; Mon, 1 Mar 2021 19:56:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D8EC41902; Mon, 1 Mar 2021 19:56:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 121JuRZv002733; Mon, 1 Mar 2021 19:56:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 121JuRbo002732; Mon, 1 Mar 2021 19:56:27 GMT (envelope-from git) Date: Mon, 1 Mar 2021 19:56:27 GMT Message-Id: <202103011956.121JuRbo002732@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: 1032131464f1 - main - Remove atf_tc_skip calls from ptrace_test MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1032131464f1196ad674b30c14a9e611789a1061 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2021 19:56:28 -0000 The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=1032131464f1196ad674b30c14a9e611789a1061 commit 1032131464f1196ad674b30c14a9e611789a1061 Author: Alex Richardson AuthorDate: 2021-03-01 18:51:02 +0000 Commit: Alex Richardson CommitDate: 2021-03-01 19:56:05 +0000 Remove atf_tc_skip calls from ptrace_test I've run these tests many times in a loop on multiple architectures and it works reliably for me, maybe it's time to retire these skips? This also adds an additional waitpid to one of the tests to avoid a potential race condition (suggested by markj@). PR: 239397, 244056, 239425, 240510, 220841, 243605 Reviewed By: markj Differential Revision: https://reviews.freebsd.org/D28888 --- tests/sys/kern/ptrace_test.c | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/tests/sys/kern/ptrace_test.c b/tests/sys/kern/ptrace_test.c index a5655008eaa1..c6183ed573fd 100644 --- a/tests/sys/kern/ptrace_test.c +++ b/tests/sys/kern/ptrace_test.c @@ -237,9 +237,6 @@ ATF_TC_BODY(ptrace__parent_wait_after_attach, tc) int cpipe[2], status; char c; - if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) - atf_tc_skip("https://bugs.freebsd.org/244055"); - REQUIRE_EQ(pipe(cpipe), 0); ATF_REQUIRE((child = fork()) != -1); if (child == 0) { @@ -287,9 +284,6 @@ ATF_TC_BODY(ptrace__parent_sees_exit_after_child_debugger, 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/239399"); - REQUIRE_EQ(pipe(cpipe), 0); ATF_REQUIRE((child = fork()) != -1); @@ -493,9 +487,6 @@ ATF_TC_BODY(ptrace__parent_exits_before_child, tc) int cpipe1[2], cpipe2[2], gcpipe[2], status; pid_t child, gchild; - if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) - atf_tc_skip("https://bugs.freebsd.org/244056"); - REQUIRE_EQ(pipe(cpipe1), 0); REQUIRE_EQ(pipe(cpipe2), 0); REQUIRE_EQ(pipe(gcpipe), 0); @@ -834,9 +825,6 @@ ATF_TC_BODY(ptrace__follow_fork_both_attached_unrelated_debugger, tc) pid_t children[2], fpid, wpid; int cpipe[2], status; - if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) - atf_tc_skip("https://bugs.freebsd.org/239397"); - REQUIRE_EQ(pipe(cpipe), 0); ATF_REQUIRE((fpid = fork()) != -1); if (fpid == 0) { @@ -905,9 +893,6 @@ ATF_TC_BODY(ptrace__follow_fork_child_detached_unrelated_debugger, tc) pid_t children[2], fpid, wpid; int cpipe[2], status; - if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) - atf_tc_skip("https://bugs.freebsd.org/239292"); - REQUIRE_EQ(pipe(cpipe), 0); ATF_REQUIRE((fpid = fork()) != -1); if (fpid == 0) { @@ -971,9 +956,6 @@ ATF_TC_BODY(ptrace__follow_fork_parent_detached_unrelated_debugger, tc) pid_t children[2], fpid, wpid; int cpipe[2], status; - if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) - atf_tc_skip("https://bugs.freebsd.org/239425"); - REQUIRE_EQ(pipe(cpipe), 0); ATF_REQUIRE((fpid = fork()) != -1); if (fpid == 0) { @@ -1036,9 +1018,6 @@ 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"); - REQUIRE_EQ(pipe(cpipe), 0); ATF_REQUIRE((child = fork()) != -1); @@ -2123,9 +2102,6 @@ ATF_TC_BODY(ptrace__PT_KILL_competing_stop, tc) struct ptrace_lwpinfo pl; struct sched_param sched_param; - if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) - atf_tc_skip("https://bugs.freebsd.org/220841"); - ATF_REQUIRE((fpid = fork()) != -1); if (fpid == 0) { trace_me(); @@ -4219,9 +4195,6 @@ ATF_TC_BODY(ptrace__procdesc_reparent_wait_child, tc) pid_t traced, debuger, wpid; int pd, status; - if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) - atf_tc_skip("https://bugs.freebsd.org/243605"); - traced = pdfork(&pd, 0); ATF_REQUIRE(traced >= 0); if (traced == 0) { @@ -4230,6 +4203,8 @@ ATF_TC_BODY(ptrace__procdesc_reparent_wait_child, tc) } ATF_REQUIRE(pd >= 0); + /* Wait until the child process has stopped before fork()ing again. */ + REQUIRE_EQ(traced, waitpid(traced, &status, WSTOPPED)); debuger = fork(); ATF_REQUIRE(debuger >= 0); if (debuger == 0) { From owner-dev-commits-src-main@freebsd.org Mon Mar 1 19:56:29 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7018354A7A1; Mon, 1 Mar 2021 19:56:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dq9xn2G9xz3kwT; Mon, 1 Mar 2021 19:56:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 16ECC1370; Mon, 1 Mar 2021 19:56:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 121JuSRA002752; Mon, 1 Mar 2021 19:56:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 121JuStT002751; Mon, 1 Mar 2021 19:56:28 GMT (envelope-from git) Date: Mon, 1 Mar 2021 19:56:28 GMT Message-Id: <202103011956.121JuStT002751@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: 17cc20092cd7 - main - Fix ptrace_test:ptrace__syscall_args after ATF upgrade MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 17cc20092cd7a45adb6d772e0f449617007a82d9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2021 19:56:29 -0000 The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=17cc20092cd7a45adb6d772e0f449617007a82d9 commit 17cc20092cd7a45adb6d772e0f449617007a82d9 Author: Alex Richardson AuthorDate: 2021-02-23 12:51:35 +0000 Commit: Alex Richardson CommitDate: 2021-03-01 19:56:05 +0000 Fix ptrace_test:ptrace__syscall_args after ATF upgrade ATF now opens the results file (without CLOEXEC), so the child actually has a valid file descriptor 3. To fix this simply use a large number that will definitely not be a valid file descriptor. Reviewed by: jhb, cem, lwhsu Differential Revision: https://reviews.freebsd.org/D28889 --- tests/sys/kern/ptrace_test.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/sys/kern/ptrace_test.c b/tests/sys/kern/ptrace_test.c index c6183ed573fd..944be3d31e04 100644 --- a/tests/sys/kern/ptrace_test.c +++ b/tests/sys/kern/ptrace_test.c @@ -3947,7 +3947,8 @@ ATF_TC_BODY(ptrace__syscall_args, tc) if (fpid == 0) { trace_me(); kill(getpid(), 0); - close(3); + /* Close a fd that should not exist. */ + close(12345); exit(1); } @@ -4049,7 +4050,7 @@ ATF_TC_BODY(ptrace__syscall_args, tc) ATF_REQUIRE(ptrace(PT_GET_SC_ARGS, wpid, (caddr_t)args, sizeof(args)) != -1); - REQUIRE_EQ(args[0], 3); + REQUIRE_EQ(args[0], 12345); REQUIRE_EQ(ptrace(PT_CONTINUE, fpid, (caddr_t)1, 0), 0); From owner-dev-commits-src-main@freebsd.org Mon Mar 1 19:56:33 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 22B4054AA03; Mon, 1 Mar 2021 19:56:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dq9xq2gJxz3khn; Mon, 1 Mar 2021 19:56:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 446B81883; Mon, 1 Mar 2021 19:56:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 121JuU7I002774; Mon, 1 Mar 2021 19:56:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 121JuUSn002773; Mon, 1 Mar 2021 19:56:30 GMT (envelope-from git) Date: Mon, 1 Mar 2021 19:56:30 GMT Message-Id: <202103011956.121JuUSn002773@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: c88c1f23a898 - main - Allow ssp_test:read to pass more reliably MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c88c1f23a8989b881a5ca51223289ddb4ce74277 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2021 19:56:34 -0000 The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=c88c1f23a8989b881a5ca51223289ddb4ce74277 commit c88c1f23a8989b881a5ca51223289ddb4ce74277 Author: Alex Richardson AuthorDate: 2021-03-01 19:50:38 +0000 Commit: Alex Richardson CommitDate: 2021-03-01 19:56:05 +0000 Allow ssp_test:read to pass more reliably It appears that the stackframe layout can be slightly different depending on compiler and target architecture. For example, when using CHERI LLVM for RISC-V we can actually overflow the buffer by up to 8 bytes without SSP detecting it. Fix this by increasing the overflow to 15 bytes. Reviewed By: ngie, emaste Differential Revision: https://reviews.freebsd.org/D28997 --- contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh b/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh index 7b963d18e3f7..b9d07b1804b1 100755 --- a/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh +++ b/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh @@ -390,7 +390,7 @@ read_body() if true; then MAX_PATH=$(getconf _XOPEN_PATH_MAX) || atf_fail "getconf failed" h_pass "$prog $MAX_PATH" "echo foo |" - h_fail "$prog $(( $MAX_PATH + 3 ))" "echo bar |" + h_fail "$prog $(( $MAX_PATH + 15 ))" "echo bar |" else # End FreeBSD h_pass "$prog 1024" "echo foo |" From owner-dev-commits-src-main@freebsd.org Mon Mar 1 20:50:54 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BBF6A54C2B8; Mon, 1 Mar 2021 20:50:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DqC8Z51J0z3prr; Mon, 1 Mar 2021 20:50:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9EE731FE9; Mon, 1 Mar 2021 20:50:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 121KosxZ080180; Mon, 1 Mar 2021 20:50:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 121KosV0080179; Mon, 1 Mar 2021 20:50:54 GMT (envelope-from git) Date: Mon, 1 Mar 2021 20:50:54 GMT Message-Id: <202103012050.121KosV0080179@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: 94f2e42f5e0b - main - nfsclient: Fix the stripe unit size for a File Layout pNFS layout MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 94f2e42f5e0b78a7a4684d4a4eb62ea470a57eb1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2021 20:50:54 -0000 The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=94f2e42f5e0b78a7a4684d4a4eb62ea470a57eb1 commit 94f2e42f5e0b78a7a4684d4a4eb62ea470a57eb1 Author: Rick Macklem AuthorDate: 2021-03-01 20:49:32 +0000 Commit: Rick Macklem CommitDate: 2021-03-01 20:49:32 +0000 nfsclient: Fix the stripe unit size for a File Layout pNFS layout During a recent virtual NFSv4 testing event, a bug in the FreeBSD client was detected when doing a File Layout pNFS DS I/O operation. The size of the I/O operation was smaller than expected. The I/O size is specified as a stripe unit size in bits 6->31 of nflh_util in the layout. I had misinterpreted RFC5661 and had shifted the value right by 6 bits. The correct interpretation is to use the value as presented (it is always an exact multiple of 64), clearing bits 0->5. This patch fixes this. Without the patch, I/O through the DSs work, but the I/O size is 1/64th of what is optimal. MFC after: 2 weeks --- sys/fs/nfsclient/nfs_clrpcops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c index c95d4dc58e7a..0e503e34810b 100644 --- a/sys/fs/nfsclient/nfs_clrpcops.c +++ b/sys/fs/nfsclient/nfs_clrpcops.c @@ -6024,7 +6024,7 @@ nfscl_doflayoutio(vnode_t vp, struct uio *uiop, int *iomode, int *must_commit, np = VTONFS(vp); rel_off = off - flp->nfsfl_patoff; - stripe_unit_size = (flp->nfsfl_util >> 6) & 0x3ffffff; + stripe_unit_size = flp->nfsfl_util & NFSFLAYUTIL_STRIPE_MASK; stripe_pos = (rel_off / stripe_unit_size + flp->nfsfl_stripe1) % dp->nfsdi_stripecnt; transfer = stripe_unit_size - (rel_off % stripe_unit_size); From owner-dev-commits-src-main@freebsd.org Mon Mar 1 22:36:15 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A503454E955; Mon, 1 Mar 2021 22:36:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DqFV74HHhz3wTL; Mon, 1 Mar 2021 22:36:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 859C9382D; Mon, 1 Mar 2021 22:36:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 121MaF4c015161; Mon, 1 Mar 2021 22:36:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 121MaFSC015160; Mon, 1 Mar 2021 22:36:15 GMT (envelope-from git) Date: Mon, 1 Mar 2021 22:36:15 GMT Message-Id: <202103012236.121MaFSC015160@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mariusz Zaborski Subject: git: 05b267e23257 - main - service: respect nojailvnet keyword MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: oshogbo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 05b267e23257a5c89ab2d55888a781bf6f90ec4e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2021 22:36:15 -0000 The branch main has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=05b267e23257a5c89ab2d55888a781bf6f90ec4e commit 05b267e23257a5c89ab2d55888a781bf6f90ec4e Author: Mariusz Zaborski AuthorDate: 2021-03-01 22:18:58 +0000 Commit: Mariusz Zaborski CommitDate: 2021-03-01 22:18:58 +0000 service: respect nojailvnet keyword In the 761d2bb5b9e70cf30f9c2dac62a47a2d2593e83f we added nojailvnet keyword. The nojailvnet keyword is used to skip startup scripts in jails that are run without VNET. The service.sh was omitted in this commit. The service.sh even documents that this is the same code as in rc - so lets reflect that. Submitted by: Adam Wołk Sponsored by: Fudo Security --- usr.sbin/service/service.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/usr.sbin/service/service.sh b/usr.sbin/service/service.sh index 42a50fcf61b9..9646aae67b0c 100755 --- a/usr.sbin/service/service.sh +++ b/usr.sbin/service/service.sh @@ -83,6 +83,9 @@ if [ -n "$RESTART" ]; then skip="-s nostart" if [ `/sbin/sysctl -n security.jail.jailed` -eq 1 ]; then skip="$skip -s nojail" + if [ `/sbin/sysctl -n security.jail.vnet` -ne 1 ]; then + skip="$skip -s nojailvnet" + fi fi [ -n "$local_startup" ] && find_local_scripts_new files=`rcorder ${skip} ${local_rc} 2>/dev/null` @@ -113,6 +116,9 @@ if [ -n "$ENABLED" -o -n "$RCORDER" ]; then skip="-s nostart" if [ `/sbin/sysctl -n security.jail.jailed` -eq 1 ]; then skip="$skip -s nojail" + if [ `/sbin/sysctl -n security.jail.vnet` -ne 1 ]; then + skip="$skip -s nojailvnet" + fi fi [ -n "$local_startup" ] && find_local_scripts_new files=`rcorder ${skip} /etc/rc.d/* ${local_rc} 2>/dev/null` From owner-dev-commits-src-main@freebsd.org Mon Mar 1 22:37:58 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9E5E354EE1C; Mon, 1 Mar 2021 22:37:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DqFX641Rnz3wVb; Mon, 1 Mar 2021 22:37:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7C79A382E; Mon, 1 Mar 2021 22:37:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 121MbwGf015565; Mon, 1 Mar 2021 22:37:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 121Mbwfb015564; Mon, 1 Mar 2021 22:37:58 GMT (envelope-from git) Date: Mon, 1 Mar 2021 22:37:58 GMT Message-Id: <202103012237.121Mbwfb015564@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: a7d593dd1da2 - main - Cirrus-CI: temporarily avoid qemu smoke test boot MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a7d593dd1da27833b5384349700bc3c7bcae6aad Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2021 22:37:58 -0000 The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=a7d593dd1da27833b5384349700bc3c7bcae6aad commit a7d593dd1da27833b5384349700bc3c7bcae6aad Author: Ed Maste AuthorDate: 2021-03-01 21:39:25 +0000 Commit: Ed Maste CommitDate: 2021-03-01 22:37:26 +0000 Cirrus-CI: temporarily avoid qemu smoke test boot Cirrus-CI has been red for some time because we're running out of disk space on the ephemeral GCP VMs. For now remove the package + qemu boot, and just check for build regressions. This change to be reverted once we have identified and addressed the underlying issue. Sponsored by: The FreeBSD Foundation --- .cirrus.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index e34b99523561..5e1b9fa3f9ee 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -13,7 +13,7 @@ env: task: timeout_in: 120m install_script: - - pkg install -y qemu42 uefi-edk2-qemu-x86_64 llvm11 + - pkg install -y llvm11 setup_script: - df -h - pw useradd user @@ -21,7 +21,3 @@ task: - chown user:user /usr/obj/$(pwd -P) script: - su user -c "make -j$(sysctl -n hw.ncpu) CROSS_TOOLCHAIN=llvm11 WITHOUT_TOOLCHAIN=yes buildworld buildkernel" - package_script: - - su user -c "make CROSS_TOOLCHAIN=llvm11 WITHOUT_TOOLCHAIN=yes PKG_FORMAT=tar packages" - test_script: - - sh tools/boot/ci-qemu-test.sh From owner-dev-commits-src-main@freebsd.org Mon Mar 1 23:36:46 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 51121550521; Mon, 1 Mar 2021 23:36:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DqGqy1sBNz4VCd; Mon, 1 Mar 2021 23:36:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 32A1A479A; Mon, 1 Mar 2021 23:36:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 121Nakkb094499; Mon, 1 Mar 2021 23:36:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 121Nak81094498; Mon, 1 Mar 2021 23:36:46 GMT (envelope-from git) Date: Mon, 1 Mar 2021 23:36:46 GMT Message-Id: <202103012336.121Nak81094498@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: a59e2982fe3e - main - Optimize out few extra memory accesses. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a59e2982fe3e6339629cc77fe9d349d60e03a05e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Mar 2021 23:36:46 -0000 The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=a59e2982fe3e6339629cc77fe9d349d60e03a05e commit a59e2982fe3e6339629cc77fe9d349d60e03a05e Author: Alexander Motin AuthorDate: 2021-03-01 23:35:45 +0000 Commit: Alexander Motin CommitDate: 2021-03-01 23:36:33 +0000 Optimize out few extra memory accesses. MFC after: 1 week --- sys/cam/ctl/ctl_backend_block.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/cam/ctl/ctl_backend_block.c b/sys/cam/ctl/ctl_backend_block.c index f50e47a2a6c1..3663bff10f2a 100644 --- a/sys/cam/ctl/ctl_backend_block.c +++ b/sys/cam/ctl/ctl_backend_block.c @@ -438,7 +438,6 @@ ctl_be_block_move_done(union ctl_io *io, bool samethr) struct ctl_lba_len_flags *lbalen; beio = (struct ctl_be_block_io *)PRIV(io)->ptr; - be_lun = beio->lun; DPRINTF("entered\n"); io->scsiio.kern_rel_offset += io->scsiio.kern_data_len; @@ -448,7 +447,7 @@ ctl_be_block_move_done(union ctl_io *io, bool samethr) */ if ((io->io_hdr.flags & CTL_FLAG_ABORT) == 0 && (io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE) { - lbalen = ARGS(beio->io); + lbalen = ARGS(io); if (lbalen->flags & CTL_LLF_READ) { ctl_set_success(&io->scsiio); } else if (lbalen->flags & CTL_LLF_COMPARE) { @@ -476,6 +475,7 @@ ctl_be_block_move_done(union ctl_io *io, bool samethr) * This move done routine is generally called in the SIM's * interrupt context, and therefore we cannot block. */ + be_lun = (struct ctl_be_block_lun *)CTL_BACKEND_LUN(io); if (samethr) { be_lun->dispatch(be_lun, beio); } else { @@ -1280,7 +1280,7 @@ ctl_be_block_cw_dispatch_ws(struct ctl_be_block_lun *be_lun, DPRINTF("entered\n"); beio = (struct ctl_be_block_io *)PRIV(io)->ptr; - lbalen = ARGS(beio->io); + lbalen = ARGS(io); if (lbalen->flags & ~(SWS_LBDATA | SWS_UNMAP | SWS_ANCHOR | SWS_NDOB) || (lbalen->flags & (SWS_UNMAP | SWS_ANCHOR) && be_lun->unmap == NULL)) { From owner-dev-commits-src-main@freebsd.org Tue Mar 2 00:19:55 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7F32F551B27; Tue, 2 Mar 2021 00:19:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DqHnl3C18z4XQc; Tue, 2 Mar 2021 00:19:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 60E955281; Tue, 2 Mar 2021 00:19:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1220Jtxi047943; Tue, 2 Mar 2021 00:19:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1220JtBp047942; Tue, 2 Mar 2021 00:19:55 GMT (envelope-from git) Date: Tue, 2 Mar 2021 00:19:55 GMT Message-Id: <202103020019.1220JtBp047942@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 8742817ba62e - main - FFS extattr: fix handling of the tail MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8742817ba62ec604156c139727155d36f5fbad06 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2021 00:19:55 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=8742817ba62ec604156c139727155d36f5fbad06 commit 8742817ba62ec604156c139727155d36f5fbad06 Author: Konstantin Belousov AuthorDate: 2021-03-01 15:24:11 +0000 Commit: Konstantin Belousov CommitDate: 2021-03-02 00:19:34 +0000 FFS extattr: fix handling of the tail There are three issues with change that stopped truncating ea area before write, and resulted in possible zero tail in the ea area: - Truncate to zero checked i_ea_len after the reference was dropped, making the last drop effectively truncate to zero length always. - Loop to fill uio for zeroing specified too large length, that triggered assert in normal situation. - Integrity check could trip over the tail, instead we must allow partial header or header with zero length, and clamp ea image in memory at it. Reported by: arichardson Tested by: arichardson, pho Sponsored by: The FreeBSD Foundation MFC after: 3 days Fixup: 5e198e7646a27412c0541719f7bf1bbc0bd89223 Differential Revision: https://reviews.freebsd.org/D28999 --- sys/ufs/ffs/ffs_vnops.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c index 050a6f66be17..dc638595eb7b 100644 --- a/sys/ufs/ffs/ffs_vnops.c +++ b/sys/ufs/ffs/ffs_vnops.c @@ -1346,13 +1346,20 @@ ffs_rdextattr(u_char **p, struct vnode *vp, struct thread *td) /* Validate disk xattrfile contents. */ for (eap = (void *)eae, eaend = (void *)(eae + easize); eap < eaend; eap = eapnext) { + /* Detect zeroed out tail */ + if (eap->ea_length < sizeof(*eap) || eap->ea_length == 0) { + easize = (const u_char *)eap - eae; + break; + } + eapnext = EXTATTR_NEXT(eap); - /* Bogusly short entry or bogusly long entry. */ - if (eap->ea_length < sizeof(*eap) || eapnext > eaend) { + /* Bogusly long entry. */ + if (eapnext > eaend) { free(eae, M_TEMP); return (EINTEGRITY); } } + ip->i_ea_len = easize; *p = eae; return (0); } @@ -1407,7 +1414,6 @@ ffs_open_ea(struct vnode *vp, struct ucred *cred, struct thread *td) ffs_unlock_ea(vp); return (error); } - ip->i_ea_len = dp->di_extsize; ip->i_ea_error = 0; ip->i_ea_refs++; ffs_unlock_ea(vp); @@ -1426,6 +1432,7 @@ ffs_close_ea(struct vnode *vp, int commit, struct ucred *cred, struct thread *td struct ufs2_dinode *dp; size_t ea_len, tlen; int error, i, lcnt; + bool truncate; ip = VTOI(vp); @@ -1436,6 +1443,7 @@ ffs_close_ea(struct vnode *vp, int commit, struct ucred *cred, struct thread *td } dp = ip->i_din2; error = ip->i_ea_error; + truncate = false; if (commit && error == 0) { ASSERT_VOP_ELOCKED(vp, "ffs_close_ea commit"); if (cred == NOCRED) @@ -1452,12 +1460,12 @@ ffs_close_ea(struct vnode *vp, int commit, struct ucred *cred, struct thread *td liovec[0].iov_base = ip->i_ea_area; liovec[0].iov_len = ip->i_ea_len; - for (i = 1, tlen = ea_len; i < lcnt; i++) { + for (i = 1, tlen = ea_len - ip->i_ea_len; i < lcnt; i++) { liovec[i].iov_base = __DECONST(void *, zero_region); liovec[i].iov_len = MIN(ZERO_REGION_SIZE, tlen); tlen -= liovec[i].iov_len; } - MPASS(tlen == ip->i_ea_len); + MPASS(tlen == 0); luio.uio_iov = liovec; luio.uio_offset = 0; @@ -1466,6 +1474,8 @@ ffs_close_ea(struct vnode *vp, int commit, struct ucred *cred, struct thread *td luio.uio_rw = UIO_WRITE; luio.uio_td = td; error = ffs_extwrite(vp, &luio, IO_EXT | IO_SYNC, cred); + if (error == 0 && ip->i_ea_len == 0) + truncate = true; } if (--ip->i_ea_refs == 0) { free(ip->i_ea_area, M_TEMP); @@ -1475,7 +1485,7 @@ ffs_close_ea(struct vnode *vp, int commit, struct ucred *cred, struct thread *td } ffs_unlock_ea(vp); - if (commit && error == 0 && ip->i_ea_len == 0) + if (truncate) ffs_truncate(vp, 0, IO_EXT, cred); return (error); } From owner-dev-commits-src-main@freebsd.org Tue Mar 2 02:10:58 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 962AA555C4C; Tue, 2 Mar 2021 02:10:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DqLFt3vfPz4gBZ; Tue, 2 Mar 2021 02:10:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 77650672C; Tue, 2 Mar 2021 02:10:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1222AwxJ001680; Tue, 2 Mar 2021 02:10:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1222Awlj001679; Tue, 2 Mar 2021 02:10:58 GMT (envelope-from git) Date: Tue, 2 Mar 2021 02:10:58 GMT Message-Id: <202103020210.1222Awlj001679@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 7f72497ef756 - main - libc: Use musl's optimized strchr and strchrnul MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7f72497ef756ff7d03d5560c2d1c1f92f73fcb52 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2021 02:10:58 -0000 The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=7f72497ef756ff7d03d5560c2d1c1f92f73fcb52 commit 7f72497ef756ff7d03d5560c2d1c1f92f73fcb52 Author: Ed Maste AuthorDate: 2021-03-02 01:57:36 +0000 Commit: Ed Maste CommitDate: 2021-03-02 02:09:59 +0000 libc: Use musl's optimized strchr and strchrnul Parentheses added to HASZERO macro to avoid a GCC warning, and formatted with clang-format as we have adopted these and don't consider them 'contrib' code. Obtained from: musl (snapshot at commit 4d0a82170a25) Reviewed by: kib (libc integration), mjg (both earlier) MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D17630 --- lib/libc/string/strchr.c | 65 +++++++++++----------------- lib/libc/string/strchrnul.c | 75 +++++++++++++++++++-------------- libexec/rtld-elf/rtld-libc/Makefile.inc | 4 +- stand/libsa/Makefile | 2 +- 4 files changed, 70 insertions(+), 76 deletions(-) diff --git a/lib/libc/string/strchr.c b/lib/libc/string/strchr.c index 61244da4519c..4a20ea658252 100644 --- a/lib/libc/string/strchr.c +++ b/lib/libc/string/strchr.c @@ -1,56 +1,39 @@ /*- - * SPDX-License-Identifier: BSD-3-Clause + * SPDX-License-Identifier: MIT * - * Copyright (c) 1990, 1993 - * The Regents of the University of California. All rights reserved. + * Copyright (c) 2005-2014 Rich Felker, et al. * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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. + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "@(#)index.c 8.1 (Berkeley) 6/4/93"; -#endif /* LIBC_SCCS and not lint */ #include __FBSDID("$FreeBSD$"); -#include #include +char *__strchrnul(const char *, int); + char * -strchr(const char *p, int ch) +strchr(const char *s, int c) { - char c; - - c = ch; - for (;; ++p) { - if (*p == c) - return ((char *)p); - if (*p == '\0') - return (NULL); - } - /* NOTREACHED */ + char *r = __strchrnul(s, c); + return *(unsigned char *)r == (unsigned char)c ? r : NULL; } __weak_reference(strchr, index); diff --git a/lib/libc/string/strchrnul.c b/lib/libc/string/strchrnul.c index 1c777be1854f..e1fb83886042 100644 --- a/lib/libc/string/strchrnul.c +++ b/lib/libc/string/strchrnul.c @@ -1,51 +1,62 @@ /*- - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * SPDX-License-Identifier: MIT * - * Copyright (c) 2013 Niclas Zeising + * Copyright (c) 2005-2014 Rich Felker, et al. * - * 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. + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: * - * 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. + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - #include __FBSDID("$FreeBSD$"); -#include +#include +#include #include -__weak_reference(__strchrnul, strchrnul); +#define ALIGN (sizeof(size_t)) +#define ONES ((size_t)-1 / UCHAR_MAX) +#define HIGHS (ONES * (UCHAR_MAX / 2 + 1)) +#define HASZERO(x) (((x)-ONES) & ~(x)&HIGHS) char *__strchrnul(const char *, int); char * -__strchrnul(const char *p, int ch) +__strchrnul(const char *s, int c) { - char c; + c = (unsigned char)c; + if (!c) + return (char *)s + strlen(s); - c = ch; - for (;; ++p) { - if (*p == c || *p == '\0') - return ((char *)p); - } - /* NOTREACHED */ +#ifdef __GNUC__ + typedef size_t __attribute__((__may_alias__)) word; + const word *w; + for (; (uintptr_t)s % ALIGN; s++) + if (!*s || *(unsigned char *)s == c) + return (char *)s; + size_t k = ONES * c; + for (w = (void *)s; !HASZERO(*w) && !HASZERO(*w ^ k); w++) + ; + s = (void *)w; +#endif + for (; *s && *(unsigned char *)s != c; s++) + ; + return (char *)s; } +__weak_reference(__strchrnul, strchrnul); diff --git a/libexec/rtld-elf/rtld-libc/Makefile.inc b/libexec/rtld-elf/rtld-libc/Makefile.inc index d682472c3cca..d5f5993e3f16 100644 --- a/libexec/rtld-elf/rtld-libc/Makefile.inc +++ b/libexec/rtld-elf/rtld-libc/Makefile.inc @@ -41,8 +41,8 @@ CFLAGS.errlst.c+=-I${LIBC_SRCTOP}/include # Use the string and memory .o files from libc instead of rebuilding them (they # might be using optimized assembly and duplicating that logic here is awkward). _libc_string_objects= bcmp bcopy bzero memset memchr memcmp memcpy memmove \ - stpncpy strcat strchr strcmp stpcpy strcpy strcspn strdup strlcat strlcpy \ - strlen strncmp strncpy strrchr strsep strspn strstr strtok + stpncpy strcat strchr strchrnul strcmp stpcpy strcpy strcspn strdup \ + strlcat strlcpy strlen strncmp strncpy strrchr strsep strspn strstr strtok # Also use all the syscall .o files from libc_nossp_pic: _libc_other_objects= sigsetjmp lstat stat fstat fstatat fstatfs syscall \ cerror geteuid getegid sigfastblock munmap mprotect \ diff --git a/stand/libsa/Makefile b/stand/libsa/Makefile index 6fe916405fe4..838fefb260a8 100644 --- a/stand/libsa/Makefile +++ b/stand/libsa/Makefile @@ -29,7 +29,7 @@ SRCS+= ntoh.c .PATH: ${LIBCSRC}/string SRCS+= bcmp.c bcopy.c bzero.c ffs.c fls.c \ memccpy.c memchr.c memcmp.c memcpy.c memmove.c memset.c \ - strcat.c strchr.c strcmp.c strcpy.c stpcpy.c stpncpy.c \ + strcat.c strchr.c strchrnul.c strcmp.c strcpy.c stpcpy.c stpncpy.c \ strcspn.c strlcat.c strlcpy.c strlen.c strncat.c strncmp.c strncpy.c \ strnlen.c strpbrk.c strrchr.c strsep.c strspn.c strstr.c strtok.c swab.c From owner-dev-commits-src-main@freebsd.org Tue Mar 2 04:34:19 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BD7F455A2AE; Tue, 2 Mar 2021 04:34:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DqPRH50r5z4pQL; Tue, 2 Mar 2021 04:34:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9DFAB10B80; Tue, 2 Mar 2021 04:34:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1224YJsh091003; Tue, 2 Mar 2021 04:34:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1224YJrm091002; Tue, 2 Mar 2021 04:34:19 GMT (envelope-from git) Date: Tue, 2 Mar 2021 04:34:19 GMT Message-Id: <202103020434.1224YJrm091002@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: b85a67f54a40 - main - Optimize TX coalescing by keeping pointer to last mbuf. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b85a67f54a40053e75658a17c620b89bafaba67f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2021 04:34:19 -0000 The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=b85a67f54a40053e75658a17c620b89bafaba67f commit b85a67f54a40053e75658a17c620b89bafaba67f Author: Alexander Motin AuthorDate: 2021-03-02 04:31:34 +0000 Commit: Alexander Motin CommitDate: 2021-03-02 04:34:11 +0000 Optimize TX coalescing by keeping pointer to last mbuf. Before m_cat() each time traversed through all the coalesced chain. MFC after: 1 week --- sys/dev/iscsi/icl_soft.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sys/dev/iscsi/icl_soft.c b/sys/dev/iscsi/icl_soft.c index a5696647169a..c66d8ccdb5fd 100644 --- a/sys/dev/iscsi/icl_soft.c +++ b/sys/dev/iscsi/icl_soft.c @@ -849,6 +849,7 @@ static void icl_conn_send_pdus(struct icl_conn *ic, struct icl_pdu_stailq *queue) { struct icl_pdu *request, *request2; + struct mbuf *m; struct socket *so; long available, size, size2; int coalesced, error; @@ -908,8 +909,8 @@ icl_conn_send_pdus(struct icl_conn *ic, struct icl_pdu_stailq *queue) return; } if (coalesce) { - coalesced = 1; - for (;;) { + m = request->ip_bhs_mbuf; + for (coalesced = 1; ; coalesced++) { request2 = STAILQ_FIRST(queue); if (request2 == NULL) break; @@ -926,13 +927,14 @@ icl_conn_send_pdus(struct icl_conn *ic, struct icl_pdu_stailq *queue) icl_conn_fail(ic); return; } - m_cat(request->ip_bhs_mbuf, request2->ip_bhs_mbuf); + while (m->m_next) + m = m->m_next; + m_cat(m, request2->ip_bhs_mbuf); request2->ip_bhs_mbuf = NULL; request->ip_bhs_mbuf->m_pkthdr.len += size2; size += size2; STAILQ_REMOVE_AFTER(queue, request, ip_next); icl_soft_pdu_done(request2, 0); - coalesced++; } #if 0 if (coalesced > 1) { From owner-dev-commits-src-main@freebsd.org Tue Mar 2 07:02:16 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D3A6A55E524; Tue, 2 Mar 2021 07:02:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DqSk05gPhz3Cwp; Tue, 2 Mar 2021 07:02:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B57FE1255C; Tue, 2 Mar 2021 07:02:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 12272GEi085314; Tue, 2 Mar 2021 07:02:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 12272GYX085313; Tue, 2 Mar 2021 07:02:16 GMT (envelope-from git) Date: Tue, 2 Mar 2021 07:02:16 GMT Message-Id: <202103020702.12272GYX085313@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Grehan Subject: git: 95331c228a39 - main - Import wireguard fixes from pfSense 2.5 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: grehan X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 95331c228a39b44cb96c4d0142ed8afec8a4d063 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2021 07:02:16 -0000 The branch main has been updated by grehan: URL: https://cgit.FreeBSD.org/src/commit/?id=95331c228a39b44cb96c4d0142ed8afec8a4d063 commit 95331c228a39b44cb96c4d0142ed8afec8a4d063 Author: Peter Grehan AuthorDate: 2021-02-27 04:15:04 +0000 Commit: Peter Grehan CommitDate: 2021-03-02 04:55:46 +0000 Import wireguard fixes from pfSense 2.5 Merge the following fixes from https://github.com/pfsense/FreeBSD-src 1940e7d3 Save address of ingress packets to allow wg to work on HA 8f5531f1 Fix connection to IPv6 endpoint 825ed9ee Fix tcpdump for wg IPv6 rx tunnel traffic 2ec232d3 Fix issue with replying to INITIATION messages in server mode ec77593a Return immediately in wg_init if in DETACH'd state 0f0dde6f Remove unnecessary wg debug printf on transmit 2766dc94 Detect and fix case in wg_init() where sockets weren't cleaned up b62cc7ac Close the UDP tunnel sockets when the interface has been stopped Reviewed by: kevans Obtained from: pfSense 2.5 MFC after: 3 days Relnotes: yes Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D28962 --- sys/dev/if_wg/module/if_wg_session.c | 45 +++++++++++++++++++++++++++++++++--- sys/dev/if_wg/module/module.c | 23 ++++++++++++++---- 2 files changed, 60 insertions(+), 8 deletions(-) diff --git a/sys/dev/if_wg/module/if_wg_session.c b/sys/dev/if_wg/module/if_wg_session.c index 54e63d053847..084bc789039d 100644 --- a/sys/dev/if_wg/module/if_wg_session.c +++ b/sys/dev/if_wg/module/if_wg_session.c @@ -1394,8 +1394,8 @@ wg_deliver_in(struct wg_peer *peer) CURVNET_SET(inp->inp_vnet); ip_input(m); CURVNET_RESTORE(); - } else if (version == 6) { - af = AF_INET; + } else if (version == 6) { + af = AF_INET6; BPF_MTAP2(sc->sc_ifp, &af, sizeof(af), m); inp = sotoinpcb(so->so_so6); CURVNET_SET(inp->inp_vnet); @@ -1531,6 +1531,7 @@ wg_handshake(struct wg_softc *sc, struct mbuf *m) peer = CONTAINER_OF(remote, struct wg_peer, p_remote); DPRINTF(sc, "Receiving handshake initiation from peer %llu\n", (unsigned long long)peer->p_id); + wg_peer_set_endpoint_from_tag(peer, t); res = wg_send_response(peer); if (res == 0 && noise_remote_begin_session(&peer->p_remote) == 0) wg_timers_event_session_derived(&peer->p_timers); @@ -1851,6 +1852,40 @@ wg_index_drop(struct wg_softc *sc, uint32_t key0) SLIST_INSERT_HEAD(&peer->p_unused_index, iter, i_unused_entry); } +static int +wg_update_endpoint_addrs(struct wg_endpoint *e, const struct sockaddr *srcsa, + struct ifnet *rcvif) +{ + const struct sockaddr_in *sa4; + const struct sockaddr_in6 *sa6; + int ret = 0; + + /* + * UDP passes a 2-element sockaddr array: first element is the + * source addr/port, second the destination addr/port. + */ + if (srcsa->sa_family == AF_INET) { + sa4 = (const struct sockaddr_in *)srcsa; + e->e_remote.r_sin = sa4[0]; + /* Only update dest if not mcast/bcast */ + if (!(IN_MULTICAST(ntohl(sa4[1].sin_addr.s_addr)) || + sa4[1].sin_addr.s_addr == INADDR_BROADCAST || + in_broadcast(sa4[1].sin_addr, rcvif))) { + e->e_local.l_in = sa4[1].sin_addr; + } + } else if (srcsa->sa_family == AF_INET6) { + sa6 = (const struct sockaddr_in6 *)srcsa; + e->e_remote.r_sin6 = sa6[0]; + /* Only update dest if not multicast */ + if (!IN6_IS_ADDR_MULTICAST(&sa6[1].sin6_addr)) + e->e_local.l_in6 = sa6[1].sin6_addr; + } else { + ret = EAFNOSUPPORT; + } + + return (ret); +} + static void wg_input(struct mbuf *m0, int offset, struct inpcb *inpcb, const struct sockaddr *srcsa, void *_sc) @@ -1882,7 +1917,11 @@ wg_input(struct mbuf *m0, int offset, struct inpcb *inpcb, goto free; } e = wg_mbuf_endpoint_get(m); - e->e_remote.r_sa = *srcsa; + + if (wg_update_endpoint_addrs(e, srcsa, m->m_pkthdr.rcvif)) { + DPRINTF(sc, "unknown family\n"); + goto free; + } verify_endpoint(m); if_inc_counter(sc->sc_ifp, IFCOUNTER_IPACKETS, 1); diff --git a/sys/dev/if_wg/module/module.c b/sys/dev/if_wg/module/module.c index 76c7db01cba1..a40a304616c7 100644 --- a/sys/dev/if_wg/module/module.c +++ b/sys/dev/if_wg/module/module.c @@ -255,7 +255,6 @@ wg_transmit(struct ifnet *ifp, struct mbuf *m) peer = wg_route_lookup(&sc->sc_routes, m, OUT); if (__predict_false(peer == NULL)) { rc = ENOKEY; - printf("peer not found - dropping %p\n", m); /* XXX log */ goto err; } @@ -360,8 +359,15 @@ wg_init(if_ctx_t ctx) struct wg_softc *sc; int rc; + if (iflib_in_detach(ctx)) + return; + sc = iflib_get_softc(ctx); ifp = iflib_get_ifp(ctx); + if (sc->sc_socket.so_so4 != NULL) + printf("XXX wg_init, socket non-NULL %p\n", + sc->sc_socket.so_so4); + wg_socket_reinit(sc, NULL, NULL); rc = wg_socket_init(sc); if (rc) return; @@ -377,6 +383,7 @@ wg_stop(if_ctx_t ctx) sc = iflib_get_softc(ctx); ifp = iflib_get_ifp(ctx); if_link_state_change(ifp, LINK_STATE_DOWN); + wg_socket_reinit(sc, NULL, NULL); } static nvlist_t * @@ -386,13 +393,20 @@ wg_peer_to_nvl(struct wg_peer *peer) int i, count; nvlist_t *nvl; caddr_t key; + size_t sa_sz; struct wg_allowedip *aip; + struct wg_endpoint *ep; if ((nvl = nvlist_create(0)) == NULL) return (NULL); key = peer->p_remote.r_public; nvlist_add_binary(nvl, "public-key", key, WG_KEY_SIZE); - nvlist_add_binary(nvl, "endpoint", &peer->p_endpoint.e_remote, sizeof(struct sockaddr)); + ep = &peer->p_endpoint; + if (ep->e_remote.r_sa.sa_family != 0) { + sa_sz = (ep->e_remote.r_sa.sa_family == AF_INET) ? + sizeof(struct sockaddr_in) : sizeof(struct sockaddr_in6); + nvlist_add_binary(nvl, "endpoint", &ep->e_remote, sa_sz); + } i = count = 0; CK_LIST_FOREACH(rt, &peer->p_routes, r_entry) { count++; @@ -587,13 +601,12 @@ wg_peer_add(struct wg_softc *sc, const nvlist_t *nvl) } if (nvlist_exists_binary(nvl, "endpoint")) { endpoint = nvlist_get_binary(nvl, "endpoint", &size); - if (size != sizeof(*endpoint)) { + if (size > sizeof(peer->p_endpoint.e_remote)) { device_printf(dev, "%s bad length for endpoint %zu\n", __func__, size); err = EBADMSG; goto out; } - memcpy(&peer->p_endpoint.e_remote, endpoint, - sizeof(peer->p_endpoint.e_remote)); + memcpy(&peer->p_endpoint.e_remote, endpoint, size); } if (nvlist_exists_binary(nvl, "pre-shared-key")) { const void *key; From owner-dev-commits-src-main@freebsd.org Tue Mar 2 09:20:39 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B2E8A5622FB; Tue, 2 Mar 2021 09:20:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DqWng4hWtz3LbG; Tue, 2 Mar 2021 09:20:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9408C1439D; Tue, 2 Mar 2021 09:20:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1229KdlU069346; Tue, 2 Mar 2021 09:20:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1229KdmU069345; Tue, 2 Mar 2021 09:20:39 GMT (envelope-from git) Date: Tue, 2 Mar 2021 09:20:39 GMT Message-Id: <202103020920.1229KdmU069345@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Philip Paeps Subject: git: 43afeee2fbf9 - main - share/man/man9: document zero_region(9) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: philip X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 43afeee2fbf99e51ffd0006e6bb4adcbbd80a6f4 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2021 09:20:39 -0000 The branch main has been updated by philip: URL: https://cgit.FreeBSD.org/src/commit/?id=43afeee2fbf99e51ffd0006e6bb4adcbbd80a6f4 commit 43afeee2fbf99e51ffd0006e6bb4adcbbd80a6f4 Author: Ka Ho Ng AuthorDate: 2021-03-02 09:14:05 +0000 Commit: Philip Paeps CommitDate: 2021-03-02 09:14:06 +0000 share/man/man9: document zero_region(9) The zero_region() kernel interface was previously undocumented. Add a new zero_region(9) manual page to document it. Submitted by: Ka Ho Ng Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28914 --- share/man/man9/Makefile | 1 + share/man/man9/zero_region.9 | 86 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 87 insertions(+) diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 50e760d3e047..64e234c3d696 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -442,6 +442,7 @@ MAN= accept_filter.9 \ vrele.9 \ vslock.9 \ watchdog.9 \ + zero_region.9 \ zone.9 MLINKS= unr.9 alloc_unr.9 \ diff --git a/share/man/man9/zero_region.9 b/share/man/man9/zero_region.9 new file mode 100644 index 000000000000..27b1b50be14d --- /dev/null +++ b/share/man/man9/zero_region.9 @@ -0,0 +1,86 @@ +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2021 The FreeBSD Foundation +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd March 2, 2021 +.Dt ZERO_REGION 9 +.Os +.Sh NAME +.Nm zero_region +.Nd Read-only region prefilled with zeroes +.Sh SYNOPSIS +.In sys/param.h +.In sys/systm.h +.In vm/vm_param.h +.Vt extern const void *zero_region ; +.Sh DESCRIPTION +The global variable +.Va zero_region +points to a read-only region prefilled with zeroes. +The size of the region is specified by the +.Dv ZERO_REGION_SIZE +macro. +.Sh IMPLEMENTATION NOTES +The region +.Va zero_region +points to is mapped to the same page multiple times. +.Sh EXAMPLES +.Bd -literal +/* + * This function writes zeroes to the vnode at offset 0 + * with ZERO_REGION_SIZE length. + */ +static int +write_example(struct vnode *vp) +{ + struct thread *td; + struct iovec aiov; + struct uio auio; + int error; + + td = curthread; + + aiov.iov_base = __DECONST(void *, zero_region); + aiov.iov_len = ZERO_REGION_SIZE; + auio.uio_iov = &aiov; + auio.uio_iovcnt = 1; + auio.uio_offset = 0; + auio.uio_resid = ZERO_REGION_SIZE; + auio.uio_segflg = UIO_SYSSPACE; + auio.uio_rw = UIO_WRITE; + auio.uio_td = td; + + error = VOP_WRITE(vp, &auio, 0, td->td_ucred); + return (error); +} +.Ed +.Sh SEE ALSO +.Xr pmap 9 , +.Xr vm_map 9 +.Sh AUTHORS +This manual page was written by +.An Ka Ho Ng Aq Mt khng@FreeBSDFoundation.org +under sponsorship from the FreeBSD Foundation. From owner-dev-commits-src-main@freebsd.org Tue Mar 2 09:48:52 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9F1D0563637; Tue, 2 Mar 2021 09:48:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DqXQD3vQqz3NBk; Tue, 2 Mar 2021 09:48:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 74682145E4; Tue, 2 Mar 2021 09:48:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1229mqWM000937; Tue, 2 Mar 2021 09:48:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1229mqgr000936; Tue, 2 Mar 2021 09:48:52 GMT (envelope-from git) Date: Tue, 2 Mar 2021 09:48:52 GMT Message-Id: <202103020948.1229mqgr000936@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Andrey V. Elsukov" Subject: git: a9f7eba95971 - main - ipfw: add IPv6 support for sockarg opcode. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ae X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a9f7eba9597189c0e438f6986067d31dca1c53b0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2021 09:48:52 -0000 The branch main has been updated by ae: URL: https://cgit.FreeBSD.org/src/commit/?id=a9f7eba9597189c0e438f6986067d31dca1c53b0 commit a9f7eba9597189c0e438f6986067d31dca1c53b0 Author: Andrey V. Elsukov AuthorDate: 2021-03-02 09:45:59 +0000 Commit: Andrey V. Elsukov CommitDate: 2021-03-02 09:45:59 +0000 ipfw: add IPv6 support for sockarg opcode. MFC after: 1 week Sponsored by: Yandex LLC --- sys/netpfil/ipfw/ip_fw2.c | 44 ++++++++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/sys/netpfil/ipfw/ip_fw2.c b/sys/netpfil/ipfw/ip_fw2.c index 7b6cca68fd11..f03180cd3bca 100644 --- a/sys/netpfil/ipfw/ip_fw2.c +++ b/sys/netpfil/ipfw/ip_fw2.c @@ -2620,9 +2620,7 @@ do { \ #ifndef USERSPACE /* not supported in userspace */ struct inpcb *inp = args->inp; struct inpcbinfo *pi; - - if (is_ipv6) /* XXX can we remove this ? */ - break; + bool inp_locked = false; if (proto == IPPROTO_TCP) pi = &V_tcbinfo; @@ -2638,27 +2636,37 @@ do { \ * certainly be inp_user_cookie? */ - /* For incoming packet, lookup up the - inpcb using the src/dest ip/port tuple */ - if (inp == NULL) { - inp = in_pcblookup(pi, - src_ip, htons(src_port), - dst_ip, htons(dst_port), - INPLOOKUP_RLOCKPCB, NULL); - if (inp != NULL) { - tablearg = - inp->inp_socket->so_user_cookie; - if (tablearg) - match = 1; - INP_RUNLOCK(inp); - } - } else { + /* + * For incoming packet lookup the inpcb + * using the src/dest ip/port tuple. + */ + if (is_ipv4 && inp == NULL) { + inp = in_pcblookup(pi, + src_ip, htons(src_port), + dst_ip, htons(dst_port), + INPLOOKUP_RLOCKPCB, NULL); + inp_locked = true; + } +#ifdef INET6 + if (is_ipv6 && inp == NULL) { + inp = in6_pcblookup(pi, + &args->f_id.src_ip6, + htons(src_port), + &args->f_id.dst_ip6, + htons(dst_port), + INPLOOKUP_RLOCKPCB, NULL); + inp_locked = true; + } +#endif /* INET6 */ + if (inp != NULL) { if (inp->inp_socket) { tablearg = inp->inp_socket->so_user_cookie; if (tablearg) match = 1; } + if (inp_locked) + INP_RUNLOCK(inp); } #endif /* !USERSPACE */ break; From owner-dev-commits-src-main@freebsd.org Tue Mar 2 09:57:32 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D7CD5563B54; Tue, 2 Mar 2021 09:57:32 +0000 (UTC) (envelope-from lutz@iks-jena.de) Received: from annwfn.iks-jena.de (annwfn.iks-jena.de [IPv6:2001:4bd8::19]) (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 4DqXcD3mfwz3NpJ; Tue, 2 Mar 2021 09:57:32 +0000 (UTC) (envelope-from lutz@iks-jena.de) X-SMTP-Sender: IPv6:2001:4bd8:0:666:248:54ff:fe12:ee3f Received: from belenus.iks-jena.de (belenus.iks-jena.de [IPv6:2001:4bd8:0:666:248:54ff:fe12:ee3f]) by annwfn.iks-jena.de (8.15.2/8.15.2) with ESMTPS id 1229vGjl032070 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 2 Mar 2021 10:57:16 +0100 X-MSA-Host: belenus.iks-jena.de Received: (from lutz@localhost) by belenus.iks-jena.de (8.14.3/8.14.1/Submit) id 1229vGhI013436; Tue, 2 Mar 2021 10:57:16 +0100 Date: Tue, 2 Mar 2021 10:57:16 +0100 From: Lutz Donnerhacke To: "Andrey V. Elsukov" Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: a9f7eba95971 - main - ipfw: add IPv6 support for sockarg opcode. Message-ID: <20210302095716.GA13378@belenus.iks-jena.de> References: <202103020948.1229mqgr000936@gitrepo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202103020948.1229mqgr000936@gitrepo.freebsd.org> X-message-flag: Please send plain text messages only. Thank you. User-Agent: Mutt/1.5.17 (2007-11-01) X-Rspamd-Queue-Id: 4DqXcD3mfwz3NpJ X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2021 09:57:32 -0000 On Tue, Mar 02, 2021 at 09:48:52AM +0000, Andrey V. Elsukov wrote: > The branch main has been updated by ae: > > URL: https://cgit.FreeBSD.org/src/commit/?id=a9f7eba9597189c0e438f6986067d31dca1c53b0 > > commit a9f7eba9597189c0e438f6986067d31dca1c53b0 > Author: Andrey V. Elsukov > AuthorDate: 2021-03-02 09:45:59 +0000 > Commit: Andrey V. Elsukov > CommitDate: 2021-03-02 09:45:59 +0000 > > ipfw: add IPv6 support for sockarg opcode. > > MFC after: 1 week > Sponsored by: Yandex LLC Can you please use Phabricator next time? From owner-dev-commits-src-main@freebsd.org Tue Mar 2 11:36:16 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 12A9C565BDF; Tue, 2 Mar 2021 11:36:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DqZp804mwz3ktj; Tue, 2 Mar 2021 11:36:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E9BFE160C3; Tue, 2 Mar 2021 11:36:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 122BaFv4045243; Tue, 2 Mar 2021 11:36:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 122BaFnu045242; Tue, 2 Mar 2021 11:36:15 GMT (envelope-from git) Date: Tue, 2 Mar 2021 11:36:15 GMT Message-Id: <202103021136.122BaFnu045242@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 99adf2300612 - main - RACK: fix an issue triggered by using the CDG CC module MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 99adf230061268175a36061130e6adb0882270e8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2021 11:36:16 -0000 The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=99adf230061268175a36061130e6adb0882270e8 commit 99adf230061268175a36061130e6adb0882270e8 Author: Michael Tuexen AuthorDate: 2021-03-02 11:32:16 +0000 Commit: Michael Tuexen CommitDate: 2021-03-02 11:32:16 +0000 RACK: fix an issue triggered by using the CDG CC module Obtained from: rrs@ MFC after: 3 days PR: 238741 Sponsored by: Netlix, Inc. --- sys/netinet/tcp_stacks/rack.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index abb1cd53103a..98a6f0f2e924 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -12305,7 +12305,7 @@ again: sb_offset = tp->snd_nxt - tp->snd_una; else sb_offset = 0; - if ((IN_RECOVERY(tp->t_flags) == 0) || rack->rack_no_prr) { + if ((IN_FASTRECOVERY(tp->t_flags) == 0) || rack->rack_no_prr) { if (rack->r_ctl.rc_tlp_new_data) { /* TLP is forcing out new data */ if (rack->r_ctl.rc_tlp_new_data > (uint32_t) (avail - sb_offset)) { @@ -12319,7 +12319,7 @@ again: new_data_tlp = doing_tlp = 1; } else len = rack_what_can_we_send(tp, rack, cwnd_to_use, avail, sb_offset); - if (IN_RECOVERY(tp->t_flags) && (len > segsiz)) { + if (IN_FASTRECOVERY(tp->t_flags) && (len > segsiz)) { /* * For prr=off, we need to send only 1 MSS * at a time. We do this because another sack could From owner-dev-commits-src-main@freebsd.org Tue Mar 2 12:27:30 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EB576567F7D; Tue, 2 Mar 2021 12:27:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DqbxG6Jr7z3pDS; Tue, 2 Mar 2021 12:27:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C827E16A5E; Tue, 2 Mar 2021 12:27:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 122CRUum011302; Tue, 2 Mar 2021 12:27:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 122CRUDH011301; Tue, 2 Mar 2021 12:27:30 GMT (envelope-from git) Date: Tue, 2 Mar 2021 12:27:30 GMT Message-Id: <202103021227.122CRUDH011301@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Moeller Subject: git: ee21ee1572d4 - main - openzfs: attach pam_zfs_key to build MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: freqlabs X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ee21ee1572d40a3b74f18638dae38c1a9ad1e9e3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2021 12:27:31 -0000 The branch main has been updated by freqlabs: URL: https://cgit.FreeBSD.org/src/commit/?id=ee21ee1572d40a3b74f18638dae38c1a9ad1e9e3 commit ee21ee1572d40a3b74f18638dae38c1a9ad1e9e3 Author: Greg V AuthorDate: 2021-03-02 11:01:14 +0000 Commit: Ryan Moeller CommitDate: 2021-03-02 12:26:59 +0000 openzfs: attach pam_zfs_key to build This PAM module allows unlocking encrypted user home datasets when logging in (and changing passphrase when changing the account password), see https://github.com/openzfs/zfs/pull/9903 Also supposed to unload the key when the last session for the user is done, but there are EBUSY issues: https://github.com/openzfs/zfs/issues/11222#issuecomment-731897858 Submitted by: Greg V Reviewed by: mm MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D28018 --- cddl/lib/Makefile | 7 ++++++- cddl/lib/pam_zfs_key/Makefile | 28 ++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/cddl/lib/Makefile b/cddl/lib/Makefile index 2f360a8684a2..ae6862f70443 100644 --- a/cddl/lib/Makefile +++ b/cddl/lib/Makefile @@ -17,7 +17,8 @@ SUBDIR= drti \ ${_libzfs} \ ${_libzfsbootenv} \ ${_libzpool} \ - ${_libzutil} + ${_libzutil} \ + ${_pam_zfs_key} SUBDIR.${MK_TESTS}+= tests @@ -30,6 +31,9 @@ _libzutil= libzutil _libzfsbootenv= libzfsbootenv _libzpool= libzpool _libtpool= libtpool +.if ${MK_OPENSSL} != "no" +_pam_zfs_key= pam_zfs_key +.endif .endif SUBDIR_DEPEND_libctf= libspl @@ -41,6 +45,7 @@ SUBDIR_DEPEND_libzfs= libavl libnvpair libumem libuutil libzfs_core libzutil SUBDIR_DEPEND_libzpool= libavl libnvpair libumem libicp SUBDIR_DEPEND_libzutil= libavl libtpool SUBDIR_DEPEND_libzfsbootenv= libzfs libnvpair +SUBDIR_DEPEND_pam_zfs_key= libnvpair libuutil libzfs libzfs_core SUBDIR_PARALLEL= diff --git a/cddl/lib/pam_zfs_key/Makefile b/cddl/lib/pam_zfs_key/Makefile new file mode 100644 index 000000000000..cf43802090dd --- /dev/null +++ b/cddl/lib/pam_zfs_key/Makefile @@ -0,0 +1,28 @@ +.PATH: ${SRCTOP}/sys/contrib/openzfs/contrib/pam_zfs_key +.PATH: ${SRCTOP}/sys/contrib/openzfs/include + +PACKAGE= utilities +LIB= pam_zfs_key + +SHLIBDIR?= /usr/lib + +LIBADD= zfs zfs_core nvpair uutil crypto + +SRCS= pam_zfs_key.c + +WARNS?= 2 +CSTD= c99 +CFLAGS+= -DIN_BASE +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/ +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd +CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/module/icp/include +CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h +CFLAGS+= -DHAVE_ISSETUGID +CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/zfs +CFLAGS+= -DRUNSTATEDIR=\"/var/run\" + +.include "../../lib/libpam/modules/Makefile.inc" +.include From owner-dev-commits-src-main@freebsd.org Tue Mar 2 15:13:11 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9735056BDFA; Tue, 2 Mar 2021 15:13:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DqgcR3mhRz4WT7; Tue, 2 Mar 2021 15:13:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7454618FC3; Tue, 2 Mar 2021 15:13:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 122FDBYK038572; Tue, 2 Mar 2021 15:13:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 122FDBTZ038571; Tue, 2 Mar 2021 15:13:11 GMT (envelope-from git) Date: Tue, 2 Mar 2021 15:13:11 GMT Message-Id: <202103021513.122FDBTZ038571@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Glen Barber Subject: git: 0be274d37379 - main - Adjust where UNAME_r is defined for ports builds MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gjb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0be274d3737972532c042d06c53b5807e95aa845 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2021 15:13:11 -0000 The branch main has been updated by gjb: URL: https://cgit.FreeBSD.org/src/commit/?id=0be274d3737972532c042d06c53b5807e95aa845 commit 0be274d3737972532c042d06c53b5807e95aa845 Author: Glen Barber AuthorDate: 2021-03-02 15:11:04 +0000 Commit: Glen Barber CommitDate: 2021-03-02 15:11:04 +0000 Adjust where UNAME_r is defined for ports builds In followup to 80ab50e1de19ca125f05a13937c796d48c4edd4a, export UNAME_r in Makefile.inc1 instead of Makefile.vm. MFC after: 3 days MFC with: 80ab50e1de19 Sponsored by: Rubicon Communications, LLC ("Netgate") --- release/Makefile.inc1 | 3 +++ release/Makefile.vm | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/release/Makefile.inc1 b/release/Makefile.inc1 index 64f7c6e049a4..a97dee9994b6 100644 --- a/release/Makefile.inc1 +++ b/release/Makefile.inc1 @@ -40,3 +40,6 @@ BUILDDATE!= date +%Y%m%d .export BUILDDATE .endif +# Override UNAME_r to allow building ports for a different branch. +UNAME_r= ${REVISION}-${BRANCH} +.export UNAME_r diff --git a/release/Makefile.vm b/release/Makefile.vm index b0bd47521dc5..cad1974e3a6f 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -54,7 +54,7 @@ emulator-portinstall: .if ( ${TARGET_ARCH} != "i386" ) || ( ${MACHINE_ARCH} != "amd64" ) .if !exists(/usr/local/bin/qemu-${TARGET_ARCH}-static) .if exists(${PORTSDIR}/emulators/qemu-user-static/Makefile) - env - UNAME_r="${REVISION}-${BRANCH}" PATH=$$PATH make -C ${PORTSDIR}/emulators/qemu-user-static BATCH=1 all install clean + env - UNAME_r=${UNAME_r} PATH=$$PATH make -C ${PORTSDIR}/emulators/qemu-user-static BATCH=1 all install clean .else .if !exists(/usr/local/sbin/pkg-static) env ASSUME_ALWAYS_YES=yes pkg bootstrap -y From owner-dev-commits-src-main@freebsd.org Tue Mar 2 15:20:54 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 743B956CF1A; Tue, 2 Mar 2021 15:20:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DqgnK4g2hz4Yww; Tue, 2 Mar 2021 15:20:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9ABF918FE0; Tue, 2 Mar 2021 15:20:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 122FKnZT051245; Tue, 2 Mar 2021 15:20:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 122FKnqb051244; Tue, 2 Mar 2021 15:20:49 GMT (envelope-from git) Date: Tue, 2 Mar 2021 15:20:49 GMT Message-Id: <202103021520.122FKnqb051244@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Glen Barber Subject: git: c883b6fd8ccd - main - Include Makefile.inc1 in Makefile.vm, missed in previous change MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gjb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c883b6fd8ccd8d9c50b3f8fbb04da20ac0dec1c4 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2021 15:20:54 -0000 The branch main has been updated by gjb: URL: https://cgit.FreeBSD.org/src/commit/?id=c883b6fd8ccd8d9c50b3f8fbb04da20ac0dec1c4 commit c883b6fd8ccd8d9c50b3f8fbb04da20ac0dec1c4 Author: Glen Barber AuthorDate: 2021-03-02 15:19:59 +0000 Commit: Glen Barber CommitDate: 2021-03-02 15:19:59 +0000 Include Makefile.inc1 in Makefile.vm, missed in previous change MFC after: 3 days MFC with: 80ab50e1de19, 0be274d37379 Sponsored by: Rubicon Communications, LLC ("Netgate") --- release/Makefile.vm | 1 + 1 file changed, 1 insertion(+) diff --git a/release/Makefile.vm b/release/Makefile.vm index cad1974e3a6f..d075fa1fb29c 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -178,3 +178,4 @@ cloudware-release: .include "${.CURDIR}/Makefile.azure" .include "${.CURDIR}/Makefile.gce" .include "${.CURDIR}/Makefile.vagrant" +.include "${.CURDIR}/Makefile.inc1" From owner-dev-commits-src-main@freebsd.org Tue Mar 2 15:21:11 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BAA2F56CEB9; Tue, 2 Mar 2021 15:21:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dqgnf4VHxz4Z5K; Tue, 2 Mar 2021 15:21:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C1DD519280; Tue, 2 Mar 2021 15:21:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 122FL8x9051407; Tue, 2 Mar 2021 15:21:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 122FL8Me051406; Tue, 2 Mar 2021 15:21:08 GMT (envelope-from git) Date: Tue, 2 Mar 2021 15:21:08 GMT Message-Id: <202103021521.122FL8Me051406@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 0401989282d1 - main - vm: Round up npages and alignment for contig reclamation MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0401989282d1bb9972ae2bf4862c2c6c92ae5f27 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2021 15:21:12 -0000 The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=0401989282d1bb9972ae2bf4862c2c6c92ae5f27 commit 0401989282d1bb9972ae2bf4862c2c6c92ae5f27 Author: Mark Johnston AuthorDate: 2021-03-02 15:19:53 +0000 Commit: Mark Johnston CommitDate: 2021-03-02 15:21:02 +0000 vm: Round up npages and alignment for contig reclamation When searching for runs to reclaim, we need to ensure that the entire run will be added to the buddy allocator as a single unit. Otherwise, it will not be visible to vm_phys_alloc_contig() as it is currently implemented. This is a problem for allocation requests that are not a power of 2 in size, as with 9KB jumbo mbuf clusters. Reported by: alc Reviewed by: alc MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28924 --- sys/vm/vm_page.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 20fbbc304490..98391ccecd82 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -2972,17 +2972,29 @@ vm_page_reclaim_contig_domain(int domain, int req, u_long npages, struct vm_domain *vmd; vm_paddr_t curr_low; vm_page_t m_run, m_runs[NRUNS]; - u_long count, reclaimed; + u_long count, minalign, reclaimed; int error, i, options, req_class; KASSERT(npages > 0, ("npages is 0")); KASSERT(powerof2(alignment), ("alignment is not a power of 2")); KASSERT(powerof2(boundary), ("boundary is not a power of 2")); - req_class = req & VM_ALLOC_CLASS_MASK; + + /* + * The caller will attempt an allocation after some runs have been + * reclaimed and added to the vm_phys buddy lists. Due to limitations + * of vm_phys_alloc_contig(), round up the requested length to the next + * power of two or maximum chunk size, and ensure that each run is + * suitably aligned. + */ + minalign = 1ul << imin(flsl(npages - 1), VM_NFREEORDER - 1); + npages = roundup2(npages, minalign); + if (alignment < ptoa(minalign)) + alignment = ptoa(minalign); /* * The page daemon is allowed to dig deeper into the free page list. */ + req_class = req & VM_ALLOC_CLASS_MASK; if (curproc == pageproc && req_class != VM_ALLOC_INTERRUPT) req_class = VM_ALLOC_SYSTEM; From owner-dev-commits-src-main@freebsd.org Tue Mar 2 16:39:34 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C01C656F3BD; Tue, 2 Mar 2021 16:39:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DqjX653nNz4glx; Tue, 2 Mar 2021 16:39:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9C36619DED; Tue, 2 Mar 2021 16:39:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 122GdYjT046726; Tue, 2 Mar 2021 16:39:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 122GdYiZ046723; Tue, 2 Mar 2021 16:39:34 GMT (envelope-from git) Date: Tue, 2 Mar 2021 16:39:34 GMT Message-Id: <202103021639.122GdYiZ046723@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: 955a3f9ad586 - main - Update capsicum-test to git commit f4d97414d48b8f8356b971ab9f45dc5c70d53c40 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 955a3f9ad586f38395e66127f9f2f4afbf3d5a94 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2021 16:39:34 -0000 The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=955a3f9ad586f38395e66127f9f2f4afbf3d5a94 commit 955a3f9ad586f38395e66127f9f2f4afbf3d5a94 Merge: 0401989282d1 c59f30a57b50 Author: Alex Richardson AuthorDate: 2021-03-02 16:28:26 +0000 Commit: Alex Richardson CommitDate: 2021-03-02 16:38:05 +0000 Update capsicum-test to git commit f4d97414d48b8f8356b971ab9f45dc5c70d53c40 This includes various fixes that I submitted recently such as updating the pdkill() tests for the actual implemented behaviour (https://github.com/google/capsicum-test/pull/53) and lots of changes to avoid calling sleep() and replacing it with reliable synchronization (pull requests 49,51,52,53,54). This should make the testsuite more reliable when running on Jenkins. Additionally, process status is now retrieved using libprocstat instead of running `ps` and parsing the output (https://github.com/google/capsicum-test/pull/50). This fixes one previously failing test and speeds up execution. Overall, this update reduces the total runtime from ~60s to about 4-5 seconds. contrib/capsicum-test/GNUmakefile | 4 + contrib/capsicum-test/capability-fd.cc | 23 +++- contrib/capsicum-test/capmode.cc | 126 +++++++++++++---- contrib/capsicum-test/capsicum-test.cc | 88 ++++++++---- contrib/capsicum-test/capsicum-test.h | 36 ++++- contrib/capsicum-test/makefile | 2 +- contrib/capsicum-test/openat.cc | 1 + contrib/capsicum-test/procdesc.cc | 241 ++++++++++++++++++++++++--------- contrib/capsicum-test/socket.cc | 18 ++- tests/sys/capsicum/Makefile | 2 +- 10 files changed, 412 insertions(+), 129 deletions(-) diff --cc contrib/capsicum-test/openat.cc index 232fb22dd3f7,000000000000..5447558cde89 mode 100644,000000..100644 --- a/contrib/capsicum-test/openat.cc +++ b/contrib/capsicum-test/openat.cc @@@ -1,361 -1,0 +1,362 @@@ +#include +#include +#include +#include + +#include + +#include "capsicum.h" +#include "capsicum-test.h" +#include "syscalls.h" + +// Check an open call works and close the resulting fd. +#define EXPECT_OPEN_OK(f) do { \ ++ SCOPED_TRACE(#f); \ + int _fd = f; \ + EXPECT_OK(_fd); \ + close(_fd); \ + } while (0) + +static void CreateFile(const char *filename, const char *contents) { + int fd = open(filename, O_CREAT|O_RDWR, 0644); + EXPECT_OK(fd); + EXPECT_OK(write(fd, contents, strlen(contents))); + close(fd); +} + +// Test openat(2) in a variety of sitations to ensure that it obeys Capsicum +// "strict relative" rules: +// +// 1. Use strict relative lookups in capability mode or when operating +// relative to a capability. +// 2. When performing strict relative lookups, absolute paths (including +// symlinks to absolute paths) are not allowed, nor are paths containing +// '..' components. +// +// These rules apply when: +// - the directory FD is a Capsicum capability +// - the process is in capability mode +// - the openat(2) operation includes the O_BENEATH flag. +FORK_TEST(Openat, Relative) { + int etc = open("/etc/", O_RDONLY); + EXPECT_OK(etc); + + cap_rights_t r_base; + cap_rights_init(&r_base, CAP_READ, CAP_WRITE, CAP_SEEK, CAP_LOOKUP, CAP_FCNTL, CAP_IOCTL); + cap_rights_t r_ro; + cap_rights_init(&r_ro, CAP_READ); + cap_rights_t r_rl; + cap_rights_init(&r_rl, CAP_READ, CAP_LOOKUP); + + int etc_cap = dup(etc); + EXPECT_OK(etc_cap); + EXPECT_OK(cap_rights_limit(etc_cap, &r_ro)); + int etc_cap_ro = dup(etc); + EXPECT_OK(etc_cap_ro); + EXPECT_OK(cap_rights_limit(etc_cap_ro, &r_rl)); + int etc_cap_base = dup(etc); + EXPECT_OK(etc_cap_base); + EXPECT_OK(cap_rights_limit(etc_cap_base, &r_base)); +#ifdef HAVE_CAP_FCNTLS_LIMIT + // Also limit fcntl(2) subrights. + EXPECT_OK(cap_fcntls_limit(etc_cap_base, CAP_FCNTL_GETFL)); +#endif +#ifdef HAVE_CAP_IOCTLS_LIMIT + // Also limit ioctl(2) subrights. + cap_ioctl_t ioctl_nread = FIONREAD; + EXPECT_OK(cap_ioctls_limit(etc_cap_base, &ioctl_nread, 1)); +#endif + + // openat(2) with regular file descriptors in non-capability mode + // Should Just Work (tm). + EXPECT_OPEN_OK(openat(etc, "/etc/passwd", O_RDONLY)); + EXPECT_OPEN_OK(openat(AT_FDCWD, "/etc/passwd", O_RDONLY)); + EXPECT_OPEN_OK(openat(etc, "passwd", O_RDONLY)); + EXPECT_OPEN_OK(openat(etc, "../etc/passwd", O_RDONLY)); + + // Lookups relative to capabilities should be strictly relative. + // When not in capability mode, we don't actually require CAP_LOOKUP. + EXPECT_OPEN_OK(openat(etc_cap_ro, "passwd", O_RDONLY)); + EXPECT_OPEN_OK(openat(etc_cap_base, "passwd", O_RDONLY)); + + // Performing openat(2) on a path with leading slash ignores + // the provided directory FD. + EXPECT_OPEN_OK(openat(etc_cap_ro, "/etc/passwd", O_RDONLY)); + EXPECT_OPEN_OK(openat(etc_cap_base, "/etc/passwd", O_RDONLY)); + // Relative lookups that go upward are not allowed. + EXPECT_OPENAT_FAIL_TRAVERSAL(etc_cap_ro, "../etc/passwd", O_RDONLY); + EXPECT_OPENAT_FAIL_TRAVERSAL(etc_cap_base, "../etc/passwd", O_RDONLY); + + // A file opened relative to a capability should itself be a capability. + int fd = openat(etc_cap_base, "passwd", O_RDONLY); + EXPECT_OK(fd); + cap_rights_t rights; + EXPECT_OK(cap_rights_get(fd, &rights)); + EXPECT_RIGHTS_IN(&rights, &r_base); +#ifdef HAVE_CAP_FCNTLS_LIMIT + cap_fcntl_t fcntls; + EXPECT_OK(cap_fcntls_get(fd, &fcntls)); + EXPECT_EQ((cap_fcntl_t)CAP_FCNTL_GETFL, fcntls); +#endif +#ifdef HAVE_CAP_IOCTLS_LIMIT + cap_ioctl_t ioctls[16]; + ssize_t nioctls; + memset(ioctls, 0, sizeof(ioctls)); + nioctls = cap_ioctls_get(fd, ioctls, 16); + EXPECT_OK(nioctls); + EXPECT_EQ(1, nioctls); + EXPECT_EQ((cap_ioctl_t)FIONREAD, ioctls[0]); +#endif + close(fd); + + // Enter capability mode; now ALL lookups are strictly relative. + EXPECT_OK(cap_enter()); + + // Relative lookups on regular files or capabilities with CAP_LOOKUP + // ought to succeed. + EXPECT_OPEN_OK(openat(etc, "passwd", O_RDONLY)); + EXPECT_OPEN_OK(openat(etc_cap_ro, "passwd", O_RDONLY)); + EXPECT_OPEN_OK(openat(etc_cap_base, "passwd", O_RDONLY)); + + // Lookup relative to capabilities without CAP_LOOKUP should fail. + EXPECT_NOTCAPABLE(openat(etc_cap, "passwd", O_RDONLY)); + + // Absolute lookups should fail. + EXPECT_CAPMODE(openat(AT_FDCWD, "/etc/passwd", O_RDONLY)); + EXPECT_OPENAT_FAIL_TRAVERSAL(etc, "/etc/passwd", O_RDONLY); + EXPECT_OPENAT_FAIL_TRAVERSAL(etc_cap_ro, "/etc/passwd", O_RDONLY); + + // Lookups containing '..' should fail in capability mode. + EXPECT_OPENAT_FAIL_TRAVERSAL(etc, "../etc/passwd", O_RDONLY); + EXPECT_OPENAT_FAIL_TRAVERSAL(etc_cap_ro, "../etc/passwd", O_RDONLY); + EXPECT_OPENAT_FAIL_TRAVERSAL(etc_cap_base, "../etc/passwd", O_RDONLY); + + fd = openat(etc, "passwd", O_RDONLY); + EXPECT_OK(fd); + + // A file opened relative to a capability should itself be a capability. + fd = openat(etc_cap_base, "passwd", O_RDONLY); + EXPECT_OK(fd); + EXPECT_OK(cap_rights_get(fd, &rights)); + EXPECT_RIGHTS_IN(&rights, &r_base); + close(fd); + + fd = openat(etc_cap_ro, "passwd", O_RDONLY); + EXPECT_OK(fd); + EXPECT_OK(cap_rights_get(fd, &rights)); + EXPECT_RIGHTS_IN(&rights, &r_rl); + close(fd); +} + +#define TOPDIR "cap_topdir" +#define SUBDIR TOPDIR "/subdir" +class OpenatTest : public ::testing::Test { + public: + // Build a collection of files, subdirs and symlinks: + // /tmp/cap_topdir/ + // /topfile + // /subdir/ + // /subdir/bottomfile + // /symlink.samedir -> topfile + // /dsymlink.samedir -> ./ + // /symlink.down -> subdir/bottomfile + // /dsymlink.down -> subdir/ + // /symlink.absolute_out -> /etc/passwd + // /dsymlink.absolute_out -> /etc/ + // /symlink.relative_in -> ../../tmp/cap_topdir/topfile + // /dsymlink.relative_in -> ../../tmp/cap_topdir/ + // /symlink.relative_out -> ../../etc/passwd + // /dsymlink.relative_out -> ../../etc/ + // /subdir/dsymlink.absolute_in -> /tmp/cap_topdir/ + // /subdir/dsymlink.up -> ../ + // /subdir/symlink.absolute_in -> /tmp/cap_topdir/topfile + // /subdir/symlink.up -> ../topfile + // (In practice, this is a little more complicated because tmpdir might + // not be "/tmp".) + OpenatTest() { + // Create a couple of nested directories + int rc = mkdir(TmpFile(TOPDIR), 0755); + EXPECT_OK(rc); + if (rc < 0) { + EXPECT_EQ(EEXIST, errno); + } + rc = mkdir(TmpFile(SUBDIR), 0755); + EXPECT_OK(rc); + if (rc < 0) { + EXPECT_EQ(EEXIST, errno); + } + + // Figure out a path prefix (like "../..") that gets us to the root + // directory from TmpFile(TOPDIR). + const char *p = TmpFile(TOPDIR); // maybe "/tmp/somewhere/cap_topdir" + std::string dots2root = ".."; + while (*p++ != '\0') { + if (*p == '/') { + dots2root += "/.."; + } + } + + // Create normal files in each. + CreateFile(TmpFile(TOPDIR "/topfile"), "Top-level file"); + CreateFile(TmpFile(SUBDIR "/bottomfile"), "File in subdirectory"); + + // Create various symlinks to files. + EXPECT_OK(symlink("topfile", TmpFile(TOPDIR "/symlink.samedir"))); + EXPECT_OK(symlink("subdir/bottomfile", TmpFile(TOPDIR "/symlink.down"))); + EXPECT_OK(symlink(TmpFile(TOPDIR "/topfile"), TmpFile(SUBDIR "/symlink.absolute_in"))); + EXPECT_OK(symlink("/etc/passwd", TmpFile(TOPDIR "/symlink.absolute_out"))); + std::string dots2top = dots2root + TmpFile(TOPDIR "/topfile"); + EXPECT_OK(symlink(dots2top.c_str(), TmpFile(TOPDIR "/symlink.relative_in"))); + std::string dots2passwd = dots2root + "/etc/passwd"; + EXPECT_OK(symlink(dots2passwd.c_str(), TmpFile(TOPDIR "/symlink.relative_out"))); + EXPECT_OK(symlink("../topfile", TmpFile(SUBDIR "/symlink.up"))); + + // Create various symlinks to directories. + EXPECT_OK(symlink("./", TmpFile(TOPDIR "/dsymlink.samedir"))); + EXPECT_OK(symlink("subdir/", TmpFile(TOPDIR "/dsymlink.down"))); + EXPECT_OK(symlink(TmpFile(TOPDIR "/"), TmpFile(SUBDIR "/dsymlink.absolute_in"))); + EXPECT_OK(symlink("/etc/", TmpFile(TOPDIR "/dsymlink.absolute_out"))); + std::string dots2cwd = dots2root + tmpdir + "/"; + EXPECT_OK(symlink(dots2cwd.c_str(), TmpFile(TOPDIR "/dsymlink.relative_in"))); + std::string dots2etc = dots2root + "/etc/"; + EXPECT_OK(symlink(dots2etc.c_str(), TmpFile(TOPDIR "/dsymlink.relative_out"))); + EXPECT_OK(symlink("../", TmpFile(SUBDIR "/dsymlink.up"))); + + // Open directory FDs for those directories and for cwd. + dir_fd_ = open(TmpFile(TOPDIR), O_RDONLY); + EXPECT_OK(dir_fd_); + sub_fd_ = open(TmpFile(SUBDIR), O_RDONLY); + EXPECT_OK(sub_fd_); + cwd_ = openat(AT_FDCWD, ".", O_RDONLY); + EXPECT_OK(cwd_); + // Move into the directory for the test. + EXPECT_OK(fchdir(dir_fd_)); + } + ~OpenatTest() { + fchdir(cwd_); + close(cwd_); + close(sub_fd_); + close(dir_fd_); + unlink(TmpFile(SUBDIR "/symlink.up")); + unlink(TmpFile(SUBDIR "/symlink.absolute_in")); + unlink(TmpFile(TOPDIR "/symlink.absolute_out")); + unlink(TmpFile(TOPDIR "/symlink.relative_in")); + unlink(TmpFile(TOPDIR "/symlink.relative_out")); + unlink(TmpFile(TOPDIR "/symlink.down")); + unlink(TmpFile(TOPDIR "/symlink.samedir")); + unlink(TmpFile(SUBDIR "/dsymlink.up")); + unlink(TmpFile(SUBDIR "/dsymlink.absolute_in")); + unlink(TmpFile(TOPDIR "/dsymlink.absolute_out")); + unlink(TmpFile(TOPDIR "/dsymlink.relative_in")); + unlink(TmpFile(TOPDIR "/dsymlink.relative_out")); + unlink(TmpFile(TOPDIR "/dsymlink.down")); + unlink(TmpFile(TOPDIR "/dsymlink.samedir")); + unlink(TmpFile(SUBDIR "/bottomfile")); + unlink(TmpFile(TOPDIR "/topfile")); + rmdir(TmpFile(SUBDIR)); + rmdir(TmpFile(TOPDIR)); + } + + // Check openat(2) policing that is common across capabilities, capability mode and O_BENEATH. + void CheckPolicing(int oflag) { + // OK for normal access. + EXPECT_OPEN_OK(openat(dir_fd_, "topfile", O_RDONLY|oflag)); + EXPECT_OPEN_OK(openat(dir_fd_, "subdir/bottomfile", O_RDONLY|oflag)); + EXPECT_OPEN_OK(openat(sub_fd_, "bottomfile", O_RDONLY|oflag)); + EXPECT_OPEN_OK(openat(sub_fd_, ".", O_RDONLY|oflag)); + + // Can't open paths with ".." in them. + EXPECT_OPENAT_FAIL_TRAVERSAL(sub_fd_, "../topfile", O_RDONLY|oflag); + EXPECT_OPENAT_FAIL_TRAVERSAL(sub_fd_, "../subdir/bottomfile", O_RDONLY|oflag); + EXPECT_OPENAT_FAIL_TRAVERSAL(sub_fd_, "..", O_RDONLY|oflag); + +#ifdef HAVE_OPENAT_INTERMEDIATE_DOTDOT + // OK for dotdot lookups that don't escape the top directory + EXPECT_OPEN_OK(openat(dir_fd_, "subdir/../topfile", O_RDONLY|oflag)); +#endif + + // Check that we can't escape the top directory by the cunning + // ruse of going via a subdirectory. + EXPECT_OPENAT_FAIL_TRAVERSAL(dir_fd_, "subdir/../../etc/passwd", O_RDONLY|oflag); + + // Should only be able to open symlinks that stay within the directory. + EXPECT_OPEN_OK(openat(dir_fd_, "symlink.samedir", O_RDONLY|oflag)); + EXPECT_OPEN_OK(openat(dir_fd_, "symlink.down", O_RDONLY|oflag)); + EXPECT_OPENAT_FAIL_TRAVERSAL(dir_fd_, "symlink.absolute_out", O_RDONLY|oflag); + EXPECT_OPENAT_FAIL_TRAVERSAL(dir_fd_, "symlink.relative_in", O_RDONLY|oflag); + EXPECT_OPENAT_FAIL_TRAVERSAL(dir_fd_, "symlink.relative_out", O_RDONLY|oflag); + EXPECT_OPENAT_FAIL_TRAVERSAL(sub_fd_, "symlink.absolute_in", O_RDONLY|oflag); + EXPECT_OPENAT_FAIL_TRAVERSAL(sub_fd_, "symlink.up", O_RDONLY|oflag); + + EXPECT_OPEN_OK(openat(dir_fd_, "dsymlink.samedir/topfile", O_RDONLY|oflag)); + EXPECT_OPEN_OK(openat(dir_fd_, "dsymlink.down/bottomfile", O_RDONLY|oflag)); + EXPECT_OPENAT_FAIL_TRAVERSAL(dir_fd_, "dsymlink.absolute_out/passwd", O_RDONLY|oflag); + EXPECT_OPENAT_FAIL_TRAVERSAL(dir_fd_, "dsymlink.relative_in/topfile", O_RDONLY|oflag); + EXPECT_OPENAT_FAIL_TRAVERSAL(dir_fd_, "dsymlink.relative_out/passwd", O_RDONLY|oflag); + EXPECT_OPENAT_FAIL_TRAVERSAL(sub_fd_, "dsymlink.absolute_in/topfile", O_RDONLY|oflag); + EXPECT_OPENAT_FAIL_TRAVERSAL(sub_fd_, "dsymlink.up/topfile", O_RDONLY|oflag); + + // Although recall that O_NOFOLLOW prevents symlink following in final component. + EXPECT_SYSCALL_FAIL(E_TOO_MANY_LINKS, openat(dir_fd_, "symlink.samedir", O_RDONLY|O_NOFOLLOW|oflag)); + EXPECT_SYSCALL_FAIL(E_TOO_MANY_LINKS, openat(dir_fd_, "symlink.down", O_RDONLY|O_NOFOLLOW|oflag)); + } + + protected: + int dir_fd_; + int sub_fd_; + int cwd_; +}; + +TEST_F(OpenatTest, WithCapability) { + // Any kind of symlink can be opened relative to an ordinary directory FD. + EXPECT_OPEN_OK(openat(dir_fd_, "symlink.samedir", O_RDONLY)); + EXPECT_OPEN_OK(openat(dir_fd_, "symlink.down", O_RDONLY)); + EXPECT_OPEN_OK(openat(dir_fd_, "symlink.absolute_out", O_RDONLY)); + EXPECT_OPEN_OK(openat(dir_fd_, "symlink.relative_in", O_RDONLY)); + EXPECT_OPEN_OK(openat(dir_fd_, "symlink.relative_out", O_RDONLY)); + EXPECT_OPEN_OK(openat(sub_fd_, "symlink.absolute_in", O_RDONLY)); + EXPECT_OPEN_OK(openat(sub_fd_, "symlink.up", O_RDONLY)); + + // Now make both DFDs into Capsicum capabilities. + cap_rights_t r_rl; + cap_rights_init(&r_rl, CAP_READ, CAP_LOOKUP, CAP_FCHDIR); + EXPECT_OK(cap_rights_limit(dir_fd_, &r_rl)); + EXPECT_OK(cap_rights_limit(sub_fd_, &r_rl)); + CheckPolicing(0); + // Use of AT_FDCWD is independent of use of a capability. + // Can open paths starting with "/" against a capability dfd, because the dfd is ignored. +} + +FORK_TEST_F(OpenatTest, InCapabilityMode) { + EXPECT_OK(cap_enter()); // Enter capability mode + CheckPolicing(0); + + // Use of AT_FDCWD is banned in capability mode. + EXPECT_CAPMODE(openat(AT_FDCWD, "topfile", O_RDONLY)); + EXPECT_CAPMODE(openat(AT_FDCWD, "subdir/bottomfile", O_RDONLY)); + EXPECT_CAPMODE(openat(AT_FDCWD, "/etc/passwd", O_RDONLY)); + + // Can't open paths starting with "/" in capability mode. + EXPECT_OPENAT_FAIL_TRAVERSAL(dir_fd_, "/etc/passwd", O_RDONLY); + EXPECT_OPENAT_FAIL_TRAVERSAL(sub_fd_, "/etc/passwd", O_RDONLY); +} + +#ifdef O_BENEATH +TEST_F(OpenatTest, WithFlag) { + CheckPolicing(O_BENEATH); + + // Check with AT_FDCWD. + EXPECT_OPEN_OK(openat(AT_FDCWD, "topfile", O_RDONLY|O_BENEATH)); + EXPECT_OPEN_OK(openat(AT_FDCWD, "subdir/bottomfile", O_RDONLY|O_BENEATH)); + + // Can't open paths starting with "/" with O_BENEATH specified. + EXPECT_OPENAT_FAIL_TRAVERSAL(AT_FDCWD, "/etc/passwd", O_RDONLY|O_BENEATH); + EXPECT_OPENAT_FAIL_TRAVERSAL(dir_fd_, "/etc/passwd", O_RDONLY|O_BENEATH); + EXPECT_OPENAT_FAIL_TRAVERSAL(sub_fd_, "/etc/passwd", O_RDONLY|O_BENEATH); +} + +FORK_TEST_F(OpenatTest, WithFlagInCapabilityMode) { + EXPECT_OK(cap_enter()); // Enter capability mode + CheckPolicing(O_BENEATH); +} +#endif diff --cc tests/sys/capsicum/Makefile index 75dd0238895f,000000000000..ded91803cf8a mode 100644,000000..100644 --- a/tests/sys/capsicum/Makefile +++ b/tests/sys/capsicum/Makefile @@@ -1,56 -1,0 +1,56 @@@ +# $FreeBSD$ + +.include + +TESTSDIR= ${TESTSBASE}/sys/capsicum + +ATF_TESTS_C+= bindat_connectat +ATF_TESTS_C+= ioctls_test + +CFLAGS+= -I${SRCTOP}/tests + +.if ${MK_GOOGLETEST} != no + +.PATH: ${SRCTOP}/contrib/capsicum-test + +GTESTS+= capsicum-test +GTESTS_WRAPPER_SH.capsicum-test= functional + +SRCS.capsicum-test+= \ + capsicum-test-main.cc \ + capsicum-test.cc \ + capability-fd.cc \ + fexecve.cc \ + procdesc.cc \ + capmode.cc \ + fcntl.cc \ + ioctl.cc \ + openat.cc \ + sysctl.cc \ + select.cc \ + mqueue.cc \ + socket.cc \ + sctp.cc \ + capability-fd-pair.cc \ + overhead.cc \ + rename.cc + - LIBADD.capsicum-test+= gtest pthread ++LIBADD.capsicum-test+= gtest pthread procstat +TEST_METADATA.capsicum-test= required_user="unprivileged" + +.for p in mini-me mini-me.noexec mini-me.setuid +PROGS+= $p +NO_SHARED.$p= +SRCS.$p= mini-me.c +.endfor + +BINDIR= ${TESTSDIR} + +BINMODE.mini-me.noexec= ${NOBINMODE} +BINMODE.mini-me.setuid= 4555 + +WARNS.capsicum-test= 3 + +.endif # MK_GOOGLETEST + +.include From owner-dev-commits-src-main@freebsd.org Tue Mar 2 16:50:03 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 05A7156FBA3; Tue, 2 Mar 2021 16:50:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DqjmB6gmrz4hcq; Tue, 2 Mar 2021 16:50:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D3C7719FC3; Tue, 2 Mar 2021 16:50:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 122Go2WX061431; Tue, 2 Mar 2021 16:50:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 122Go2nt061428; Tue, 2 Mar 2021 16:50:02 GMT (envelope-from git) Date: Tue, 2 Mar 2021 16:50:02 GMT Message-Id: <202103021650.122Go2nt061428@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Nathan Whitehorn Subject: git: 2c26d77d989a - main - Remove /boot/efi from mtree, missed in 0b7472b3d8d2. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: nwhitehorn X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2c26d77d989abe48c662eeb6f52f7e4c9b81680c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2021 16:50:03 -0000 The branch main has been updated by nwhitehorn: URL: https://cgit.FreeBSD.org/src/commit/?id=2c26d77d989abe48c662eeb6f52f7e4c9b81680c commit 2c26d77d989abe48c662eeb6f52f7e4c9b81680c Author: Nathan Whitehorn AuthorDate: 2021-03-02 16:47:00 +0000 Commit: Nathan Whitehorn CommitDate: 2021-03-02 16:49:41 +0000 Remove /boot/efi from mtree, missed in 0b7472b3d8d2. This had prevented the bootconfig step from determining if an ESP exists, resulting in its unconditional setup. On BIOS-booted amd64, this wasn't harmful, just unnecessary, but it resulted in failed installations on non-EFI-supporting platforms like powerpc64. MFC after: 3 days --- etc/mtree/BSD.root.dist | 2 -- release/tools/arm.subr | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/etc/mtree/BSD.root.dist b/etc/mtree/BSD.root.dist index f734f7891429..1dc9e179b0fc 100644 --- a/etc/mtree/BSD.root.dist +++ b/etc/mtree/BSD.root.dist @@ -18,8 +18,6 @@ rockchip tags=package=runtime .. .. - efi - .. firmware .. loader.conf.d tags=package=bootloader diff --git a/release/tools/arm.subr b/release/tools/arm.subr index 343d9f3a7034..2f91490c0859 100644 --- a/release/tools/arm.subr +++ b/release/tools/arm.subr @@ -184,6 +184,7 @@ arm_install_base() { TARGET_ARCH=${EMBEDDED_TARGET_ARCH} \ DESTDIR=${DESTDIR} KERNCONF=${KERNEL} \ ${CONF_FILES} installworld installkernel distribution + chroot ${CHROOTDIR} mkdir -p ${DESTDIR}/boot/efi chroot ${CHROOTDIR} mkdir -p ${DESTDIR}/boot/msdos arm_create_user From owner-dev-commits-src-main@freebsd.org Tue Mar 2 18:22:31 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8466F54AE4B; Tue, 2 Mar 2021 18:22:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dqlpv3Nnnz4q39; Tue, 2 Mar 2021 18:22:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 672371B79F; Tue, 2 Mar 2021 18:22:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 122IMVnD091714; Tue, 2 Mar 2021 18:22:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 122IMVDY091713; Tue, 2 Mar 2021 18:22:31 GMT (envelope-from git) Date: Tue, 2 Mar 2021 18:22:31 GMT Message-Id: <202103021822.122IMVDY091713@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 600756afb532 - main - fhlink(2): the syscalls do not take flag MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 600756afb532a86a39fb488f5c4fc7e248921655 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2021 18:22:31 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=600756afb532a86a39fb488f5c4fc7e248921655 commit 600756afb532a86a39fb488f5c4fc7e248921655 Author: Konstantin Belousov AuthorDate: 2021-02-28 00:38:11 +0000 Commit: Konstantin Belousov CommitDate: 2021-03-02 18:16:55 +0000 fhlink(2): the syscalls do not take flag Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D28907 --- lib/libc/sys/fhlink.2 | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/lib/libc/sys/fhlink.2 b/lib/libc/sys/fhlink.2 index da35d2b103e6..029ec8d7c2eb 100644 --- a/lib/libc/sys/fhlink.2 +++ b/lib/libc/sys/fhlink.2 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 23, 2020 +.Dd February 23, 2021 .Dt FHLINK 2 .Os .Sh NAME @@ -95,33 +95,6 @@ the directory associated with the file descriptor .Fa tofd instead of the current working directory. .Pp -Values for -.Fa flag -are constructed by a bitwise-inclusive OR of flags from the following -list, defined in -.In fcntl.h : -.Bl -tag -width indent -.It Dv AT_SYMLINK_FOLLOW -If -.Fa fhp -names a symbolic link, a new link for the target of the symbolic link is -created. -.It Dv AT_BENEATH -Only allow to link to a file which is beneath of the topping directory. -See the description of the -.Dv O_BENEATH -flag in the -.Xr open 2 -manual page. -.It Dv AT_RESOLVE_BENEATH -Only walks paths below the topping directory. -See the description of the -.Dv O_RESOLVE_BENEATH -flag in the -.Xr open 2 -manual page. -.El -.Pp If .Fn fhlinkat is passed the special value From owner-dev-commits-src-main@freebsd.org Tue Mar 2 18:22:32 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A78CB54AAD2; Tue, 2 Mar 2021 18:22:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dqlpw4DM2z4qGc; Tue, 2 Mar 2021 18:22:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 83F351B6A0; Tue, 2 Mar 2021 18:22:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 122IMWHl091736; Tue, 2 Mar 2021 18:22:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 122IMWIE091735; Tue, 2 Mar 2021 18:22:32 GMT (envelope-from git) Date: Tue, 2 Mar 2021 18:22:32 GMT Message-Id: <202103021822.122IMWIE091735@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 20e91ca36a56 - main - open(2): Remove O_BENEATH and AT_BENEATH MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 20e91ca36a56b8db1e6677f577ad011b66dd6eb3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2021 18:22:32 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=20e91ca36a56b8db1e6677f577ad011b66dd6eb3 commit 20e91ca36a56b8db1e6677f577ad011b66dd6eb3 Author: Konstantin Belousov AuthorDate: 2021-02-16 03:31:40 +0000 Commit: Konstantin Belousov CommitDate: 2021-03-02 18:16:55 +0000 open(2): Remove O_BENEATH and AT_BENEATH with the reasoning that the flags did not worked properly, and were not shipped in a release. O_RESOLVE_BENEATH is kept as useful. Reviewed by: markj Tested by: arichardson, pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D28907 --- lib/libc/sys/access.2 | 24 +++------------ lib/libc/sys/chflags.2 | 29 +++++------------- lib/libc/sys/chmod.2 | 29 +++++------------- lib/libc/sys/chown.2 | 29 +++++------------- lib/libc/sys/getfh.2 | 37 +++++------------------ lib/libc/sys/link.2 | 28 +++++------------ lib/libc/sys/open.2 | 77 ++++++++--------------------------------------- lib/libc/sys/stat.2 | 50 +++++-------------------------- lib/libc/sys/unlink.2 | 29 +++++------------- lib/libc/sys/utimensat.2 | 29 +++++------------- sys/kern/vfs_lookup.c | 78 +++++++----------------------------------------- sys/kern/vfs_syscalls.c | 51 +++++++++++++------------------ sys/kern/vfs_vnops.c | 2 -- sys/sys/fcntl.h | 14 ++++----- sys/sys/namei.h | 5 ---- 15 files changed, 112 insertions(+), 399 deletions(-) diff --git a/lib/libc/sys/access.2 b/lib/libc/sys/access.2 index 1cd7eed1301b..13bfd7e5a88a 100644 --- a/lib/libc/sys/access.2 +++ b/lib/libc/sys/access.2 @@ -28,7 +28,7 @@ .\" @(#)access.2 8.2 (Berkeley) 4/1/94 .\" $FreeBSD$ .\" -.Dd September 23, 2020 +.Dd February 23, 2021 .Dt ACCESS 2 .Os .Sh NAME @@ -120,15 +120,10 @@ list, defined in The checks for accessibility are performed using the effective user and group IDs instead of the real user and group ID as required in a call to .Fn access . -.It Dv AT_BENEATH -Only operate on files and directories below the topping directory. -See the description of the -.Dv O_BENEATH -flag in the -.Xr open 2 -manual page. .It Dv AT_RESOLVE_BENEATH -Only walks paths below the topping directory. +Only walk paths below the directory specified by the +.Ar fd +descriptor. See the description of the .Dv O_RESOLVE_BENEATH flag in the @@ -218,17 +213,6 @@ or contained a ".." component leading to a directory outside of the directory hierarchy specified by .Fa fd , and the process is in capability mode. -.It Bq Er ENOTCAPABLE -The -.Dv AT_BENEATH -flag was provided to -.Fn faccessat , -and the absolute -.Fa path -does not have its tail fully contained under the topping directory, -or the relative -.Fa path -escapes it. .El .Sh SEE ALSO .Xr chmod 2 , diff --git a/lib/libc/sys/chflags.2 b/lib/libc/sys/chflags.2 index b6b0b43249c7..a44713904599 100644 --- a/lib/libc/sys/chflags.2 +++ b/lib/libc/sys/chflags.2 @@ -28,7 +28,7 @@ .\" @(#)chflags.2 8.3 (Berkeley) 5/2/95 .\" $FreeBSD$ .\" -.Dd September 23, 2020 +.Dd February 23, 2021 .Dt CHFLAGS 2 .Os .Sh NAME @@ -94,16 +94,10 @@ defined in If .Fa path names a symbolic link, then the flags of the symbolic link are changed. -.It Dv AT_BENEATH -Only allow to change flags for a file which is beneath of -the topping directory. -See the description of the -.Dv O_BENEATH -flag in the -.Xr open 2 -manual page. .It Dv AT_RESOLVE_BENEATH -Only walks paths below the topping directory. +Only walk paths below the directory specified by the +.Ar fd +descriptor. See the description of the .Dv O_RESOLVE_BENEATH flag in the @@ -327,18 +321,9 @@ is an absolute path, or contained a ".." component leading to a directory outside of the directory hierarchy specified by .Fa fd , -and the process is in capability mode. -.It Bq Er ENOTCAPABLE -The -.Dv AT_BENEATH -flag was provided to -.Fn chflagsat , -and the absolute -.Fa path -does not have its tail fully contained under the topping directory, -or the relative -.Fa path -escapes it. +and the process is in capability mode or the +.Dv AT_RESOLVE_BENEATH +flag was specified. .El .Sh SEE ALSO .Xr chflags 1 , diff --git a/lib/libc/sys/chmod.2 b/lib/libc/sys/chmod.2 index 1d66408e3891..0127a5b629e4 100644 --- a/lib/libc/sys/chmod.2 +++ b/lib/libc/sys/chmod.2 @@ -28,7 +28,7 @@ .\" @(#)chmod.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd September 23, 2020 +.Dd February 23, 2021 .Dt CHMOD 2 .Os .Sh NAME @@ -101,16 +101,10 @@ in If .Fa path names a symbolic link, then the mode of the symbolic link is changed. -.It Dv AT_BENEATH -Only allow to change permissions of a file which is beneath of -the topping directory. -See the description of the -.Dv O_BENEATH -flag in the -.Xr open 2 -manual page. .It Dv AT_RESOLVE_BENEATH -Only walks paths below the topping directory. +Only walk paths below the directory specified by the +.Ar fd +descriptor. See the description of the .Dv O_RESOLVE_BENEATH flag in the @@ -310,18 +304,9 @@ is an absolute path, or contained a ".." component leading to a directory outside of the directory hierarchy specified by .Fa fd , -and the process is in capability mode. -.It Bq Er ENOTCAPABLE -The -.Dv AT_BENEATH -flag was provided to -.Fn fchmodat , -and the absolute -.Fa path -does not have its tail fully contained under the topping directory, -or the relative -.Fa path -escapes it. +and the process is in capability mode or the +.Dv AT_RESOLVE_BENEATH +flag was specified. .El .Sh SEE ALSO .Xr chmod 1 , diff --git a/lib/libc/sys/chown.2 b/lib/libc/sys/chown.2 index 64bfdeaa961c..4c45ce9174bb 100644 --- a/lib/libc/sys/chown.2 +++ b/lib/libc/sys/chown.2 @@ -28,7 +28,7 @@ .\" @(#)chown.2 8.4 (Berkeley) 4/19/94 .\" $FreeBSD$ .\" -.Dd September 23, 2020 +.Dd February 23, 2021 .Dt CHOWN 2 .Os .Sh NAME @@ -118,16 +118,10 @@ list, defined in If .Fa path names a symbolic link, ownership of the symbolic link is changed. -.It Dv AT_BENEATH -Only allow to change ownership of a file which is beneath of -the topping directory. -See the description of the -.Dv O_BENEATH -flag in the -.Xr open 2 -manual page. .It Dv AT_RESOLVE_BENEATH -Only walks paths below the topping directory. +Only walk paths below the directory specified by the +.Ar fd +descriptor. See the description of the .Dv O_RESOLVE_BENEATH flag in the @@ -252,18 +246,9 @@ is an absolute path, or contained a ".." component leading to a directory outside of the directory hierarchy specified by .Fa fd , -and the process is in capability mode. -.It Bq Er ENOTCAPABLE -The -.Dv AT_BENEATH -flag was provided to -.Fn fchownat , -and the absolute -.Fa path -does not have its tail fully contained under the topping directory, -or the relative -.Fa path -escapes it. +and the process is in capability mode or the +.Dv AT_RESOLVE_BENEATH +flag was specified. .El .Sh SEE ALSO .Xr chgrp 1 , diff --git a/lib/libc/sys/getfh.2 b/lib/libc/sys/getfh.2 index 5dc5896af6d8..cd3d54f54d7f 100644 --- a/lib/libc/sys/getfh.2 +++ b/lib/libc/sys/getfh.2 @@ -29,7 +29,7 @@ .\" @(#)getfh.2 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd September 23, 2020 +.Dd February 23, 2021 .Dt GETFH 2 .Os .Sh NAME @@ -76,9 +76,7 @@ and .Fn lgetfh except when the .Fa path -specifies a relative path, or the -.Dv AT_BENEATH -flag is provided. +specifies a relative path. For .Fn getfhat and relative @@ -87,13 +85,6 @@ the status is retrieved from a file relative to the directory associated with the file descriptor .Fa fd instead of the current working directory. -For -.Dv AT_BENEATH -and absolute -.Fa path , -the status is retrieved from a file specified by the -.Fa path , -but additional permission checks are performed, see below. .Pp The values for the .Fa flag @@ -105,15 +96,10 @@ defined in If .Fa path names a symbolic link, the status of the symbolic link is returned. -.It Dv AT_BENEATH -Only stat files and directories below the topping directory. -See the description of the -.Dv O_BENEATH -flag in the -.Xr open 2 -manual page. .It Dv AT_RESOLVE_BENEATH -Only walks paths below the topping directory. +Only walk paths below the directory specified by the +.Ar fd +descriptor. See the description of the .Dv O_RESOLVE_BENEATH flag in the @@ -140,19 +126,10 @@ bit is set in When .Fn getfhat is called with an absolute -.Fa path -without the -.Dv AT_BENEATH -flag, it ignores the -.Fa fd -argument. -When -.Dv AT_BENEATH -is specified with an absolute .Fa path , -a directory passed by the +it ignores the .Fa fd -argument is used as the topping point for the resolution. +argument. These system calls are restricted to the superuser. .Sh RETURN VALUES .Rv -std diff --git a/lib/libc/sys/link.2 b/lib/libc/sys/link.2 index c3451da10884..de0efd5e510f 100644 --- a/lib/libc/sys/link.2 +++ b/lib/libc/sys/link.2 @@ -28,7 +28,7 @@ .\" @(#)link.2 8.3 (Berkeley) 1/12/94 .\" $FreeBSD$ .\" -.Dd September 23, 2020 +.Dd February 23, 2021 .Dt LINK 2 .Os .Sh NAME @@ -115,15 +115,10 @@ If .Fa name1 names a symbolic link, a new link for the target of the symbolic link is created. -.It Dv AT_BENEATH -Only allow to link to a file which is beneath of the topping directory. -See the description of the -.Dv O_BENEATH -flag in the -.Xr open 2 -manual page. .It Dv AT_RESOLVE_BENEATH -Only walks paths below the topping directory. +Only walk paths below the directory specified by the +.Ar fd +descriptor. See the description of the .Dv O_RESOLVE_BENEATH flag in the @@ -281,18 +276,9 @@ For example, is absolute or includes a ".." component that escapes the directory hierarchy specified by .Fa fd , -and the process is in capability mode. -.It Bq Er ENOTCAPABLE -The -.Dv AT_BENEATH -flag was provided to -.Fa linkat -and the absolute path -.Fa name1 -does not have its tail fully contained under the topping directory, -or the relative path -.Fa name1 -escapes it. +and the process is in capability mode or the +.Dv AT_RESOLVE_BENEATH +flag was specified. .El .Sh SEE ALSO .Xr chflags 2 , diff --git a/lib/libc/sys/open.2 b/lib/libc/sys/open.2 index e43d012770df..e24c823d039a 100644 --- a/lib/libc/sys/open.2 +++ b/lib/libc/sys/open.2 @@ -28,7 +28,7 @@ .\" @(#)open.2 8.2 (Berkeley) 11/16/93 .\" $FreeBSD$ .\" -.Dd September 23, 2020 +.Dd February 23, 2021 .Dt OPEN 2 .Os .Sh NAME @@ -75,9 +75,7 @@ function is equivalent to the .Fn open function except in the case where the .Fa path -specifies a relative path, or the -.Dv O_BENEATH -flag is provided. +specifies a relative path. For .Fn openat and relative @@ -104,28 +102,10 @@ and the behavior is identical to a call to When .Fn openat is called with an absolute -.Fa path -without the -.Dv O_BENEATH -flag, it ignores the -.Fa fd -argument. -When -.Dv O_BENEATH -is specified with an absolute .Fa path , -a directory passed by the -.Fa fd -argument is used as the topping point for the resolution. -When -.Dv O_BENEATH -is specified with a relative path, the +it ignores the .Fa fd -argument is used both as the starting point, and as the topping point -for the resolution. -See the definition of the -.Dv O_BENEATH -flag below. +argument. .Pp In .Xr capsicum 4 @@ -137,9 +117,7 @@ The argument to .Fn openat must be strictly relative to a file descriptor -.Fa fd , -as defined in -.Pa sys/kern/vfs_lookup.c . +.Fa fd . .Fa path must not be an absolute path and must not contain ".." components which cause the path resolution to escape the directory hierarchy @@ -156,9 +134,8 @@ If the .Dv vfs.lookup_cap_dotdot .Xr sysctl 3 MIB is set to zero, ".." components in the paths, -used in capability mode, or with the -.Dv O_BENEATH -flag, are completely disabled. +used in capability mode, +are completely disabled. If the .Dv vfs.lookup_cap_dotdot_nonlocal MIB is set to zero, ".." is not allowed if found on non-local filesystem. @@ -190,8 +167,7 @@ O_TTY_INIT ignored O_DIRECTORY error if file is not a directory O_CLOEXEC set FD_CLOEXEC upon open O_VERIFY verify the contents of the file -O_BENEATH require resolved path to be strictly relative to topping directory -O_RESOLVE_BENEATH require walked path to be strictly relative to topping directory +O_RESOLVE_BENEATH path resolution must not cross the fd directory .Ed .Pp Opening a file with @@ -319,32 +295,12 @@ means is implementation specific. The run-time linker (rtld) uses this flag to ensure shared objects have been verified before operating on them. .Pp -.Dv O_BENEATH -returns -.Er ENOTCAPABLE -if the specified path, after resolving all symlinks and ".." -references, does not end up with tail residing in the directory hierarchy of -children beneath the topping directory. -Topping directory is the process current directory if relative -.Fa path -is used for -.Fn open , -and the directory referenced by the -.Fa fd -argument when using -.Fn openat . -.Dv O_BENEATH -allows arbitrary prefix that ends up at the topping directory, -after which all further resolved components must be under it. -.Pp .Dv O_RESOLVE_BENEATH returns .Er ENOTCAPABLE if any intermediate component of the specified relative path does not -reside in the directory hierarchy beneath the topping directory. -Comparing to -.Dv O_BENEATH , -absolute paths or even the temporal escape from beneath of the topping +reside in the directory hierarchy beneath the starting directory. +Absolute paths or even the temporal escape from beneath of the starting directory is not allowed. .Pp When @@ -601,19 +557,12 @@ directory outside of the directory hierarchy specified by and the process is in capability mode. .It Bq Er ENOTCAPABLE The -.Dv O_BENEATH -flag was provided, and the absolute -.Fa path -does not have its tail fully contained under the topping directory, -or the relative -.Fa path -escapes it. -.It Bq Er ENOTCAPABLE -The .Dv O_RESOLVE_BENEATH flag was provided, and the relative .Fa path -escapes topping directory. +escapes the +.Ar fd +directory. .El .Sh SEE ALSO .Xr chmod 2 , diff --git a/lib/libc/sys/stat.2 b/lib/libc/sys/stat.2 index 4759d297e8da..0ed70620af63 100644 --- a/lib/libc/sys/stat.2 +++ b/lib/libc/sys/stat.2 @@ -28,7 +28,7 @@ .\" @(#)stat.2 8.4 (Berkeley) 5/1/95 .\" $FreeBSD$ .\" -.Dd September 23, 2020 +.Dd February 23, 2021 .Dt STAT 2 .Os .Sh NAME @@ -84,9 +84,7 @@ and .Fn lstat except when the .Fa path -specifies a relative path, or the -.Dv AT_BENEATH -flag is provided. +specifies a relative path. For .Fn fstatat and relative @@ -95,13 +93,6 @@ the status is retrieved from a file relative to the directory associated with the file descriptor .Fa fd instead of the current working directory. -For -.Dv AT_BENEATH -and absolute -.Fa path , -the status is retrieved from a file specified by the -.Fa path , -but additional permission checks are performed, see below. .Pp The values for the .Fa flag @@ -113,15 +104,8 @@ defined in If .Fa path names a symbolic link, the status of the symbolic link is returned. -.It Dv AT_BENEATH -Only stat files and directories below the topping directory. -See the description of the -.Dv O_BENEATH -flag in the -.Xr open 2 -manual page. .It Dv AT_RESOLVE_BENEATH -Only walks paths below the topping directory. +Only walk paths below the starting directory. See the description of the .Dv O_RESOLVE_BENEATH flag in the @@ -148,19 +132,10 @@ bit is set in When .Fn fstatat is called with an absolute -.Fa path -without the -.Dv AT_BENEATH -flag, it ignores the -.Fa fd -argument. -When -.Dv AT_BENEATH -is specified with an absolute .Fa path , -a directory passed by the +it ignores the .Fa fd -argument is used as the topping point for the resolution. +argument. .Pp The .Fa sb @@ -459,18 +434,9 @@ is an absolute path, or contained a ".." component leading to a directory outside of the directory hierarchy specified by .Fa fd , -and the process is in capability mode. -.It Bq Er ENOTCAPABLE -The -.Dv AT_BENEATH -flag was provided to -.Fn fstatat , -and the absolute -.Fa path -does not have its tail fully contained under the topping directory, -or the relative -.Fa path -escapes it. +and the process is in capability mode or the +.Dv AT_RESOLVE_BENEATH +flag was specified. .El .Sh SEE ALSO .Xr access 2 , diff --git a/lib/libc/sys/unlink.2 b/lib/libc/sys/unlink.2 index 838d4da68af2..11fff875abad 100644 --- a/lib/libc/sys/unlink.2 +++ b/lib/libc/sys/unlink.2 @@ -28,7 +28,7 @@ .\" @(#)unlink.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd September 23, 2020 +.Dd February 23, 2021 .Dt UNLINK 2 .Os .Sh NAME @@ -92,16 +92,10 @@ Remove the directory entry specified by and .Fa path as a directory, not a normal file. -.It Dv AT_BENEATH -Only unlink files and directories which are beneath of the topping -directory. -See the description of the -.Dv O_BENEATH -flag in the -.Xr open 2 -manual page. .It Dv AT_RESOLVE_BENEATH -Only walks paths below the topping directory. +Only walk paths below the directory specified by the +.Ar fd +descriptor. See the description of the .Dv O_RESOLVE_BENEATH flag in the @@ -246,18 +240,9 @@ is an absolute path, or contained a ".." component leading to a directory outside of the directory hierarchy specified by .Fa fd , -and the process is in capability mode. -.It Bq Er ENOTCAPABLE -The -.Dv AT_BENEATH -flag was provided to -.Fn unlinkat , -and the absolute -.Fa path -does not have its tail fully contained under the topping directory, -or the relative -.Fa path -escapes it. +and the process is in capability mode or the +.Dv AT_RESOLVE_BENEATH +flag was specified. .El .Pp In addition to the errors returned by diff --git a/lib/libc/sys/utimensat.2 b/lib/libc/sys/utimensat.2 index 3016d1af72aa..d31ee1f1515a 100644 --- a/lib/libc/sys/utimensat.2 +++ b/lib/libc/sys/utimensat.2 @@ -31,7 +31,7 @@ .\" @(#)utimes.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd September 23, 2020 +.Dd February 23, 2021 .Dt UTIMENSAT 2 .Os .Sh NAME @@ -146,16 +146,10 @@ names a symbolic link, the symbolic link's times are changed. By default, .Fn utimensat changes the times of the file referenced by the symbolic link. -.It Dv AT_BENEATH -Only allow to change the times of a file which is beneath of -the topping directory. -See the description of the -.Dv O_BENEATH -flag in the -.Xr open 2 -manual page. .It Dv AT_RESOLVE_BENEATH -Only walks paths below the topping directory. +Only walk paths below the directory specified by the +.Ar fd +descriptor. See the description of the .Dv O_RESOLVE_BENEATH flag in the @@ -290,18 +284,9 @@ is an absolute path, or contained a ".." component leading to a directory outside of the directory hierarchy specified by .Fa fd , -and the process is in capability mode. -.It Bq Er ENOTCAPABLE -The -.Dv AT_BENEATH -flag was provided to -.Fn utimensat , -and the absolute -.Fa path -does not have its tail fully contained under the topping directory, -or the relative -.Fa path -escapes it. +and the process is in capability mode or the +.Dv AT_RESOLVE_BENEATH +flag was specified. .El .Sh SEE ALSO .Xr chflags 2 , diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index ad65ab11bb1d..4ddd7b63ce5c 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -182,13 +182,6 @@ nameicap_tracker_add(struct nameidata *ndp, struct vnode *dp) if ((ndp->ni_lcf & NI_LCF_CAP_DOTDOT) == 0 || dp->v_type != VDIR) return; cnp = &ndp->ni_cnd; - if ((cnp->cn_flags & BENEATH) != 0 && - (ndp->ni_lcf & NI_LCF_BENEATH_LATCHED) == 0) { - MPASS((ndp->ni_lcf & NI_LCF_LATCH) != 0); - if (dp != ndp->ni_beneath_latch) - return; - ndp->ni_lcf |= NI_LCF_BENEATH_LATCHED; - } nt = malloc(sizeof(*nt), M_NAMEITRACKER, M_WAITOK); vhold(dp); nt->dp = dp; @@ -196,7 +189,7 @@ nameicap_tracker_add(struct nameidata *ndp, struct vnode *dp) } static void -nameicap_cleanup(struct nameidata *ndp, bool clean_latch) +nameicap_cleanup(struct nameidata *ndp) { struct nameicap_tracker *nt, *nt1; @@ -207,10 +200,6 @@ nameicap_cleanup(struct nameidata *ndp, bool clean_latch) vdrop(nt->dp); free(nt, M_NAMEITRACKER); } - if (clean_latch && (ndp->ni_lcf & NI_LCF_LATCH) != 0) { - ndp->ni_lcf &= ~NI_LCF_LATCH; - vrele(ndp->ni_beneath_latch); - } } /* @@ -230,21 +219,17 @@ nameicap_check_dotdot(struct nameidata *ndp, struct vnode *dp) struct nameicap_tracker *nt; struct mount *mp; - if ((ndp->ni_lcf & NI_LCF_CAP_DOTDOT) == 0 || dp == NULL || - dp->v_type != VDIR) + if (dp == NULL || dp->v_type != VDIR || (ndp->ni_lcf & + NI_LCF_STRICTRELATIVE) == 0) return (0); + if ((ndp->ni_lcf & NI_LCF_CAP_DOTDOT) == 0) + return (ENOTCAPABLE); mp = dp->v_mount; if (lookup_cap_dotdot_nonlocal == 0 && mp != NULL && (mp->mnt_flag & MNT_LOCAL) == 0) return (ENOTCAPABLE); TAILQ_FOREACH_REVERSE(nt, &ndp->ni_cap_tracker, nameicap_tracker_head, nm_link) { - if ((ndp->ni_lcf & NI_LCF_LATCH) != 0 && - ndp->ni_beneath_latch == nt->dp) { - ndp->ni_lcf &= ~NI_LCF_BENEATH_LATCHED; - nameicap_cleanup(ndp, false); - return (0); - } if (dp == nt->dp) return (0); } @@ -275,11 +260,6 @@ namei_handle_root(struct nameidata *ndp, struct vnode **dpp) #endif return (ENOTCAPABLE); } - if ((cnp->cn_flags & BENEATH) != 0) { - ndp->ni_lcf |= NI_LCF_BENEATH_ABS; - ndp->ni_lcf &= ~NI_LCF_BENEATH_LATCHED; - nameicap_cleanup(ndp, false); - } while (*(cnp->cn_nameptr) == '/') { cnp->cn_nameptr++; ndp->ni_pathlen--; @@ -297,7 +277,6 @@ namei_setup(struct nameidata *ndp, struct vnode **dpp, struct pwd **pwdp) struct thread *td; struct pwd *pwd; cap_rights_t rights; - struct filecaps dirfd_caps; int error; bool startdir_used; @@ -410,26 +389,8 @@ namei_setup(struct nameidata *ndp, struct vnode **dpp, struct pwd **pwdp) if (error == 0 && (*dpp)->v_type != VDIR) error = ENOTDIR; } - if (error == 0 && (cnp->cn_flags & BENEATH) != 0) { - if (ndp->ni_dirfd == AT_FDCWD) { - ndp->ni_beneath_latch = pwd->pwd_cdir; - vrefact(ndp->ni_beneath_latch); - } else { - rights = *ndp->ni_rightsneeded; - cap_rights_set_one(&rights, CAP_LOOKUP); - error = fgetvp_rights(td, ndp->ni_dirfd, &rights, - &dirfd_caps, &ndp->ni_beneath_latch); - if (error == 0 && (*dpp)->v_type != VDIR) { - vrele(ndp->ni_beneath_latch); - error = ENOTDIR; - } - } - if (error == 0) - ndp->ni_lcf |= NI_LCF_LATCH; - } if (error == 0 && (cnp->cn_flags & RBENEATH) != 0) { - if (cnp->cn_pnbuf[0] == '/' || - (ndp->ni_lcf & NI_LCF_BENEATH_ABS) != 0) { + if (cnp->cn_pnbuf[0] == '/') { error = EINVAL; } else if ((ndp->ni_lcf & NI_LCF_STRICTRELATIVE) == 0) { ndp->ni_lcf |= NI_LCF_STRICTRELATIVE | @@ -452,12 +413,8 @@ namei_setup(struct nameidata *ndp, struct vnode **dpp, struct pwd **pwdp) pwd_drop(pwd); return (error); } - MPASS((ndp->ni_lcf & (NI_LCF_BENEATH_ABS | NI_LCF_LATCH)) != - NI_LCF_BENEATH_ABS); - if (((ndp->ni_lcf & NI_LCF_STRICTRELATIVE) != 0 && - lookup_cap_dotdot != 0) || - ((ndp->ni_lcf & NI_LCF_STRICTRELATIVE) == 0 && - (cnp->cn_flags & BENEATH) != 0)) + if ((ndp->ni_lcf & NI_LCF_STRICTRELATIVE) != 0 && + lookup_cap_dotdot != 0) ndp->ni_lcf |= NI_LCF_CAP_DOTDOT; SDT_PROBE4(vfs, namei, lookup, entry, *dpp, cnp->cn_pnbuf, cnp->cn_flags, false); @@ -636,16 +593,8 @@ namei(struct nameidata *ndp) for (;;) { ndp->ni_startdir = dp; error = lookup(ndp); - if (error != 0) { - /* - * Override an error to not allow user to use - * BENEATH as an oracle. - */ - if ((ndp->ni_lcf & (NI_LCF_LATCH | - NI_LCF_BENEATH_LATCHED)) == NI_LCF_LATCH) - error = ENOTCAPABLE; + if (error != 0) goto out; - } /* * If not a symbolic link, we're done. @@ -657,12 +606,7 @@ namei(struct nameidata *ndp) namei_cleanup_cnp(cnp); } else cnp->cn_flags |= HASBUF; - if ((ndp->ni_lcf & (NI_LCF_LATCH | - NI_LCF_BENEATH_LATCHED)) == NI_LCF_LATCH) { - NDFREE(ndp, 0); - error = ENOTCAPABLE; - } - nameicap_cleanup(ndp, true); + nameicap_cleanup(ndp); pwd_drop(pwd); if (error == 0) NDVALIDATE(ndp); @@ -739,7 +683,7 @@ out: MPASS(error != 0); SDT_PROBE4(vfs, namei, lookup, return, error, NULL, false, ndp); namei_cleanup_cnp(cnp); - nameicap_cleanup(ndp, true); + nameicap_cleanup(ndp); pwd_drop(pwd); return (error); } diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 11fcc7a3e10d..fec9566cb415 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -120,8 +120,6 @@ at2cnpflags(u_int at_flags, u_int mask) res = 0; at_flags &= mask; - if ((at_flags & AT_BENEATH) != 0) - res |= BENEATH; if ((at_flags & AT_RESOLVE_BENEATH) != 0) res |= RBENEATH; if ((at_flags & AT_SYMLINK_FOLLOW) != 0) @@ -1498,12 +1496,11 @@ sys_linkat(struct thread *td, struct linkat_args *uap) int flag; flag = uap->flag; - if ((flag & ~(AT_SYMLINK_FOLLOW | AT_BENEATH | - AT_RESOLVE_BENEATH)) != 0) + if ((flag & ~(AT_SYMLINK_FOLLOW | AT_RESOLVE_BENEATH)) != 0) return (EINVAL); return (kern_linkat(td, uap->fd1, uap->fd2, uap->path1, uap->path2, - UIO_USERSPACE, at2cnpflags(flag, AT_SYMLINK_FOLLOW | AT_BENEATH | + UIO_USERSPACE, at2cnpflags(flag, AT_SYMLINK_FOLLOW | AT_RESOLVE_BENEATH))); } @@ -1873,7 +1870,7 @@ kern_funlinkat(struct thread *td, int dfd, const char *path, int fd, restart: bwillwrite(); NDINIT_ATRIGHTS(&nd, DELETE, LOCKPARENT | LOCKLEAF | AUDITVNODE1 | - at2cnpflags(flag, AT_BENEATH | AT_RESOLVE_BENEATH), + at2cnpflags(flag, AT_RESOLVE_BENEATH), pathseg, path, dfd, &cap_unlinkat_rights, td); if ((error = namei(&nd)) != 0) { if (error == EINVAL) @@ -2078,7 +2075,7 @@ kern_accessat(struct thread *td, int fd, const char *path, struct nameidata nd; int error; - if ((flag & ~(AT_EACCESS | AT_BENEATH | AT_RESOLVE_BENEATH)) != 0) + if ((flag & ~(AT_EACCESS | AT_RESOLVE_BENEATH)) != 0) return (EINVAL); if (amode != F_OK && (amode & ~(R_OK | W_OK | X_OK)) != 0) return (EINVAL); @@ -2099,7 +2096,7 @@ kern_accessat(struct thread *td, int fd, const char *path, usecred = cred; AUDIT_ARG_VALUE(amode); NDINIT_ATRIGHTS(&nd, LOOKUP, FOLLOW | LOCKSHARED | LOCKLEAF | - AUDITVNODE1 | at2cnpflags(flag, AT_BENEATH | AT_RESOLVE_BENEATH), + AUDITVNODE1 | at2cnpflags(flag, AT_RESOLVE_BENEATH), pathseg, path, fd, &cap_fstat_rights, td); if ((error = namei(&nd)) != 0) goto out; @@ -2390,13 +2387,12 @@ kern_statat(struct thread *td, int flag, int fd, const char *path, struct nameidata nd; int error; - if ((flag & ~(AT_SYMLINK_NOFOLLOW | AT_BENEATH | - AT_RESOLVE_BENEATH)) != 0) + if ((flag & ~(AT_SYMLINK_NOFOLLOW | AT_RESOLVE_BENEATH)) != 0) return (EINVAL); - NDINIT_ATRIGHTS(&nd, LOOKUP, at2cnpflags(flag, AT_BENEATH | - AT_RESOLVE_BENEATH | AT_SYMLINK_NOFOLLOW) | LOCKSHARED | LOCKLEAF | - AUDITVNODE1, pathseg, path, fd, &cap_fstat_rights, td); + NDINIT_ATRIGHTS(&nd, LOOKUP, at2cnpflags(flag, AT_RESOLVE_BENEATH | + AT_SYMLINK_NOFOLLOW) | LOCKSHARED | LOCKLEAF | AUDITVNODE1, + pathseg, path, fd, &cap_fstat_rights, td); if ((error = namei(&nd)) != 0) return (error); @@ -2714,8 +2710,7 @@ int sys_chflagsat(struct thread *td, struct chflagsat_args *uap) { *** 176 LINES SKIPPED *** From owner-dev-commits-src-main@freebsd.org Tue Mar 2 18:22:34 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EB79154AD54; Tue, 2 Mar 2021 18:22:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dqlpy3N4nz4pvq; Tue, 2 Mar 2021 18:22:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C36D81B636; Tue, 2 Mar 2021 18:22:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 122IMXVo091755; Tue, 2 Mar 2021 18:22:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 122IMXu9091754; Tue, 2 Mar 2021 18:22:33 GMT (envelope-from git) Date: Tue, 2 Mar 2021 18:22:33 GMT Message-Id: <202103021822.122IMXu9091754@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 59e749428111 - main - Do not call nameicap_tracker_add() for dotdot case. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 59e749428111c029116a4302a544c7cc18b33772 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2021 18:22:35 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=59e749428111c029116a4302a544c7cc18b33772 commit 59e749428111c029116a4302a544c7cc18b33772 Author: Konstantin Belousov AuthorDate: 2021-02-28 00:12:43 +0000 Commit: Konstantin Belousov CommitDate: 2021-03-02 18:21:14 +0000 Do not call nameicap_tracker_add() for dotdot case. Reviewed by: markj Tested by: arichardson, pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D28907 --- sys/kern/vfs_lookup.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index 4ddd7b63ce5c..73290e8da05f 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -1258,7 +1258,8 @@ success: } } if (ndp->ni_vp != NULL) { - nameicap_tracker_add(ndp, ndp->ni_vp); + if ((cnp->cn_flags & ISDOTDOT) == 0) + nameicap_tracker_add(ndp, ndp->ni_vp); if ((cnp->cn_flags & (FAILIFEXISTS | ISSYMLINK)) == FAILIFEXISTS) goto bad_eexist; } From owner-dev-commits-src-main@freebsd.org Tue Mar 2 18:22:36 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4870B54AE92; Tue, 2 Mar 2021 18:22:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dqlq0119Kz4qH3; Tue, 2 Mar 2021 18:22:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E27A91B90A; Tue, 2 Mar 2021 18:22:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 122IMZ2v091799; Tue, 2 Mar 2021 18:22:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 122IMZQT091798; Tue, 2 Mar 2021 18:22:35 GMT (envelope-from git) Date: Tue, 2 Mar 2021 18:22:35 GMT Message-Id: <202103021822.122IMZQT091798@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: e8a2862aa038 - main - Add nameicap_cleanup_from(), to clean tracker list starting from some element MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e8a2862aa0384c75603f801625e309a3dae0ed05 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2021 18:22:36 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e8a2862aa0384c75603f801625e309a3dae0ed05 commit e8a2862aa0384c75603f801625e309a3dae0ed05 Author: Konstantin Belousov AuthorDate: 2021-02-28 00:14:43 +0000 Commit: Konstantin Belousov CommitDate: 2021-03-02 18:21:30 +0000 Add nameicap_cleanup_from(), to clean tracker list starting from some element Reviewed by: markj Tested by: arichardson, pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D28907 --- sys/kern/vfs_lookup.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index cdd4a914239f..abc01c73e24c 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -192,19 +192,26 @@ nameicap_tracker_add(struct nameidata *ndp, struct vnode *dp) } static void -nameicap_cleanup(struct nameidata *ndp) +nameicap_cleanup_from(struct nameidata *ndp, struct nameicap_tracker *first) { struct nameicap_tracker *nt, *nt1; - KASSERT(TAILQ_EMPTY(&ndp->ni_cap_tracker) || - (ndp->ni_lcf & NI_LCF_CAP_DOTDOT) != 0, ("not strictrelative")); - TAILQ_FOREACH_SAFE(nt, &ndp->ni_cap_tracker, nm_link, nt1) { + nt = first; + TAILQ_FOREACH_FROM_SAFE(nt, &ndp->ni_cap_tracker, nm_link, nt1) { TAILQ_REMOVE(&ndp->ni_cap_tracker, nt, nm_link); vdrop(nt->dp); free(nt, M_NAMEITRACKER); } } +static void +nameicap_cleanup(struct nameidata *ndp) +{ + KASSERT(TAILQ_EMPTY(&ndp->ni_cap_tracker) || + (ndp->ni_lcf & NI_LCF_CAP_DOTDOT) != 0, ("not strictrelative")); + nameicap_cleanup_from(ndp, NULL); +} + /* * For dotdot lookups in capability mode, only allow the component * lookup to succeed if the resulting directory was already traversed From owner-dev-commits-src-main@freebsd.org Tue Mar 2 18:22:35 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 102E954AE54; Tue, 2 Mar 2021 18:22:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dqlpy6cq1z4q5p; Tue, 2 Mar 2021 18:22:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C996E1B4BC; Tue, 2 Mar 2021 18:22:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 122IMYYE091777; Tue, 2 Mar 2021 18:22:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 122IMYRK091776; Tue, 2 Mar 2021 18:22:34 GMT (envelope-from git) Date: Tue, 2 Mar 2021 18:22:34 GMT Message-Id: <202103021822.122IMYRK091776@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 2388ad7c293f - main - nameicap_tracker_add: avoid duplicates in the tracker list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2388ad7c293fbc89ee239a1adcb87fd158c4e8e9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2021 18:22:35 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=2388ad7c293fbc89ee239a1adcb87fd158c4e8e9 commit 2388ad7c293fbc89ee239a1adcb87fd158c4e8e9 Author: Konstantin Belousov AuthorDate: 2021-02-28 00:13:19 +0000 Commit: Konstantin Belousov CommitDate: 2021-03-02 18:21:23 +0000 nameicap_tracker_add: avoid duplicates in the tracker list Reviewed by: markj Tested by: arichardson, pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D28907 --- sys/kern/vfs_lookup.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index 73290e8da05f..cdd4a914239f 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -182,6 +182,9 @@ nameicap_tracker_add(struct nameidata *ndp, struct vnode *dp) if ((ndp->ni_lcf & NI_LCF_CAP_DOTDOT) == 0 || dp->v_type != VDIR) return; cnp = &ndp->ni_cnd; + nt = TAILQ_LAST(&ndp->ni_cap_tracker, nameicap_tracker_head); + if (nt != NULL && nt->dp == dp) + return; nt = malloc(sizeof(*nt), M_NAMEITRACKER, M_WAITOK); vhold(dp); nt->dp = dp; From owner-dev-commits-src-main@freebsd.org Tue Mar 2 18:22:37 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C76CE54B09B; Tue, 2 Mar 2021 18:22:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dqlq12r1Tz4qKT; Tue, 2 Mar 2021 18:22:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0FC991B637; Tue, 2 Mar 2021 18:22:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 122IMaL7091817; Tue, 2 Mar 2021 18:22:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 122IMaaK091816; Tue, 2 Mar 2021 18:22:36 GMT (envelope-from git) Date: Tue, 2 Mar 2021 18:22:36 GMT Message-Id: <202103021822.122IMaaK091816@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 49c98a4bf3a8 - main - nameicap_check_dotdot: trim tracker on check MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 49c98a4bf3a87ace0df99056fa683805c1645e61 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2021 18:22:38 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=49c98a4bf3a87ace0df99056fa683805c1645e61 commit 49c98a4bf3a87ace0df99056fa683805c1645e61 Author: Konstantin Belousov AuthorDate: 2021-02-28 00:15:21 +0000 Commit: Konstantin Belousov CommitDate: 2021-03-02 18:21:35 +0000 nameicap_check_dotdot: trim tracker on check Tracker should contain exactly the path from the starting directory to the current lookup point. Otherwise we might not detect some cases of dotdot escape. Consequently, if we are walking up the tree by dotdot lookup, we must remove an entries below the walked directory. Reviewed by: markj Tested by: arichardson, pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D28907 --- sys/kern/vfs_lookup.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index abc01c73e24c..b4280f85c5b6 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -240,8 +240,12 @@ nameicap_check_dotdot(struct nameidata *ndp, struct vnode *dp) return (ENOTCAPABLE); TAILQ_FOREACH_REVERSE(nt, &ndp->ni_cap_tracker, nameicap_tracker_head, nm_link) { - if (dp == nt->dp) + if (dp == nt->dp) { + nt = TAILQ_NEXT(nt, nm_link); + if (nt != NULL) + nameicap_cleanup_from(ndp, nt); return (0); + } } return (ENOTCAPABLE); } From owner-dev-commits-src-main@freebsd.org Tue Mar 2 18:22:40 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EB69454AE5F; Tue, 2 Mar 2021 18:22:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dqlq23DCbz4qKY; Tue, 2 Mar 2021 18:22:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 310391B638; Tue, 2 Mar 2021 18:22:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 122IMc4i091839; Tue, 2 Mar 2021 18:22:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 122IMckR091838; Tue, 2 Mar 2021 18:22:38 GMT (envelope-from git) Date: Tue, 2 Mar 2021 18:22:38 GMT Message-Id: <202103021822.122IMckR091838@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 28cd3a673e0e - main - O_RELATIVE_BENEATH: return ENOTCAPABLE instead of EINVAL for abs path MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 28cd3a673e0e32b009fd573764956b280d1affe1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2021 18:22:40 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=28cd3a673e0e32b009fd573764956b280d1affe1 commit 28cd3a673e0e32b009fd573764956b280d1affe1 Author: Konstantin Belousov AuthorDate: 2021-02-28 23:59:12 +0000 Commit: Konstantin Belousov CommitDate: 2021-03-02 18:21:40 +0000 O_RELATIVE_BENEATH: return ENOTCAPABLE instead of EINVAL for abs path Requested and reviewed by: markj Tested by: arichardson, pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28907 --- sys/kern/vfs_lookup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index b4280f85c5b6..e881e8f909a4 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -405,7 +405,7 @@ namei_setup(struct nameidata *ndp, struct vnode **dpp, struct pwd **pwdp) } if (error == 0 && (cnp->cn_flags & RBENEATH) != 0) { if (cnp->cn_pnbuf[0] == '/') { - error = EINVAL; + error = ENOTCAPABLE; } else if ((ndp->ni_lcf & NI_LCF_STRICTRELATIVE) == 0) { ndp->ni_lcf |= NI_LCF_STRICTRELATIVE | NI_LCF_CAP_DOTDOT; From owner-dev-commits-src-main@freebsd.org Tue Mar 2 18:24:13 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5A14D54B483; Tue, 2 Mar 2021 18:24:13 +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 4Dqlrr70mnz4rD5; Tue, 2 Mar 2021 18:24:12 +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 122IO54v047873; Tue, 2 Mar 2021 10:24:05 -0800 (PST) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 122IO5S4047872; Tue, 2 Mar 2021 10:24:05 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202103021824.122IO5S4047872@gndrsh.dnsmgr.net> Subject: Re: git: 2c26d77d989a - main - Remove /boot/efi from mtree, missed in 0b7472b3d8d2. In-Reply-To: <202103021650.122Go2nt061428@gitrepo.freebsd.org> To: Nathan Whitehorn Date: Tue, 2 Mar 2021 10:24:05 -0800 (PST) CC: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org 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: 4Dqlrr70mnz4rD5 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2021 18:24:13 -0000 > The branch main has been updated by nwhitehorn: > > URL: https://cgit.FreeBSD.org/src/commit/?id=2c26d77d989abe48c662eeb6f52f7e4c9b81680c > > commit 2c26d77d989abe48c662eeb6f52f7e4c9b81680c > Author: Nathan Whitehorn > AuthorDate: 2021-03-02 16:47:00 +0000 > Commit: Nathan Whitehorn > CommitDate: 2021-03-02 16:49:41 +0000 > > Remove /boot/efi from mtree, missed in 0b7472b3d8d2. > > This had prevented the bootconfig step from determining if an ESP exists, > resulting in its unconditional setup. On BIOS-booted amd64, this wasn't > harmful, just unnecessary, but it resulted in failed installations on > non-EFI-supporting platforms like powerpc64. > > MFC after: 3 days We certainly must have a better way to detect EFI or not than the existance of /boot/efi???? I would of thought that machdep.bootmethod == EFI was the defanitive way to detect this? > --- > etc/mtree/BSD.root.dist | 2 -- > release/tools/arm.subr | 1 + > 2 files changed, 1 insertion(+), 2 deletions(-) > > diff --git a/etc/mtree/BSD.root.dist b/etc/mtree/BSD.root.dist > index f734f7891429..1dc9e179b0fc 100644 > --- a/etc/mtree/BSD.root.dist > +++ b/etc/mtree/BSD.root.dist > @@ -18,8 +18,6 @@ > rockchip tags=package=runtime > .. > .. > - efi > - .. > firmware > .. > loader.conf.d tags=package=bootloader > diff --git a/release/tools/arm.subr b/release/tools/arm.subr > index 343d9f3a7034..2f91490c0859 100644 > --- a/release/tools/arm.subr > +++ b/release/tools/arm.subr > @@ -184,6 +184,7 @@ arm_install_base() { > TARGET_ARCH=${EMBEDDED_TARGET_ARCH} \ > DESTDIR=${DESTDIR} KERNCONF=${KERNEL} \ > ${CONF_FILES} installworld installkernel distribution > + chroot ${CHROOTDIR} mkdir -p ${DESTDIR}/boot/efi > chroot ${CHROOTDIR} mkdir -p ${DESTDIR}/boot/msdos > > arm_create_user > -- Rod Grimes rgrimes@freebsd.org From owner-dev-commits-src-main@freebsd.org Tue Mar 2 18:26:43 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CFFDF54B2FB; Tue, 2 Mar 2021 18:26:43 +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 4Dqlvl3dVlz4rFP; Tue, 2 Mar 2021 18:26:43 +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 122IQfFT047889; Tue, 2 Mar 2021 10:26:41 -0800 (PST) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 122IQfMN047888; Tue, 2 Mar 2021 10:26:41 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202103021826.122IQfMN047888@gndrsh.dnsmgr.net> Subject: Re: git: 2c26d77d989a - main - Remove /boot/efi from mtree, missed in 0b7472b3d8d2. In-Reply-To: <202103021650.122Go2nt061428@gitrepo.freebsd.org> To: Nathan Whitehorn Date: Tue, 2 Mar 2021 10:26:41 -0800 (PST) CC: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org 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: 4Dqlvl3dVlz4rFP X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2021 18:26:43 -0000 > The branch main has been updated by nwhitehorn: > > URL: https://cgit.FreeBSD.org/src/commit/?id=2c26d77d989abe48c662eeb6f52f7e4c9b81680c > > commit 2c26d77d989abe48c662eeb6f52f7e4c9b81680c > Author: Nathan Whitehorn > AuthorDate: 2021-03-02 16:47:00 +0000 > Commit: Nathan Whitehorn > CommitDate: 2021-03-02 16:49:41 +0000 > > Remove /boot/efi from mtree, missed in 0b7472b3d8d2. > > This had prevented the bootconfig step from determining if an ESP exists, > resulting in its unconditional setup. On BIOS-booted amd64, this wasn't > harmful, just unnecessary, but it resulted in failed installations on > non-EFI-supporting platforms like powerpc64. > > MFC after: 3 days > --- > etc/mtree/BSD.root.dist | 2 -- > release/tools/arm.subr | 1 + > 2 files changed, 1 insertion(+), 2 deletions(-) > > diff --git a/etc/mtree/BSD.root.dist b/etc/mtree/BSD.root.dist > index f734f7891429..1dc9e179b0fc 100644 > --- a/etc/mtree/BSD.root.dist > +++ b/etc/mtree/BSD.root.dist > @@ -18,8 +18,6 @@ > rockchip tags=package=runtime > .. > .. > - efi > - .. > firmware > .. > loader.conf.d tags=package=bootloader > diff --git a/release/tools/arm.subr b/release/tools/arm.subr > index 343d9f3a7034..2f91490c0859 100644 > --- a/release/tools/arm.subr > +++ b/release/tools/arm.subr > @@ -184,6 +184,7 @@ arm_install_base() { > TARGET_ARCH=${EMBEDDED_TARGET_ARCH} \ > DESTDIR=${DESTDIR} KERNCONF=${KERNEL} \ > ${CONF_FILES} installworld installkernel distribution > + chroot ${CHROOTDIR} mkdir -p ${DESTDIR}/boot/efi This fails to apply the proper owner/group and mode values using what ever defaults are in place of the process running the build. > chroot ${CHROOTDIR} mkdir -p ${DESTDIR}/boot/msdos > > arm_create_user > -- Rod Grimes rgrimes@freebsd.org From owner-dev-commits-src-main@freebsd.org Tue Mar 2 18:28:41 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9357754B4BD; Tue, 2 Mar 2021 18:28:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dqly13mNPz4rZb; Tue, 2 Mar 2021 18:28:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 749AE1B7A9; Tue, 2 Mar 2021 18:28:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 122ISf8K092874; Tue, 2 Mar 2021 18:28:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 122ISf7D092873; Tue, 2 Mar 2021 18:28:41 GMT (envelope-from git) Date: Tue, 2 Mar 2021 18:28:41 GMT Message-Id: <202103021828.122ISf7D092873@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: 53a535c1d80a - main - Simplify the capsicum-test wrapper script MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 53a535c1d80a2e5ea33a4e8807647e600402b1d8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2021 18:28:41 -0000 The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=53a535c1d80a2e5ea33a4e8807647e600402b1d8 commit 53a535c1d80a2e5ea33a4e8807647e600402b1d8 Author: Alex Richardson AuthorDate: 2021-03-02 18:27:34 +0000 Commit: Alex Richardson CommitDate: 2021-03-02 18:27:36 +0000 Simplify the capsicum-test wrapper script Instead of running tests one-by-one with the shell wrapper we now run the full gtest testsuite twice (once as root, once as non root). This significantly speeds up running tests despite running them twice. This change also passes the missing -u flag to capsicum-test that caused test failures (https://bugs.freebsd.org/250178) Previously, running the testsuite with the wrapper script took ~3s per test on aarch64 QEMU, i.e. a total of almost 5 minutes. Now it takes 6 seconds to run all tests twice. Before: root@freebsd-aarch64:/usr/tests/sys/capsicum # /usr/bin/time kyua test functional 94/96 passed (2 failed) 309.97 real 58.46 user 244.31 sys After: root@freebsd-aarch64:/usr/tests/sys/capsicum # /usr/bin/time kyua test functional functional:test_root -> passed [2.659s] functional:test_unprivileged -> passed [2.391s] 2/2 passed (0 failed) 5.48 real 1.06 user 2.52 sys This overhead is caused by kyua + atf-sh spawning lots of additional processes and can be avoided by just running the googletest test binary. syscall seconds calls errors fork 39.810229456 1275 0 sigprocmask 13.546928736 572 0 i.e. 1275 processes spawned to run a single test. Test Plan: All tests pass with D28907. PR: 250178 Reviewed By: lwhsu Differential Revision: https://reviews.freebsd.org/D29014 --- tests/sys/capsicum/functional.sh | 70 ++++++++++------------------------------ 1 file changed, 17 insertions(+), 53 deletions(-) diff --git a/tests/sys/capsicum/functional.sh b/tests/sys/capsicum/functional.sh index 6e11a9c4621a..0bd6b2d5e983 100755 --- a/tests/sys/capsicum/functional.sh +++ b/tests/sys/capsicum/functional.sh @@ -29,69 +29,33 @@ # # $FreeBSD$ -SRCDIR=$(atf_get_srcdir) CAPSICUM_TEST_BIN=capsicum-test -check() -{ - local tc=${1} +atf_test_case "test_root" +test_root_head() { - atf_check -s exit:0 -o match:PASSED -e ignore \ - ${SRCDIR}/${CAPSICUM_TEST_BIN} --gtest_filter=${tc} + atf_set descr 'Run capsicum-test as root' + atf_set require.user root } -skip() -{ - local reason=${1} - - atf_skip "${reason}" +test_root_body() { + atf_check -s exit:0 -o match:PASSED -e ignore \ + "$(atf_get_srcdir)/${CAPSICUM_TEST_BIN}" -u "$(id -u tests)" } -add_testcase() -{ - local tc=${1} - local tc_escaped word - - tc_escaped=$(echo ${tc} | sed -e 's/\./__/') - - atf_test_case ${tc_escaped} - - if [ "$(atf_config_get ci false)" = "true" ]; then - case "${tc_escaped}" in - ForkedOpenatTest_WithFlagInCapabilityMode___|OpenatTest__WithFlag) - eval "${tc_escaped}_body() { skip \"https://bugs.freebsd.org/249960\"; }" - ;; - PipePdfork__WildcardWait) - eval "${tc_escaped}_body() { skip \"https://bugs.freebsd.org/244165\"; }" - ;; - Capability__NoBypassDAC) - eval "${tc_escaped}_body() { skip \"https://bugs.freebsd.org/250178\"; }" - ;; - Pdfork__OtherUserForked) - eval "${tc_escaped}_body() { skip \"https://bugs.freebsd.org/250179\"; }" - ;; - *) - eval "${tc_escaped}_body() { check ${tc}; }" - ;; - esac - else - eval "${tc_escaped}_body() { check ${tc}; }" - fi +atf_test_case "test_unprivileged" +test_unprivileged_head() { - atf_add_test_case ${tc_escaped} + atf_set descr 'Run capsicum-test as an unprivileged user' + atf_set require.user unprivileged } -list_tests() -{ - ${SRCDIR}/${CAPSICUM_TEST_BIN} --gtest_list_tests | awk ' - /^[^ ]/ { CAT=$0 } - /^[ ]/ { print CAT $1}' +test_unprivileged_body() { + atf_check -s exit:0 -o match:PASSED -e ignore \ + "$(atf_get_srcdir)/${CAPSICUM_TEST_BIN}" -u "$(id -u)" } -atf_init_test_cases() -{ - local t - for t in `list_tests`; do - add_testcase $t - done +atf_init_test_cases() { + atf_add_test_case test_root + atf_add_test_case test_unprivileged } From owner-dev-commits-src-main@freebsd.org Tue Mar 2 18:32:55 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A99C254B839; Tue, 2 Mar 2021 18:32:55 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dqm2v4S9Xz4sVZ; Tue, 2 Mar 2021 18:32:55 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from comporellon.tachypleus.net (unknown [IPv6:2601:405:4a00:acd:9508:6d03:14a7:a372]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: nwhitehorn/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 40D558E86; Tue, 2 Mar 2021 18:32:55 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Subject: Re: git: 2c26d77d989a - main - Remove /boot/efi from mtree, missed in 0b7472b3d8d2. To: rgrimes@freebsd.org Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202103021824.122IO5S4047872@gndrsh.dnsmgr.net> From: Nathan Whitehorn Message-ID: Date: Tue, 2 Mar 2021 13:32:54 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: <202103021824.122IO5S4047872@gndrsh.dnsmgr.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2021 18:32:55 -0000 On 3/2/21 1:24 PM, Rodney W. Grimes wrote: >> The branch main has been updated by nwhitehorn: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=2c26d77d989abe48c662eeb6f52f7e4c9b81680c >> >> commit 2c26d77d989abe48c662eeb6f52f7e4c9b81680c >> Author: Nathan Whitehorn >> AuthorDate: 2021-03-02 16:47:00 +0000 >> Commit: Nathan Whitehorn >> CommitDate: 2021-03-02 16:49:41 +0000 >> >> Remove /boot/efi from mtree, missed in 0b7472b3d8d2. >> >> This had prevented the bootconfig step from determining if an ESP exists, >> resulting in its unconditional setup. On BIOS-booted amd64, this wasn't >> harmful, just unnecessary, but it resulted in failed installations on >> non-EFI-supporting platforms like powerpc64. >> >> MFC after: 3 days > We certainly must have a better way to detect EFI or not > than the existance of /boot/efi???? > > I would of thought that machdep.bootmethod == EFI was the > defanitive way to detect this? > This is about the installer talking to itself internally. That sysctl doesn't exist on many platforms, and the decision of whether to set up an ESP is a policy decision only loosely related to whether the current system booted by EFI or not. As the commit message notes, this is to detect whether an EFI System Partition exists and is configured, which is *not* the same thing as whether the system booted by EFI. As such, this is a more direct check. -Nathan From owner-dev-commits-src-main@freebsd.org Tue Mar 2 18:38:24 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B08AB54BC5F; Tue, 2 Mar 2021 18:38:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dqm9D4bDDz4sqd; Tue, 2 Mar 2021 18:38:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8BB331B6C1; Tue, 2 Mar 2021 18:38:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 122IcO3e005904; Tue, 2 Mar 2021 18:38:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 122IcOFr005903; Tue, 2 Mar 2021 18:38:24 GMT (envelope-from git) Date: Tue, 2 Mar 2021 18:38:24 GMT Message-Id: <202103021838.122IcOFr005903@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: c97304110a02 - main - tests/sys/audit: add missing comma delimiter between fields MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c97304110a02f9c41b515e7b94d53229ab8f61af Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2021 18:38:24 -0000 The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=c97304110a02f9c41b515e7b94d53229ab8f61af commit c97304110a02f9c41b515e7b94d53229ab8f61af Author: Alex Richardson AuthorDate: 2021-03-02 18:34:42 +0000 Commit: Alex Richardson CommitDate: 2021-03-02 18:37:12 +0000 tests/sys/audit: add missing comma delimiter between fields This makes the `kyua report --verbose` output a lot easier to parse when looking at failed tests. It also fixes the closefrom() test since I tested my changes with this commit but forgot to push it together with fa32350347b4e351a144b5423f0fb2ca9d67f4ca. Fixes: fa32350347b4 ("close_range: add audit support") --- tests/sys/audit/utils.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/sys/audit/utils.c b/tests/sys/audit/utils.c index e94279ff93bf..7b0c3445c253 100644 --- a/tests/sys/audit/utils.c +++ b/tests/sys/audit/utils.c @@ -79,6 +79,7 @@ get_records(const char *auditregex, FILE *pipestream) /* Print the tokens as they are obtained, in the default form */ au_print_flags_tok(memstream, &token, del, AU_OFLAG_NONE); + fputc(',', memstream); bytes += token.len; } From owner-dev-commits-src-main@freebsd.org Tue Mar 2 18:44:52 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E3FF954C162; Tue, 2 Mar 2021 18:44:51 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DqmJd28D9z4vBC; Tue, 2 Mar 2021 18:44:49 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from comporellon.tachypleus.net (unknown [IPv6:2601:405:4a00:acd:9508:6d03:14a7:a372]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: nwhitehorn/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 15DC78E2A; Tue, 2 Mar 2021 18:44:46 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Subject: Re: git: 2c26d77d989a - main - Remove /boot/efi from mtree, missed in 0b7472b3d8d2. To: rgrimes@freebsd.org Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202103021826.122IQfMN047888@gndrsh.dnsmgr.net> From: Nathan Whitehorn Message-ID: Date: Tue, 2 Mar 2021 13:44:45 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: <202103021826.122IQfMN047888@gndrsh.dnsmgr.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2021 18:44:52 -0000 On 3/2/21 1:26 PM, Rodney W. Grimes wrote: >> The branch main has been updated by nwhitehorn: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=2c26d77d989abe48c662eeb6f52f7e4c9b81680c >> >> commit 2c26d77d989abe48c662eeb6f52f7e4c9b81680c >> Author: Nathan Whitehorn >> AuthorDate: 2021-03-02 16:47:00 +0000 >> Commit: Nathan Whitehorn >> CommitDate: 2021-03-02 16:49:41 +0000 >> >> Remove /boot/efi from mtree, missed in 0b7472b3d8d2. >> >> This had prevented the bootconfig step from determining if an ESP exists, >> resulting in its unconditional setup. On BIOS-booted amd64, this wasn't >> harmful, just unnecessary, but it resulted in failed installations on >> non-EFI-supporting platforms like powerpc64. >> >> MFC after: 3 days >> --- >> etc/mtree/BSD.root.dist | 2 -- >> release/tools/arm.subr | 1 + >> 2 files changed, 1 insertion(+), 2 deletions(-) >> >> diff --git a/etc/mtree/BSD.root.dist b/etc/mtree/BSD.root.dist >> index f734f7891429..1dc9e179b0fc 100644 >> --- a/etc/mtree/BSD.root.dist >> +++ b/etc/mtree/BSD.root.dist >> @@ -18,8 +18,6 @@ >> rockchip tags=package=runtime >> .. >> .. >> - efi >> - .. >> firmware >> .. >> loader.conf.d tags=package=bootloader >> diff --git a/release/tools/arm.subr b/release/tools/arm.subr >> index 343d9f3a7034..2f91490c0859 100644 >> --- a/release/tools/arm.subr >> +++ b/release/tools/arm.subr >> @@ -184,6 +184,7 @@ arm_install_base() { >> TARGET_ARCH=${EMBEDDED_TARGET_ARCH} \ >> DESTDIR=${DESTDIR} KERNCONF=${KERNEL} \ >> ${CONF_FILES} installworld installkernel distribution >> + chroot ${CHROOTDIR} mkdir -p ${DESTDIR}/boot/efi > This fails to apply the proper owner/group and mode values > using what ever defaults are in place of the process running > the build. This script is riddled with such issues (see the line immediately below and copied here, for instance). Presumably, as run in the official build environment to generate SD-card images, this works -- if it didn't, large sections of the rest of the script would not either. It did not seem reasonable to fix it for this one case only or to retool the entire script at present, though some of this code should probably be looked at sooner rather than later -- I started with vmimage.subr already, but the rest will take a while. -Nathan >> chroot ${CHROOTDIR} mkdir -p ${DESTDIR}/boot/msdos >> >> arm_create_user >> From owner-dev-commits-src-main@freebsd.org Tue Mar 2 18:48:38 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A9EC354C62E; Tue, 2 Mar 2021 18:48:38 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DqmP24CYNz4vNv; Tue, 2 Mar 2021 18:48:38 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com [66.111.4.227]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bdragon/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 7CA54915A; Tue, 2 Mar 2021 18:48:38 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailauth.nyi.internal (Postfix) with ESMTP id 347C327C0054; Tue, 2 Mar 2021 13:48:38 -0500 (EST) Received: from imap38 ([10.202.2.88]) by compute3.internal (MEProxy); Tue, 02 Mar 2021 13:48:38 -0500 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledruddttddgudduudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enfghrlhcuvffnffculddutddmnecujfgurhepofgfggfkjghffffhvffutgesthdtredt reerjeenucfhrhhomhepfdeurhgrnhguohhnuceuvghrghhrvghnfdcuoegsughrrghgoh hnsefhrhgvvgeuufffrdhorhhgqeenucggtffrrghtthgvrhhnpeejhfeftddutdelgeek gedtgeejkeffvdejtddthefggfevuefggfefledvgefhgfenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegsughrrghgohhnodhmvghsmhhtphgr uhhthhhpvghrshhonhgrlhhithihqddutdegvdefheekieegqddukedutdekheduqdgsug hrrghgohhnpeephfhrvggvuefuffdrohhrghesihhmrghprdgttg X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 9875FCA005D; Tue, 2 Mar 2021 13:48:37 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-206-g078a48fda5-fm-20210226.001-g078a48fd Mime-Version: 1.0 Message-Id: <79dbff79-c40b-4742-98a6-5ce3e2079b70@www.fastmail.com> In-Reply-To: <202103021826.122IQfMN047888@gndrsh.dnsmgr.net> References: <202103021826.122IQfMN047888@gndrsh.dnsmgr.net> Date: Tue, 02 Mar 2021 12:48:17 -0600 From: "Brandon Bergren" To: rgrimes@freebsd.org, "Nathan Whitehorn" Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: =?UTF-8?Q?Re:_git:_2c26d77d989a_-_main_-_Remove_/boot/efi_from_mtree, _mi?= =?UTF-8?Q?ssed_in_0b7472b3d8d2.?= Content-Type: text/plain X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2021 18:48:38 -0000 On Tue, Mar 2, 2021, at 12:26 PM, Rodney W. Grimes wrote: > > This fails to apply the proper owner/group and mode values > using what ever defaults are in place of the process running > the build. Keep in mind that this is the root of a mounted filesystem in the case where it matters, and the filesystem being mounted there doesn't support proper modes anyway, so the mtree values are a bit irrelevant anyway as the actual control of that is in the fstab. -- Brandon Bergren bdragon@FreeBSD.org From owner-dev-commits-src-main@freebsd.org Tue Mar 2 18:50:27 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2E16654C6D3; Tue, 2 Mar 2021 18:50:27 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DqmR70fs2z4vgr; Tue, 2 Mar 2021 18:50:27 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from comporellon.tachypleus.net (unknown [IPv6:2601:405:4a00:acd:9508:6d03:14a7:a372]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: nwhitehorn/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id A2B74836F; Tue, 2 Mar 2021 18:50:26 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Subject: Re: git: 0b7472b3d8d2 - main - Mount the EFI system partition (ESP) on newly-installed systems. To: Kyle Evans Cc: Brandon Bergren , Warner Losh , Kevin Bowling , Jessica Clarke , Colin Percival , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202102232124.11NLOT27012354@gitrepo.freebsd.org> <583f83d8-c78b-d961-d2c5-9693bd36563b@freebsd.org> <743fd126-2077-49b1-9c85-7ccc61616b98@www.fastmail.com> <460ceb98-e0c1-42b3-8e3c-2587c5ce8398@www.fastmail.com> <8215cd95-6905-49da-ab07-65796845613c@www.fastmail.com> <82f307a1-d7e2-0950-510d-148a1a7e61a2@freebsd.org> From: Nathan Whitehorn Message-ID: Date: Tue, 2 Mar 2021 13:50:26 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2021 18:50:27 -0000 On 3/1/21 11:50 AM, Kyle Evans wrote: > On Mon, Mar 1, 2021 at 10:45 AM Nathan Whitehorn wrote: >> >> >> On 3/1/21 11:42 AM, Kyle Evans wrote: >>> On Mon, Mar 1, 2021 at 10:39 AM Nathan Whitehorn wrote: >>>> >>>> On 2/28/21 3:44 PM, Brandon Bergren wrote: >>>>> On Sun, Feb 28, 2021, at 2:25 PM, Warner Losh wrote: >>>>>> Yes. I agree as well. I was just hoping to say just that: EFI is barely >>>>>> theoretically possible, but in reality we'll likely never use it.... >>>>>> >>>>>> The net effect is that we don't want to install efi on powerpc on freebsd. >>>>>> >>>>>> Warner >>>>>> >>>>> Yeah. The code before the change excluded mips and powerpc platforms, and it should continue to do so instead of using the existence of a /boot/efi directory as the only clue. >>>>> >>>>> Currently bsdinstall bails out and leaves powerpc* in a half-installed state because the die in the uname case propagates to the main script, so it never runs the bits after the bootconfig. >>>>> >>>> So that was a deliberate choice to keep the list of places that know >>>> about efi vs. non-EFI centralized. I'd prefer to just not make that >>>> directory on systems where it doesn't apply rather than messing with the >>>> installer. Do you know where it is being made? >>>> -Nathan >>> It's part of the hierarchy in ^/etc/mtree/BSD.root.dist >>> >> Is there a reason it needs to be? The installer bits all make it when >> needed already, so just removing it there seems like the simplest path. > I can't think of a reason, as long as both the release(7) scripts and > the installer create it as needed -- I note that vmimage.subr seems to > create it itself, but arm.subr seems to get it wrong atm. It'll need > to create /boot/efi for PART_SCHEME == GPT, and /boot/msdos should > probably be scoped down to PART_SCHEME == MBR where it's used at the > moment. > I just committed 2c26d77d989a, which implements these changes. I kicked the tires on a few relevant platforms and it seems to work. I used a light touch on arm.subr, since it seems like it needs a bunch more work later, but it should at least do the right thing now. -Nathan From owner-dev-commits-src-main@freebsd.org Tue Mar 2 18:53:30 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C0DB754CA5B; Tue, 2 Mar 2021 18:53:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DqmVf54fjz3Br2; Tue, 2 Mar 2021 18:53:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9C7AF1BD2F; Tue, 2 Mar 2021 18:53:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 122IrU7x031829; Tue, 2 Mar 2021 18:53:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 122IrUsp031827; Tue, 2 Mar 2021 18:53:30 GMT (envelope-from git) Date: Tue, 2 Mar 2021 18:53:30 GMT Message-Id: <202103021853.122IrUsp031827@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 907023b454f0 - main - security(7): mention new W^X sysctls in the manual page MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 907023b454f06a6af87f21f8a9d6de6c11b2d275 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2021 18:53:30 -0000 The branch main has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=907023b454f06a6af87f21f8a9d6de6c11b2d275 commit 907023b454f06a6af87f21f8a9d6de6c11b2d275 Author: Evgeniy Khramtsov AuthorDate: 2021-03-02 18:52:22 +0000 Commit: Gordon Bergling CommitDate: 2021-03-02 18:52:22 +0000 security(7): mention new W^X sysctls in the manual page Reviewed by: emaste, gbe MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28986 --- share/man/man7/security.7 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/share/man/man7/security.7 b/share/man/man7/security.7 index 9ff39c74759c..b4aeb5728313 100644 --- a/share/man/man7/security.7 +++ b/share/man/man7/security.7 @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 8, 2020 +.Dd February 28, 2021 .Dt SECURITY 7 .Os .Sh NAME @@ -1080,6 +1080,12 @@ Enables non-executable stack for 32bit processes. Enabled by default if supported by hardware and corresponding binary. .It Dv kern.elf64.nxstack Enables non-executable stack for 64bit processes. +.It Dv kern.elf32.allow_wx +Enables mapping of simultaneously writable and executable pages for +32bit processes. +.It Dv kern.elf64.allow_wx +Enables mapping of simultaneously writable and executable pages for +64bit processes. .El .Sh SEE ALSO .Xr chflags 1 , From owner-dev-commits-src-main@freebsd.org Tue Mar 2 18:56:37 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2A93454CCA0; Tue, 2 Mar 2021 18:56:37 +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 4DqmZD5fryz3CMC; Tue, 2 Mar 2021 18:56:36 +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 122IuYnN048087; Tue, 2 Mar 2021 10:56:34 -0800 (PST) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 122IuYgV048086; Tue, 2 Mar 2021 10:56:34 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202103021856.122IuYgV048086@gndrsh.dnsmgr.net> Subject: Re: git: 2c26d77d989a - main - Remove /boot/efi from mtree, missed in 0b7472b3d8d2. In-Reply-To: <79dbff79-c40b-4742-98a6-5ce3e2079b70@www.fastmail.com> To: Brandon Bergren Date: Tue, 2 Mar 2021 10:56:34 -0800 (PST) CC: rgrimes@FreeBSD.org, Nathan Whitehorn , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org 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: 4DqmZD5fryz3CMC X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2021 18:56:37 -0000 > > > On Tue, Mar 2, 2021, at 12:26 PM, Rodney W. Grimes wrote: > > > > This fails to apply the proper owner/group and mode values > > using what ever defaults are in place of the process running > > the build. > > Keep in mind that this is the root of a mounted filesystem in the case where it matters, and the filesystem being mounted there doesn't support proper modes anyway, so the mtree values are a bit irrelevant anyway as the actual control of that is in the fstab. That assumes the mount is done and/or kept. My concern is more of a lack security (aka world writable) /boot/efi getting created in a distribution that then is *not* mounted for some reason, either by choice or error. mkdir should be stricken from use when possible, install -d should be used instead. -- Rod Grimes rgrimes@freebsd.org From owner-dev-commits-src-main@freebsd.org Tue Mar 2 18:58:12 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D5AD954CDA1; Tue, 2 Mar 2021 18:58:12 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dqmc45qR1z3CHq; Tue, 2 Mar 2021 18:58:12 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from comporellon.tachypleus.net (unknown [IPv6:2601:405:4a00:acd:9508:6d03:14a7:a372]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: nwhitehorn/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 81F9E9016; Tue, 2 Mar 2021 18:58:12 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Subject: Re: git: 2c26d77d989a - main - Remove /boot/efi from mtree, missed in 0b7472b3d8d2. To: rgrimes@FreeBSD.org, Brandon Bergren Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202103021856.122IuYgV048086@gndrsh.dnsmgr.net> From: Nathan Whitehorn Message-ID: <3d947e4c-a529-0b27-a8d7-415600783e53@freebsd.org> Date: Tue, 2 Mar 2021 13:58:12 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: <202103021856.122IuYgV048086@gndrsh.dnsmgr.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2021 18:58:12 -0000 On 3/2/21 1:56 PM, Rodney W. Grimes wrote: >> >> On Tue, Mar 2, 2021, at 12:26 PM, Rodney W. Grimes wrote: >>> This fails to apply the proper owner/group and mode values >>> using what ever defaults are in place of the process running >>> the build. >> Keep in mind that this is the root of a mounted filesystem in the case where it matters, and the filesystem being mounted there doesn't support proper modes anyway, so the mtree values are a bit irrelevant anyway as the actual control of that is in the fstab. > That assumes the mount is done and/or kept. My concern is more > of a lack security (aka world writable) /boot/efi getting created > in a distribution that then is *not* mounted for some reason, > either by choice or error. > > mkdir should be stricken from use when possible, install -d > should be used instead. > But that can't happen in this code. For one thing, it's only used in a controlled environment to generate SD-card images for a handful of ARM boards. For another the mount is set up and installed in fstab a couple lines further down the same script. -Nathan From owner-dev-commits-src-main@freebsd.org Tue Mar 2 21:11:39 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E1EDE550A66; Tue, 2 Mar 2021 21:11:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DqqZ368bkz3M4h; Tue, 2 Mar 2021 21:11:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C67D41D67E; Tue, 2 Mar 2021 21:11:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 122LBdYq015653; Tue, 2 Mar 2021 21:11:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 122LBdUW015652; Tue, 2 Mar 2021 21:11:39 GMT (envelope-from git) Date: Tue, 2 Mar 2021 21:11:39 GMT Message-Id: <202103022111.122LBdUW015652@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: 06e9c710998b - main - Fix initiator panic after 6895f89fe54e. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 06e9c710998b83a3be21f7f264187fff5d590bc3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2021 21:11:39 -0000 The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=06e9c710998b83a3be21f7f264187fff5d590bc3 commit 06e9c710998b83a3be21f7f264187fff5d590bc3 Author: Alexander Motin AuthorDate: 2021-03-02 21:07:22 +0000 Commit: Alexander Motin CommitDate: 2021-03-02 21:11:29 +0000 Fix initiator panic after 6895f89fe54e. There are sessions without socket that are not disconnecting yet. MFC after: 3 weeks --- sys/dev/iscsi/icl_soft.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/dev/iscsi/icl_soft.c b/sys/dev/iscsi/icl_soft.c index c66d8ccdb5fd..c64f0cfde71b 100644 --- a/sys/dev/iscsi/icl_soft.c +++ b/sys/dev/iscsi/icl_soft.c @@ -1364,9 +1364,11 @@ icl_soft_conn_close(struct icl_conn *ic) ICL_CONN_LOCK(ic); if (!ic->ic_disconnecting) { so = ic->ic_socket; - SOCKBUF_LOCK(&so->so_rcv); + if (so) + SOCKBUF_LOCK(&so->so_rcv); ic->ic_disconnecting = true; - SOCKBUF_UNLOCK(&so->so_rcv); + if (so) + SOCKBUF_UNLOCK(&so->so_rcv); } while (ic->ic_receive_running || ic->ic_send_running) { cv_signal(&ic->ic_receive_cv); From owner-dev-commits-src-main@freebsd.org Tue Mar 2 21:22:31 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BD389551469; Tue, 2 Mar 2021 21:22:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dqqpb53rBz3NVt; Tue, 2 Mar 2021 21:22:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A095A1DAC7; Tue, 2 Mar 2021 21:22:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 122LMVrE029707; Tue, 2 Mar 2021 21:22:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 122LMVLI029706; Tue, 2 Mar 2021 21:22:31 GMT (envelope-from git) Date: Tue, 2 Mar 2021 21:22:31 GMT Message-Id: <202103022122.122LMVLI029706@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: ca4e1ea19fc3 - main - Regenerate src.conf(5) after PIE default change MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ca4e1ea19fc31e8c58feb133719302c94557c1ae Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2021 21:22:31 -0000 The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=ca4e1ea19fc31e8c58feb133719302c94557c1ae commit ca4e1ea19fc31e8c58feb133719302c94557c1ae Author: Kyle Evans AuthorDate: 2021-03-02 21:21:27 +0000 Commit: Kyle Evans CommitDate: 2021-03-02 21:22:05 +0000 Regenerate src.conf(5) after PIE default change --- share/man/man5/src.conf.5 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index 48bd0eb04293..e9fe277f23e7 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd February 13, 2021 +.Dd March 2, 2021 .Dt SRC.CONF 5 .Os .Sh NAME @@ -1351,8 +1351,8 @@ When set, it enforces these options: .It .Va WITHOUT_AUTHPF .El -.It Va WITH_PIE -Build dynamically linked binaries as +.It Va WITHOUT_PIE +Do not build dynamically linked binaries as Position-Independent Executable (PIE). .It Va WITHOUT_PKGBOOTSTRAP Set to not build From owner-dev-commits-src-main@freebsd.org Tue Mar 2 21:22:32 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E60D4551321; Tue, 2 Mar 2021 21:22:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dqqpc68tSz3NF9; Tue, 2 Mar 2021 21:22:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C62921DE89; Tue, 2 Mar 2021 21:22:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 122LMW5s029725; Tue, 2 Mar 2021 21:22:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 122LMWR9029724; Tue, 2 Mar 2021 21:22:32 GMT (envelope-from git) Date: Tue, 2 Mar 2021 21:22:32 GMT Message-Id: <202103022122.122LMWR9029724@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: e4d63c5d5ff8 - main - Remove fmtree(8) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e4d63c5d5ff85d1eb84501d60806651adb552159 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2021 21:22:33 -0000 The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=e4d63c5d5ff85d1eb84501d60806651adb552159 commit e4d63c5d5ff85d1eb84501d60806651adb552159 Author: Kyle Evans AuthorDate: 2021-03-02 21:15:17 +0000 Commit: Kyle Evans CommitDate: 2021-03-02 21:22:05 +0000 Remove fmtree(8) fmtree(8) deprecation was announced on February 12, 2021, and no longer built by default as of that date. The deprecation notice was merged back to stable/12 and stable/13 + releng/13.0. Continue with the plan by finishing the removal. Relnotes: yes --- ObsoleteFiles.inc | 4 + share/mk/src.opts.mk | 1 - tools/build/mk/OptionalObsoleteFiles.inc | 5 - tools/build/options/WITHOUT_FMTREE | 3 - tools/build/options/WITH_FMTREE | 5 - usr.sbin/Makefile | 1 - usr.sbin/fmtree/Makefile | 21 -- usr.sbin/fmtree/Makefile.depend | 18 -- usr.sbin/fmtree/compare.c | 389 ---------------------------- usr.sbin/fmtree/create.c | 431 ------------------------------- usr.sbin/fmtree/excludes.c | 111 -------- usr.sbin/fmtree/extern.h | 59 ----- usr.sbin/fmtree/misc.c | 124 --------- usr.sbin/fmtree/mtree.8 | 408 ----------------------------- usr.sbin/fmtree/mtree.c | 191 -------------- usr.sbin/fmtree/mtree.h | 98 ------- usr.sbin/fmtree/spec.c | 323 ----------------------- usr.sbin/fmtree/specspec.c | 256 ------------------ usr.sbin/fmtree/test/test00.sh | 67 ----- usr.sbin/fmtree/test/test01.sh | 40 --- usr.sbin/fmtree/test/test02.sh | 36 --- usr.sbin/fmtree/test/test03.sh | 60 ----- usr.sbin/fmtree/test/test04.sh | 51 ---- usr.sbin/fmtree/test/test05.sh | 25 -- usr.sbin/fmtree/verify.c | 261 ------------------- 25 files changed, 4 insertions(+), 2984 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 61c8d3dba2fe..5821e9f04e89 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -36,6 +36,10 @@ # xargs -n1 | sort | uniq -d; # done +# 20210302: fmtree removed +OLD_FILES+=usr/sbin/fmtree +OLD_FILES+=usr/share/man/man8/fmtree.8.gz + # 20210201: bump shared libraries which link against ncurses OLD_LIBS+=lib/libedit.so.7 OLD_LIBS+=usr/lib/libdialog.so.8 diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index 9e7a0c88f8af..619aa8f4a1d8 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -201,7 +201,6 @@ __DEFAULT_NO_OPTIONS = \ CLANG_FORMAT \ DTRACE_TESTS \ EXPERIMENTAL \ - FMTREE \ HESIOD \ LIBSOFT \ LOADER_FIREWIRE \ diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index 87fab14e45e7..5984645cbc14 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -1684,11 +1684,6 @@ OLD_FILES+=usr/sbin/uefisign OLD_FILES+=usr/share/examples/uefisign/uefikeys .endif -.if ${MK_FMTREE} == no -OLD_FILES+=usr/sbin/fmtree -OLD_FILES+=usr/share/man/man8/fmtree.8.gz -.endif - .if ${MK_FTP} == no OLD_FILES+=etc/ftpusers OLD_FILES+=etc/newsyslog.conf.d/ftp.conf diff --git a/tools/build/options/WITHOUT_FMTREE b/tools/build/options/WITHOUT_FMTREE deleted file mode 100644 index f8225c1e90c0..000000000000 --- a/tools/build/options/WITHOUT_FMTREE +++ /dev/null @@ -1,3 +0,0 @@ -.\" $FreeBSD$ -Set to not build and install -.Pa /usr/sbin/fmtree . diff --git a/tools/build/options/WITH_FMTREE b/tools/build/options/WITH_FMTREE deleted file mode 100644 index e384ff426774..000000000000 --- a/tools/build/options/WITH_FMTREE +++ /dev/null @@ -1,5 +0,0 @@ -.\" $FreeBSD$ -Set to build and install -.Pa /usr/sbin/fmtree . -This option is deprecated, and will be gone in -.Fx 14.0 . diff --git a/usr.sbin/Makefile b/usr.sbin/Makefile index 259ab72f2281..ae568746119a 100644 --- a/usr.sbin/Makefile +++ b/usr.sbin/Makefile @@ -137,7 +137,6 @@ SUBDIR.${MK_FLOPPY}+= fdcontrol SUBDIR.${MK_FLOPPY}+= fdformat SUBDIR.${MK_FLOPPY}+= fdread SUBDIR.${MK_FLOPPY}+= fdwrite -SUBDIR.${MK_FMTREE}+= fmtree SUBDIR.${MK_FREEBSD_UPDATE}+= freebsd-update SUBDIR.${MK_GSSAPI}+= gssd SUBDIR.${MK_GPIO}+= gpioctl diff --git a/usr.sbin/fmtree/Makefile b/usr.sbin/fmtree/Makefile deleted file mode 100644 index c1ba3737b258..000000000000 --- a/usr.sbin/fmtree/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# From: @(#)Makefile 8.1 (Berkeley) 6/6/93 -# $FreeBSD$ - -.include - -.PATH: ${SRCTOP}/usr.bin/cksum - -PROG= fmtree -MAN= fmtree.8 -SRCS= compare.c crc.c create.c excludes.c misc.c mtree.c spec.c verify.c -SRCS+= specspec.c - -CFLAGS+= -DWITH_MD5 -DWITH_SHA1 -DWITH_RMD160 -DWITH_SHA256 -LIBADD= md - -CLEANFILES+= fmtree.8 - -fmtree.8: mtree.8 - ${CP} ${.ALLSRC} ${.TARGET} - -.include diff --git a/usr.sbin/fmtree/Makefile.depend b/usr.sbin/fmtree/Makefile.depend deleted file mode 100644 index 31fbf9bc2f9f..000000000000 --- a/usr.sbin/fmtree/Makefile.depend +++ /dev/null @@ -1,18 +0,0 @@ -# $FreeBSD$ -# Autogenerated - do NOT edit! - -DIRDEPS = \ - gnu/lib/csu \ - include \ - include/xlocale \ - lib/${CSU_DIR} \ - lib/libc \ - lib/libcompiler_rt \ - lib/libmd \ - - -.include - -.if ${DEP_RELDIR} == ${_DEP_RELDIR} -# local dependencies - needed for -jN in clean tree -.endif diff --git a/usr.sbin/fmtree/compare.c b/usr.sbin/fmtree/compare.c deleted file mode 100644 index c59d01e651d4..000000000000 --- a/usr.sbin/fmtree/compare.c +++ /dev/null @@ -1,389 +0,0 @@ -/*- - * Copyright (c) 1989, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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. - */ - -#if 0 -#ifndef lint -static char sccsid[] = "@(#)compare.c 8.1 (Berkeley) 6/6/93"; -#endif /* not lint */ -#endif -#include -__FBSDID("$FreeBSD$"); - -#include -#include -#include - -#include -#include -#include -#include -#ifdef WITH_MD5 -#include -#endif -#ifdef WITH_RMD160 -#include -#endif -#ifdef WITH_SHA1 -#include -#endif -#ifdef WITH_SHA256 -#include -#endif -#include -#include -#include -#include -#include - -#include "mtree.h" -#include "extern.h" - -#define INDENTNAMELEN 8 -#define LABEL \ - if (!label++) { \ - len = printf("%s changed\n", RP(p)); \ - tab = "\t"; \ - } - -int -compare(char *name __unused, NODE *s, FTSENT *p) -{ - struct timeval tv[2]; - uint32_t val; - int fd, label; - off_t len; - char *cp; - const char *tab = ""; - char *fflags; - - label = 0; - switch(s->type) { - case F_BLOCK: - if (!S_ISBLK(p->fts_statp->st_mode)) - goto typeerr; - break; - case F_CHAR: - if (!S_ISCHR(p->fts_statp->st_mode)) - goto typeerr; - break; - case F_DIR: - if (!S_ISDIR(p->fts_statp->st_mode)) - goto typeerr; - break; - case F_FIFO: - if (!S_ISFIFO(p->fts_statp->st_mode)) - goto typeerr; - break; - case F_FILE: - if (!S_ISREG(p->fts_statp->st_mode)) - goto typeerr; - break; - case F_LINK: - if (!S_ISLNK(p->fts_statp->st_mode)) - goto typeerr; - break; - case F_SOCK: - if (!S_ISSOCK(p->fts_statp->st_mode)) { -typeerr: LABEL; - (void)printf("\ttype expected %s found %s\n", - ftype(s->type), inotype(p->fts_statp->st_mode)); - return (label); - } - break; - } - /* Set the uid/gid first, then set the mode. */ - if (s->flags & (F_UID | F_UNAME) && s->st_uid != p->fts_statp->st_uid) { - LABEL; - (void)printf("%suser expected %lu found %lu", - tab, (u_long)s->st_uid, (u_long)p->fts_statp->st_uid); - if (uflag) - if (chown(p->fts_accpath, s->st_uid, -1)) - (void)printf(" not modified: %s\n", - strerror(errno)); - else - (void)printf(" modified\n"); - else - (void)printf("\n"); - tab = "\t"; - } - if (s->flags & (F_GID | F_GNAME) && s->st_gid != p->fts_statp->st_gid) { - LABEL; - (void)printf("%sgid expected %lu found %lu", - tab, (u_long)s->st_gid, (u_long)p->fts_statp->st_gid); - if (uflag) - if (chown(p->fts_accpath, -1, s->st_gid)) - (void)printf(" not modified: %s\n", - strerror(errno)); - else - (void)printf(" modified\n"); - else - (void)printf("\n"); - tab = "\t"; - } - if (s->flags & F_MODE && - !S_ISLNK(p->fts_statp->st_mode) && - s->st_mode != (p->fts_statp->st_mode & MBITS)) { - LABEL; - (void)printf("%spermissions expected %#o found %#o", - tab, s->st_mode, p->fts_statp->st_mode & MBITS); - if (uflag) - if (chmod(p->fts_accpath, s->st_mode)) - (void)printf(" not modified: %s\n", - strerror(errno)); - else - (void)printf(" modified\n"); - else - (void)printf("\n"); - tab = "\t"; - } - if (s->flags & F_NLINK && s->type != F_DIR && - s->st_nlink != p->fts_statp->st_nlink) { - LABEL; - (void)printf("%slink_count expected %ju found %ju\n", - tab, (uintmax_t)s->st_nlink, - (uintmax_t)p->fts_statp->st_nlink); - tab = "\t"; - } - if (s->flags & F_SIZE && s->st_size != p->fts_statp->st_size && - !S_ISDIR(p->fts_statp->st_mode)) { - LABEL; - (void)printf("%ssize expected %jd found %jd\n", tab, - (intmax_t)s->st_size, (intmax_t)p->fts_statp->st_size); - tab = "\t"; - } - /* - * XXX - * Catches nano-second differences, but doesn't display them. - */ - if ((s->flags & F_TIME) && - ((s->st_mtimespec.tv_sec != p->fts_statp->st_mtim.tv_sec) || - (s->st_mtimespec.tv_nsec != p->fts_statp->st_mtim.tv_nsec))) { - LABEL; - (void)printf("%smodification time expected %.24s ", - tab, ctime(&s->st_mtimespec.tv_sec)); - (void)printf("found %.24s", - ctime(&p->fts_statp->st_mtim.tv_sec)); - if (uflag) { - tv[0].tv_sec = s->st_mtimespec.tv_sec; - tv[0].tv_usec = s->st_mtimespec.tv_nsec / 1000; - tv[1] = tv[0]; - if (utimes(p->fts_accpath, tv)) - (void)printf(" not modified: %s\n", - strerror(errno)); - else - (void)printf(" modified\n"); - } else - (void)printf("\n"); - tab = "\t"; - } - if (s->flags & F_CKSUM) { - if ((fd = open(p->fts_accpath, O_RDONLY, 0)) < 0) { - LABEL; - (void)printf("%scksum: %s: %s\n", - tab, p->fts_accpath, strerror(errno)); - tab = "\t"; - } else if (crc(fd, &val, &len)) { - (void)close(fd); - LABEL; - (void)printf("%scksum: %s: %s\n", - tab, p->fts_accpath, strerror(errno)); - tab = "\t"; - } else { - (void)close(fd); - if (s->cksum != val) { - LABEL; - (void)printf("%scksum expected %lu found %lu\n", - tab, s->cksum, (unsigned long)val); - tab = "\t"; - } - } - } - if ((s->flags & F_FLAGS) && s->st_flags != p->fts_statp->st_flags) { - LABEL; - fflags = flags_to_string(s->st_flags); - (void)printf("%sflags expected \"%s\"", tab, fflags); - free(fflags); - - fflags = flags_to_string(p->fts_statp->st_flags); - (void)printf(" found \"%s\"", fflags); - free(fflags); - - if (uflag) - if (chflags(p->fts_accpath, s->st_flags)) - (void)printf(" not modified: %s\n", - strerror(errno)); - else - (void)printf(" modified\n"); - else - (void)printf("\n"); - tab = "\t"; - } -#ifdef WITH_MD5 - if (s->flags & F_MD5) { - char *new_digest, buf[33]; - - new_digest = MD5File(p->fts_accpath, buf); - if (!new_digest) { - LABEL; - printf("%sMD5: %s: %s\n", tab, p->fts_accpath, - strerror(errno)); - tab = "\t"; - } else if (strcmp(new_digest, s->md5digest)) { - LABEL; - printf("%sMD5 expected %s found %s\n", tab, s->md5digest, - new_digest); - tab = "\t"; - } - } -#endif /* MD5 */ -#ifdef WITH_SHA1 - if (s->flags & F_SHA1) { - char *new_digest, buf[41]; - - new_digest = SHA1_File(p->fts_accpath, buf); - if (!new_digest) { - LABEL; - printf("%sSHA-1: %s: %s\n", tab, p->fts_accpath, - strerror(errno)); - tab = "\t"; - } else if (strcmp(new_digest, s->sha1digest)) { - LABEL; - printf("%sSHA-1 expected %s found %s\n", - tab, s->sha1digest, new_digest); - tab = "\t"; - } - } -#endif /* SHA1 */ -#ifdef WITH_RMD160 - if (s->flags & F_RMD160) { - char *new_digest, buf[41]; - - new_digest = RIPEMD160_File(p->fts_accpath, buf); - if (!new_digest) { - LABEL; - printf("%sRIPEMD160: %s: %s\n", tab, - p->fts_accpath, strerror(errno)); - tab = "\t"; - } else if (strcmp(new_digest, s->rmd160digest)) { - LABEL; - printf("%sRIPEMD160 expected %s found %s\n", - tab, s->rmd160digest, new_digest); - tab = "\t"; - } - } -#endif /* RMD160 */ -#ifdef WITH_SHA256 - if (s->flags & F_SHA256) { - char *new_digest, buf[65]; - - new_digest = SHA256_File(p->fts_accpath, buf); - if (!new_digest) { - LABEL; - printf("%sSHA-256: %s: %s\n", tab, p->fts_accpath, - strerror(errno)); - tab = "\t"; - } else if (strcmp(new_digest, s->sha256digest)) { - LABEL; - printf("%sSHA-256 expected %s found %s\n", - tab, s->sha256digest, new_digest); - tab = "\t"; - } - } -#endif /* SHA256 */ - - if (s->flags & F_SLINK && - strcmp(cp = rlink(p->fts_accpath), s->slink)) { - LABEL; - (void)printf("%slink_ref expected %s found %s\n", - tab, s->slink, cp); - } - return (label); -} - -const char * -inotype(u_int type) -{ - switch(type & S_IFMT) { - case S_IFBLK: - return ("block"); - case S_IFCHR: - return ("char"); - case S_IFDIR: - return ("dir"); - case S_IFIFO: - return ("fifo"); - case S_IFREG: - return ("file"); - case S_IFLNK: - return ("link"); - case S_IFSOCK: - return ("socket"); - default: - return ("unknown"); - } - /* NOTREACHED */ -} - -const char * -ftype(u_int type) -{ - switch(type) { - case F_BLOCK: - return ("block"); - case F_CHAR: - return ("char"); - case F_DIR: - return ("dir"); - case F_FIFO: - return ("fifo"); - case F_FILE: - return ("file"); - case F_LINK: - return ("link"); - case F_SOCK: - return ("socket"); - default: - return ("unknown"); - } - /* NOTREACHED */ -} - -char * -rlink(char *name) -{ - static char lbuf[MAXPATHLEN * 4]; - int len; - char tbuf[MAXPATHLEN]; - - if ((len = readlink(name, tbuf, sizeof(tbuf) - 1)) == -1) - err(1, "line %d: %s", lineno, name); - tbuf[len] = '\0'; - strvis(lbuf, tbuf, VIS_WHITE | VIS_OCTAL); - return (lbuf); -} diff --git a/usr.sbin/fmtree/create.c b/usr.sbin/fmtree/create.c deleted file mode 100644 index edfb09ebd2f2..000000000000 --- a/usr.sbin/fmtree/create.c +++ /dev/null @@ -1,431 +0,0 @@ -/*- - * Copyright (c) 1989, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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. - */ - -#if 0 -#ifndef lint -static char sccsid[] = "@(#)create.c 8.1 (Berkeley) 6/6/93"; -#endif /* not lint */ -#endif -#include -__FBSDID("$FreeBSD$"); - -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef MD5 -#include -#endif -#ifdef SHA1 -#include -#endif -#ifdef RMD160 -#include -#endif -#ifdef SHA256 -#include -#endif -#include -#include -#include -#include -#include -#include -#include "mtree.h" -#include "extern.h" - -#define INDENTNAMELEN 15 -#define MAXLINELEN 80 - -static gid_t gid; -static uid_t uid; -static mode_t mode; -static u_long flags = 0xffffffff; - -static int dsort(const FTSENT * const *, const FTSENT * const *); -static void output(int, int *, const char *, ...) __printflike(3, 4); -static int statd(FTS *, FTSENT *, uid_t *, gid_t *, mode_t *, u_long *); -static void statf(int, FTSENT *); - -void -cwalk(void) -{ - FTS *t; - FTSENT *p; - time_t cl; - char *argv[2], host[MAXHOSTNAMELEN]; - char dot[] = "."; - int indent = 0; - - if (!nflag) { - (void)time(&cl); - (void)gethostname(host, sizeof(host)); - (void)printf( - "#\t user: %s\n#\tmachine: %s\n", - getlogin(), host); - (void)printf( - "#\t tree: %s\n#\t date: %s", - fullpath, ctime(&cl)); - } - - argv[0] = dot; - argv[1] = NULL; - if ((t = fts_open(argv, ftsoptions, dsort)) == NULL) - err(1, "fts_open()"); - while (errno = 0, (p = fts_read(t))) { - if (iflag) - indent = p->fts_level * 4; - if (check_excludes(p->fts_name, p->fts_path)) { - fts_set(t, p, FTS_SKIP); - continue; - } - switch(p->fts_info) { - case FTS_D: - if (!dflag) - (void)printf("\n"); - if (!nflag) - (void)printf("# %s\n", p->fts_path); - statd(t, p, &uid, &gid, &mode, &flags); - statf(indent, p); - break; - case FTS_DP: - if (!nflag && (p->fts_level > 0)) - (void)printf("%*s# %s\n", indent, "", p->fts_path); - (void)printf("%*s..\n", indent, ""); - if (!dflag) - (void)printf("\n"); - break; - case FTS_DNR: - case FTS_ERR: - case FTS_NS: - warnx("%s: %s", p->fts_path, strerror(p->fts_errno)); - break; - default: - if (!dflag) - statf(indent, p); - break; - - } - } - if (errno != 0) - err(1, "fts_read()"); - (void)fts_close(t); - if (sflag && keys & F_CKSUM) - warnx("%s checksum: %lu", fullpath, (unsigned long)crc_total); -} - -static void -statf(int indent, FTSENT *p) -{ - struct group *gr; - struct passwd *pw; - uint32_t val; - off_t len; - int fd, offset; - char *fflags; - char *escaped_name; - - escaped_name = calloc(1, p->fts_namelen * 4 + 1); - if (escaped_name == NULL) - errx(1, "statf(): calloc() failed"); - strvis(escaped_name, p->fts_name, VIS_WHITE | VIS_OCTAL | VIS_GLOB); - - if (iflag || S_ISDIR(p->fts_statp->st_mode)) - offset = printf("%*s%s", indent, "", escaped_name); - else - offset = printf("%*s %s", indent, "", escaped_name); - - free(escaped_name); - - if (offset > (INDENTNAMELEN + indent)) - offset = MAXLINELEN; - else - offset += printf("%*s", (INDENTNAMELEN + indent) - offset, ""); - - if (!S_ISREG(p->fts_statp->st_mode) && !dflag) - output(indent, &offset, "type=%s", inotype(p->fts_statp->st_mode)); - if (p->fts_statp->st_uid != uid) { - if (keys & F_UNAME) { - pw = getpwuid(p->fts_statp->st_uid); - if (pw != NULL) - output(indent, &offset, "uname=%s", pw->pw_name); - else if (wflag) - warnx("Could not get uname for uid=%u", - p->fts_statp->st_uid); - else - errx(1, - "Could not get uname for uid=%u", - p->fts_statp->st_uid); - } - if (keys & F_UID) - output(indent, &offset, "uid=%u", p->fts_statp->st_uid); - } - if (p->fts_statp->st_gid != gid) { - if (keys & F_GNAME) { - gr = getgrgid(p->fts_statp->st_gid); - if (gr != NULL) - output(indent, &offset, "gname=%s", gr->gr_name); - else if (wflag) - warnx("Could not get gname for gid=%u", - p->fts_statp->st_gid); - else - errx(1, - "Could not get gname for gid=%u", - p->fts_statp->st_gid); - } - if (keys & F_GID) - output(indent, &offset, "gid=%u", p->fts_statp->st_gid); - } - if (keys & F_MODE && (p->fts_statp->st_mode & MBITS) != mode) - output(indent, &offset, "mode=%#o", p->fts_statp->st_mode & MBITS); - if (keys & F_NLINK && p->fts_statp->st_nlink != 1) - output(indent, &offset, "nlink=%ju", - (uintmax_t)p->fts_statp->st_nlink); - if (keys & F_SIZE && S_ISREG(p->fts_statp->st_mode)) - output(indent, &offset, "size=%jd", - (intmax_t)p->fts_statp->st_size); - if (keys & F_TIME) - output(indent, &offset, "time=%ld.%09ld", - (long)p->fts_statp->st_mtim.tv_sec, - p->fts_statp->st_mtim.tv_nsec); - if (keys & F_CKSUM && S_ISREG(p->fts_statp->st_mode)) { - if ((fd = open(p->fts_accpath, O_RDONLY, 0)) < 0 || - crc(fd, &val, &len)) - err(1, "%s", p->fts_accpath); - (void)close(fd); - output(indent, &offset, "cksum=%lu", (unsigned long)val); - } -#ifdef MD5 - if (keys & F_MD5 && S_ISREG(p->fts_statp->st_mode)) { - char *digest, buf[33]; - - digest = MD5File(p->fts_accpath, buf); - if (!digest) - err(1, "%s", p->fts_accpath); - output(indent, &offset, "md5digest=%s", digest); - } -#endif /* MD5 */ -#ifdef SHA1 - if (keys & F_SHA1 && S_ISREG(p->fts_statp->st_mode)) { - char *digest, buf[41]; - - digest = SHA1_File(p->fts_accpath, buf); - if (!digest) - err(1, "%s", p->fts_accpath); - output(indent, &offset, "sha1digest=%s", digest); - } -#endif /* SHA1 */ -#ifdef RMD160 - if (keys & F_RMD160 && S_ISREG(p->fts_statp->st_mode)) { - char *digest, buf[41]; - - digest = RIPEMD160_File(p->fts_accpath, buf); - if (!digest) - err(1, "%s", p->fts_accpath); - output(indent, &offset, "ripemd160digest=%s", digest); - } -#endif /* RMD160 */ -#ifdef SHA256 - if (keys & F_SHA256 && S_ISREG(p->fts_statp->st_mode)) { - char *digest, buf[65]; - - digest = SHA256_File(p->fts_accpath, buf); - if (!digest) - err(1, "%s", p->fts_accpath); - output(indent, &offset, "sha256digest=%s", digest); - } -#endif /* SHA256 */ - if (keys & F_SLINK && - (p->fts_info == FTS_SL || p->fts_info == FTS_SLNONE)) - output(indent, &offset, "link=%s", rlink(p->fts_accpath)); - if (keys & F_FLAGS && p->fts_statp->st_flags != flags) { - fflags = flags_to_string(p->fts_statp->st_flags); - output(indent, &offset, "flags=%s", fflags); - free(fflags); - } - (void)putchar('\n'); -} - -#define MAXGID 5000 -#define MAXUID 5000 -#define MAXMODE MBITS + 1 -#define MAXFLAGS 256 -#define MAXS 16 - -static int -statd(FTS *t, FTSENT *parent, uid_t *puid, gid_t *pgid, mode_t *pmode, u_long *pflags) -{ - FTSENT *p; - gid_t sgid; - uid_t suid; - mode_t smode; - u_long sflags; - struct group *gr; - struct passwd *pw; - gid_t savegid = *pgid; - uid_t saveuid = *puid; - mode_t savemode = *pmode; - u_long saveflags = *pflags; - u_short maxgid, maxuid, maxmode, maxflags; - u_short g[MAXGID], u[MAXUID], m[MAXMODE], f[MAXFLAGS]; - char *fflags; - static int first = 1; - - if ((p = fts_children(t, 0)) == NULL) { - if (errno) - err(1, "%s", RP(parent)); - return (1); - } - - bzero(g, sizeof(g)); - bzero(u, sizeof(u)); - bzero(m, sizeof(m)); - bzero(f, sizeof(f)); - - maxuid = maxgid = maxmode = maxflags = 0; - for (; p; p = p->fts_link) { - if (!dflag || (dflag && S_ISDIR(p->fts_statp->st_mode))) { - smode = p->fts_statp->st_mode & MBITS; - if (smode < MAXMODE && ++m[smode] > maxmode) { - savemode = smode; - maxmode = m[smode]; - } - sgid = p->fts_statp->st_gid; - if (sgid < MAXGID && ++g[sgid] > maxgid) { - savegid = sgid; - maxgid = g[sgid]; - } - suid = p->fts_statp->st_uid; - if (suid < MAXUID && ++u[suid] > maxuid) { - saveuid = suid; - maxuid = u[suid]; - } - - /* - * XXX - * note that the below will break when file flags - * are extended beyond the first 4 bytes of each - * half word of the flags - */ -#define FLAGS2IDX(f) ((f & 0xf) | ((f >> 12) & 0xf0)) - sflags = p->fts_statp->st_flags; - if (FLAGS2IDX(sflags) < MAXFLAGS && - ++f[FLAGS2IDX(sflags)] > maxflags) { - saveflags = sflags; - maxflags = f[FLAGS2IDX(sflags)]; - } - } - } - /* - * If the /set record is the same as the last one we do not need to output - * a new one. So first we check to see if anything changed. Note that we - * always output a /set record for the first directory. - */ - if ((((keys & F_UNAME) | (keys & F_UID)) && (*puid != saveuid)) || - (((keys & F_GNAME) | (keys & F_GID)) && (*pgid != savegid)) || - ((keys & F_MODE) && (*pmode != savemode)) || - ((keys & F_FLAGS) && (*pflags != saveflags)) || - (first)) { - first = 0; - if (dflag) - (void)printf("/set type=dir"); - else - (void)printf("/set type=file"); - if (keys & F_UNAME) { - pw = getpwuid(saveuid); - if (pw != NULL) - (void)printf(" uname=%s", pw->pw_name); - else if (wflag) - warnx( "Could not get uname for uid=%u", saveuid); - else - errx(1, "Could not get uname for uid=%u", saveuid); - } - if (keys & F_UID) - (void)printf(" uid=%lu", (u_long)saveuid); - if (keys & F_GNAME) { - gr = getgrgid(savegid); - if (gr != NULL) - (void)printf(" gname=%s", gr->gr_name); - else if (wflag) - warnx("Could not get gname for gid=%u", savegid); - else - errx(1, "Could not get gname for gid=%u", savegid); - } - if (keys & F_GID) - (void)printf(" gid=%lu", (u_long)savegid); - if (keys & F_MODE) - (void)printf(" mode=%#o", savemode); - if (keys & F_NLINK) - (void)printf(" nlink=1"); - if (keys & F_FLAGS) { - fflags = flags_to_string(saveflags); - (void)printf(" flags=%s", fflags); - free(fflags); - } - (void)printf("\n"); - *puid = saveuid; - *pgid = savegid; - *pmode = savemode; - *pflags = saveflags; - } - return (0); -} - -static int -dsort(const FTSENT * const *a, const FTSENT * const *b) -{ - if (S_ISDIR((*a)->fts_statp->st_mode)) { - if (!S_ISDIR((*b)->fts_statp->st_mode)) - return (1); - } else if (S_ISDIR((*b)->fts_statp->st_mode)) - return (-1); - return (strcmp((*a)->fts_name, (*b)->fts_name)); -} *** 2218 LINES SKIPPED *** From owner-dev-commits-src-main@freebsd.org Tue Mar 2 21:22:34 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A49D855117D; Tue, 2 Mar 2021 21:22:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dqqpf2Tf6z3NW3; Tue, 2 Mar 2021 21:22:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 091B01DD24; Tue, 2 Mar 2021 21:22:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 122LMXBC029748; Tue, 2 Mar 2021 21:22:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 122LMXtc029747; Tue, 2 Mar 2021 21:22:33 GMT (envelope-from git) Date: Tue, 2 Mar 2021 21:22:33 GMT Message-Id: <202103022122.122LMXtc029747@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 13686dffbbeb - main - Regenerate src.conf(5) after FMTREE removal MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 13686dffbbeb7549d4e6ff54f941c87d4bb558f5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2021 21:22:34 -0000 The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=13686dffbbeb7549d4e6ff54f941c87d4bb558f5 commit 13686dffbbeb7549d4e6ff54f941c87d4bb558f5 Author: Kyle Evans AuthorDate: 2021-03-02 21:21:46 +0000 Commit: Kyle Evans CommitDate: 2021-03-02 21:22:06 +0000 Regenerate src.conf(5) after FMTREE removal --- share/man/man5/src.conf.5 | 5 ----- 1 file changed, 5 deletions(-) diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index e9fe277f23e7..5d211bc1cc31 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -630,11 +630,6 @@ and .It Va WITHOUT_FLOPPY Set to not build or install programs for operating floppy disk driver. -.It Va WITH_FMTREE -Set to build and install -.Pa /usr/sbin/fmtree . -This option is deprecated, and will be gone in -.Fx 14.0 . .It Va WITHOUT_FORMAT_EXTENSIONS Set to not enable .Fl fformat-extensions From owner-dev-commits-src-main@freebsd.org Tue Mar 2 21:59:02 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E2E6C552718; Tue, 2 Mar 2021 21:59:02 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Received: from sdaoden.eu (sdaoden.eu [217.144.132.164]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dqrck5ZVLz3Ql5; Tue, 2 Mar 2021 21:59:02 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Received: by sdaoden.eu (Postfix, from userid 1000) id 6B80316057; Tue, 2 Mar 2021 22:58:55 +0100 (CET) Date: Tue, 02 Mar 2021 22:58:54 +0100 From: Steffen Nurpmeso To: Ryan Moeller Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: ee21ee1572d4 - main - openzfs: attach pam_zfs_key to build Message-ID: <20210302215854.8IaH7%steffen@sdaoden.eu> In-Reply-To: <202103021227.122CRUDH011301@gitrepo.freebsd.org> References: <202103021227.122CRUDH011301@gitrepo.freebsd.org> User-Agent: s-nail v14.9.22-99-g733424fe OpenPGP: id=EE19E1C1F2F7054F8D3954D8308964B51883A0DD; url=https://ftp.sdaoden.eu/steffen.asc; preference=signencrypt BlahBlahBlah: Any stupid boy can crush a beetle. But all the professors in the world can make no bugs. X-Rspamd-Queue-Id: 4Dqrck5ZVLz3Ql5 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2021 21:59:02 -0000 Ryan Moeller wrote in <202103021227.122CRUDH011301@gitrepo.freebsd.org>: ... |URL: https://cgit.FreeBSD.org/src/commit/?id=ee21ee1572d40a3b74f18638dae\ |38c1a9ad1e9e3 | |commit ee21ee1572d40a3b74f18638dae38c1a9ad1e9e3 |Author: Greg V |AuthorDate: 2021-03-02 11:01:14 +0000 |Commit: Ryan Moeller |CommitDate: 2021-03-02 12:26:59 +0000 | | openzfs: attach pam_zfs_key to build | | This PAM module allows unlocking encrypted user home datasets when | logging in (and changing passphrase when changing the account password)\ | , | see https://github.com/openzfs/zfs/pull/9903 | | Also supposed to unload the key when the last session for the user is | done, but there are EBUSY issues: | https://github.com/openzfs/zfs/issues/11222#issuecomment-731897858 Very interesting. This is "cool" per se. (Especially on encrypted block devices where a resume requires a password anyhow. I would not do it like this for myself, but don't mind this.) As i could not figure it out, how do you manage a session without having a supervisor like (please let me say the greedy monster) systemd? I wrote a pam_xdg module [1] to create the /run/user/PID of the XDG spec of FreeDesktop (as well as inject the other XDG path environment variables, optionally), but in the end i had to strip it down to the absolute core because session handling seemed impossible. (As in, daemonized scripts and important things like tmux, they keep on living even after the "session" has ended.) (In my superficial opinion PAM is a terrible and under-documented mess, and each and every module is left alone fiddling around with effective-[gu]id flags, for example, in order to work gracefully under all circumstances.) [1] https://git.sdaoden.eu/browse?p=s-toolbox.git;a=blob;f=pam_xdg.c;h=4c121e93ca76d2f53a9de67aa9bc100f639f6a05;hb=HEAD --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt) From owner-dev-commits-src-main@freebsd.org Tue Mar 2 22:20:24 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C0F99553134; Tue, 2 Mar 2021 22:20:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dqs5N53rRz3htW; Tue, 2 Mar 2021 22:20:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A13BE1E80B; Tue, 2 Mar 2021 22:20:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 122MKOEH004621; Tue, 2 Mar 2021 22:20:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 122MKOur004620; Tue, 2 Mar 2021 22:20:24 GMT (envelope-from git) Date: Tue, 2 Mar 2021 22:20:24 GMT Message-Id: <202103022220.122MKOur004620@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: c04199affeac - main - nfsclient: Fix ReadDS/WriteDS/CommitDS nfsstats RPC counts for a NFSv3 DS MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c04199affeacbd9e9dda3aaf5ca0b1b180031e78 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2021 22:20:24 -0000 The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=c04199affeacbd9e9dda3aaf5ca0b1b180031e78 commit c04199affeacbd9e9dda3aaf5ca0b1b180031e78 Author: Rick Macklem AuthorDate: 2021-03-02 22:18:23 +0000 Commit: Rick Macklem CommitDate: 2021-03-02 22:18:23 +0000 nfsclient: Fix ReadDS/WriteDS/CommitDS nfsstats RPC counts for a NFSv3 DS During a recent virtual NFSv4 testing event, a bug in the FreeBSD client was detected when doing I/O DS operations on a Flexible File Layout pNFS server. For an NFSv3 DS, the Read/Write/Commit nfsstats were incremented instead of the ReadDS/WriteDS/CommitDS counts. This patch fixes this. Only the RPC counts reported by nfsstat(1) were affected by this bug, the I/O operations were performed correctly. MFC after: 2 weeks --- sys/fs/nfs/nfsport.h | 1 + sys/fs/nfsclient/nfs_clrpcops.c | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/sys/fs/nfs/nfsport.h b/sys/fs/nfs/nfsport.h index 9f2789f57bec..255c9a47ebdf 100644 --- a/sys/fs/nfs/nfsport.h +++ b/sys/fs/nfs/nfsport.h @@ -1006,6 +1006,7 @@ bool ncl_pager_setsize(struct vnode *vp, u_quad_t *nsizep); * "out by one" without disastrous consequences. */ #define NFSINCRGLOBAL(a) ((a)++) +#define NFSDECRGLOBAL(a) ((a)--) /* * Assorted funky stuff to make things work under Darwin8. diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c index 0e503e34810b..527a47338b3f 100644 --- a/sys/fs/nfsclient/nfs_clrpcops.c +++ b/sys/fs/nfsclient/nfs_clrpcops.c @@ -65,6 +65,7 @@ SYSCTL_INT(_vfs_nfs, OID_AUTO, dssameconn, CTLFLAG_RW, /* * Global variables */ +extern struct nfsstatsv1 nfsstatsv1; extern int nfs_numnfscbd; extern struct timeval nfsboottime; extern u_int32_t newnfs_false, newnfs_true; @@ -6320,6 +6321,8 @@ nfsrpc_readds(vnode_t vp, struct uio *uiop, nfsv4stateid_t *stateidp, int *eofp, } else { nfscl_reqstart(nd, NFSPROC_READ, nmp, fhp->nfh_fh, fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers); + NFSDECRGLOBAL(nfsstatsv1.rpccnt[NFSPROC_READ]); + NFSINCRGLOBAL(nfsstatsv1.rpccnt[NFSPROC_READDS]); NFSCL_DEBUG(4, "nfsrpc_readds: vers3\n"); } NFSM_BUILD(tl, uint32_t *, NFSX_UNSIGNED * 3); @@ -6395,6 +6398,8 @@ nfsrpc_writeds(vnode_t vp, struct uio *uiop, int *iomode, int *must_commit, } else { nfscl_reqstart(nd, NFSPROC_WRITE, nmp, fhp->nfh_fh, fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers); + NFSDECRGLOBAL(nfsstatsv1.rpccnt[NFSPROC_WRITE]); + NFSINCRGLOBAL(nfsstatsv1.rpccnt[NFSPROC_WRITEDS]); NFSCL_DEBUG(4, "nfsrpc_writeds: vers3\n"); NFSM_BUILD(tl, uint32_t *, NFSX_HYPER + 3 * NFSX_UNSIGNED); } @@ -6522,6 +6527,8 @@ nfsrpc_writedsmir(vnode_t vp, int *iomode, int *must_commit, } else { nfscl_reqstart(nd, NFSPROC_WRITE, nmp, fhp->nfh_fh, fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers); + NFSDECRGLOBAL(nfsstatsv1.rpccnt[NFSPROC_WRITE]); + NFSINCRGLOBAL(nfsstatsv1.rpccnt[NFSPROC_WRITEDS]); NFSCL_DEBUG(4, "nfsrpc_writedsmir: vers3\n"); NFSM_BUILD(tl, uint32_t *, NFSX_HYPER + 3 * NFSX_UNSIGNED); } @@ -6737,9 +6744,12 @@ nfsrpc_commitds(vnode_t vp, uint64_t offset, int cnt, struct nfsclds *dsp, nfscl_reqstart(nd, NFSPROC_COMMITDS, nmp, fhp->nfh_fh, fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers); vers = NFS_VER4; - } else + } else { nfscl_reqstart(nd, NFSPROC_COMMIT, nmp, fhp->nfh_fh, fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers); + NFSDECRGLOBAL(nfsstatsv1.rpccnt[NFSPROC_COMMIT]); + NFSINCRGLOBAL(nfsstatsv1.rpccnt[NFSPROC_COMMITDS]); + } NFSCL_DEBUG(4, "nfsrpc_commitds: vers=%d minvers=%d\n", vers, minorvers); NFSM_BUILD(tl, uint32_t *, NFSX_HYPER + NFSX_UNSIGNED); From owner-dev-commits-src-main@freebsd.org Tue Mar 2 22:22:37 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 604EB553328; Tue, 2 Mar 2021 22:22:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dqs7x1lqqz3jJL; Tue, 2 Mar 2021 22:22:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2F0351E7C7; Tue, 2 Mar 2021 22:22:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 122MMbpU008993; Tue, 2 Mar 2021 22:22:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 122MMbUd008992; Tue, 2 Mar 2021 22:22:37 GMT (envelope-from git) Date: Tue, 2 Mar 2021 22:22:37 GMT Message-Id: <202103022222.122MMbUd008992@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alfredo Dal'Ava Junior" Subject: git: 71900a794da0 - main - mpr: big-endian support MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: alfredo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 71900a794da046ad5322caae2774aed5b3d361b9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2021 22:22:37 -0000 The branch main has been updated by alfredo: URL: https://cgit.FreeBSD.org/src/commit/?id=71900a794da046ad5322caae2774aed5b3d361b9 commit 71900a794da046ad5322caae2774aed5b3d361b9 Author: Alfredo Dal'Ava Junior AuthorDate: 2021-03-02 14:05:15 +0000 Commit: Alfredo Dal'Ava Junior CommitDate: 2021-03-03 01:21:42 +0000 mpr: big-endian support This fixes mpr driver on big-endian devices. Tested on powerpc64 and powerpc64le targets using a SAS9300-8i card (LSISAS3008 pci vendor=0x1000 device=0x0097) Submitted by: Andre Fernando da Silva Reviewed by: luporl, alfredo, Sreekanth Reddy (by email) Sponsored by: Eldorado Research Institute (eldorado.org.br) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D25785 --- sys/dev/mpr/mpr.c | 75 ++++++++++++++++++++++++++++++++++------------- sys/dev/mpr/mpr_config.c | 16 +++++----- sys/dev/mpr/mpr_mapping.c | 4 +-- sys/dev/mpr/mpr_sas.c | 14 +++++---- sys/dev/mpr/mpr_sas_lsi.c | 21 +++++++------ sys/dev/mpr/mpr_table.c | 66 ++++++++++++++++++++--------------------- sys/dev/mpr/mprvar.h | 4 +++ 7 files changed, 119 insertions(+), 81 deletions(-) diff --git a/sys/dev/mpr/mpr.c b/sys/dev/mpr/mpr.c index 678fe5052fca..5d57be27f9b2 100644 --- a/sys/dev/mpr/mpr.c +++ b/sys/dev/mpr/mpr.c @@ -111,6 +111,7 @@ static int mpr_wait_db_ack(struct mpr_softc *sc, int timeout, int sleep_flag); static int mpr_debug_sysctl(SYSCTL_HANDLER_ARGS); static int mpr_dump_reqs(SYSCTL_HANDLER_ARGS); static void mpr_parse_debug(struct mpr_softc *sc, char *list); +static void adjust_iocfacts_endianness(MPI2_IOC_FACTS_REPLY *facts); SYSCTL_NODE(_hw, OID_AUTO, mpr, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "MPR Driver Parameters"); @@ -413,7 +414,7 @@ mpr_resize_queues(struct mpr_softc *sc) * the size of an IEEE Simple SGE. */ if (sc->facts->MsgVersion >= MPI2_VERSION_02_05) { - chain_seg_size = htole16(sc->facts->IOCMaxChainSegmentSize); + chain_seg_size = sc->facts->IOCMaxChainSegmentSize; if (chain_seg_size == 0) chain_seg_size = MPR_DEFAULT_CHAIN_SEG_SIZE; sc->chain_frame_size = chain_seg_size * @@ -1054,15 +1055,21 @@ mpr_request_sync(struct mpr_softc *sc, void *req, MPI2_DEFAULT_REPLY *reply, mpr_dprint(sc, MPR_FAULT, "Timeout reading doorbell 0\n"); return (ENXIO); } + + /* + * If in a BE platform, swap bytes using le16toh to not + * disturb 8 bit field neighbors in destination structure + * pointed by data16. + */ data16[0] = - mpr_regread(sc, MPI2_DOORBELL_OFFSET) & MPI2_DOORBELL_DATA_MASK; + le16toh(mpr_regread(sc, MPI2_DOORBELL_OFFSET)) & MPI2_DOORBELL_DATA_MASK; mpr_regwrite(sc, MPI2_HOST_INTERRUPT_STATUS_OFFSET, 0x0); if (mpr_wait_db_int(sc) != 0) { mpr_dprint(sc, MPR_FAULT, "Timeout reading doorbell 1\n"); return (ENXIO); } data16[1] = - mpr_regread(sc, MPI2_DOORBELL_OFFSET) & MPI2_DOORBELL_DATA_MASK; + le16toh(mpr_regread(sc, MPI2_DOORBELL_OFFSET)) & MPI2_DOORBELL_DATA_MASK; mpr_regwrite(sc, MPI2_HOST_INTERRUPT_STATUS_OFFSET, 0x0); /* Number of 32bit words in the message */ @@ -1087,7 +1094,7 @@ mpr_request_sync(struct mpr_softc *sc, void *req, MPI2_DEFAULT_REPLY *reply, "Timeout reading doorbell %d\n", i); return (ENXIO); } - data16[i] = mpr_regread(sc, MPI2_DOORBELL_OFFSET) & + data16[i] = le16toh(mpr_regread(sc, MPI2_DOORBELL_OFFSET)) & MPI2_DOORBELL_DATA_MASK; mpr_regwrite(sc, MPI2_HOST_INTERRUPT_STATUS_OFFSET, 0x0); } @@ -1142,9 +1149,8 @@ mpr_enqueue_request(struct mpr_softc *sc, struct mpr_command *cm) mpr_regwrite(sc, MPI26_ATOMIC_REQUEST_DESCRIPTOR_POST_OFFSET, rd.u.low); } else { - rd.u.low = cm->cm_desc.Words.Low; - rd.u.high = cm->cm_desc.Words.High; - rd.word = htole64(rd.word); + rd.u.low = htole32(cm->cm_desc.Words.Low); + rd.u.high = htole32(cm->cm_desc.Words.High); mpr_regwrite(sc, MPI2_REQUEST_DESCRIPTOR_POST_LOW_OFFSET, rd.u.low); mpr_regwrite(sc, MPI2_REQUEST_DESCRIPTOR_POST_HIGH_OFFSET, @@ -1152,6 +1158,36 @@ mpr_enqueue_request(struct mpr_softc *sc, struct mpr_command *cm) } } +/* + * Ioc facts are read in 16 bit words and and stored with le16toh, + * this takes care of proper U8 fields endianness in + * MPI2_IOC_FACTS_REPLY, but we still need to swap back U16 fields. + */ +static void +adjust_iocfacts_endianness(MPI2_IOC_FACTS_REPLY *facts) +{ + facts->HeaderVersion = le16toh(facts->HeaderVersion); + facts->Reserved1 = le16toh(facts->Reserved1); + facts->IOCExceptions = le16toh(facts->IOCExceptions); + facts->IOCStatus = le16toh(facts->IOCStatus); + facts->IOCLogInfo = le32toh(facts->IOCLogInfo); + facts->RequestCredit = le16toh(facts->RequestCredit); + facts->ProductID = le16toh(facts->ProductID); + facts->IOCCapabilities = le32toh(facts->IOCCapabilities); + facts->IOCRequestFrameSize = le16toh(facts->IOCRequestFrameSize); + facts->IOCMaxChainSegmentSize = le16toh(facts->IOCMaxChainSegmentSize); + facts->MaxInitiators = le16toh(facts->MaxInitiators); + facts->MaxTargets = le16toh(facts->MaxTargets); + facts->MaxSasExpanders = le16toh(facts->MaxSasExpanders); + facts->MaxEnclosures = le16toh(facts->MaxEnclosures); + facts->ProtocolFlags = le16toh(facts->ProtocolFlags); + facts->HighPriorityCredit = le16toh(facts->HighPriorityCredit); + facts->MaxReplyDescriptorPostQueueDepth = le16toh(facts->MaxReplyDescriptorPostQueueDepth); + facts->MaxDevHandle = le16toh(facts->MaxDevHandle); + facts->MaxPersistentEntries = le16toh(facts->MaxPersistentEntries); + facts->MinDevHandle = le16toh(facts->MinDevHandle); +} + /* * Just the FACTS, ma'am. */ @@ -1173,6 +1209,9 @@ mpr_get_iocfacts(struct mpr_softc *sc, MPI2_IOC_FACTS_REPLY *facts) request.Function = MPI2_FUNCTION_IOC_FACTS; error = mpr_request_sync(sc, &request, reply, req_sz, reply_sz, 5); + adjust_iocfacts_endianness(facts); + mpr_dprint(sc, MPR_TRACE, "facts->IOCCapabilities 0x%x\n", facts->IOCCapabilities); + mpr_dprint(sc, MPR_INIT, "%s exit, error= %d\n", __func__, error); return (error); } @@ -1231,10 +1270,10 @@ mpr_send_iocinit(struct mpr_softc *sc) init.HostPageSize = HOST_PAGE_SIZE_4K; error = mpr_request_sync(sc, &init, &reply, req_sz, reply_sz, 5); - if ((reply.IOCStatus & MPI2_IOCSTATUS_MASK) != MPI2_IOCSTATUS_SUCCESS) + if ((le16toh(reply.IOCStatus) & MPI2_IOCSTATUS_MASK) != MPI2_IOCSTATUS_SUCCESS) error = ENXIO; - mpr_dprint(sc, MPR_INIT, "IOCInit status= 0x%x\n", reply.IOCStatus); + mpr_dprint(sc, MPR_INIT, "IOCInit status= 0x%x\n", le16toh(reply.IOCStatus)); mpr_dprint(sc, MPR_INIT, "%s exit\n", __func__); return (error); } @@ -1532,7 +1571,7 @@ mpr_alloc_requests(struct mpr_softc *sc) cm->cm_req_busaddr = sc->req_busaddr + i * sc->reqframesz; cm->cm_sense = &sc->sense_frames[i]; cm->cm_sense_busaddr = sc->sense_busaddr + i * MPR_SENSE_LEN; - cm->cm_desc.Default.SMID = i; + cm->cm_desc.Default.SMID = htole16(i); cm->cm_sc = sc; cm->cm_state = MPR_CM_STATE_BUSY; TAILQ_INIT(&cm->cm_chain_list); @@ -1650,7 +1689,7 @@ mpr_init_queues(struct mpr_softc *sc) * Initialize all of the free queue entries. */ for (i = 0; i < sc->fqdepth; i++) { - sc->free_queue[i] = sc->reply_busaddr + (i * sc->replyframesz); + sc->free_queue[i] = htole32(sc->reply_busaddr + (i * sc->replyframesz)); } sc->replyfreeindex = sc->num_replies; @@ -2719,7 +2758,8 @@ mpr_update_events(struct mpr_softc *sc, struct mpr_event_handle *handle, bcopy(fullmask, (uint8_t *)&evtreq->EventMasks, 16); } #else - bcopy(sc->event_mask, (uint8_t *)&evtreq->EventMasks, 16); + for (i = 0; i < MPI2_EVENT_NOTIFY_EVENTMASK_WORDS; i++) + evtreq->EventMasks[i] = htole32(sc->event_mask[i]); #endif cm->cm_desc.Default.RequestFlags = MPI2_REQ_DESCRIPT_FLAGS_DEFAULT_TYPE; cm->cm_data = NULL; @@ -2773,7 +2813,8 @@ mpr_reregister_events(struct mpr_softc *sc) bcopy(fullmask, (uint8_t *)&evtreq->EventMasks, 16); } #else - bcopy(sc->event_mask, (uint8_t *)&evtreq->EventMasks, 16); + for (i = 0; i < MPI2_EVENT_NOTIFY_EVENTMASK_WORDS; i++) + evtreq->EventMasks[i] = htole32(sc->event_mask[i]); #endif cm->cm_desc.Default.RequestFlags = MPI2_REQ_DESCRIPT_FLAGS_DEFAULT_TYPE; cm->cm_data = NULL; @@ -3446,8 +3487,6 @@ mpr_push_sge(struct mpr_command *cm, MPI2_SGE_SIMPLE64 *sge, size_t len, /* Endian Safe code */ sge_flags = sge->FlagsLength; sge->FlagsLength = htole32(sge_flags); - sge->Address.High = htole32(sge->Address.High); - sge->Address.Low = htole32(sge->Address.Low); bcopy(sge, cm->cm_sge, len); cm->cm_sge = (MPI2_SGE_IO_UNION *)((uintptr_t)cm->cm_sge + len); } @@ -3474,8 +3513,6 @@ mpr_push_sge(struct mpr_command *cm, MPI2_SGE_SIMPLE64 *sge, size_t len, /* Endian Safe code */ sge_flags = sge->FlagsLength; sge->FlagsLength = htole32(sge_flags); - sge->Address.High = htole32(sge->Address.High); - sge->Address.Low = htole32(sge->Address.Low); bcopy(sge, cm->cm_sge, len); cm->cm_sge = (MPI2_SGE_IO_UNION *)((uintptr_t)cm->cm_sge + len); return (0); @@ -3534,8 +3571,6 @@ mpr_push_ieee_sge(struct mpr_command *cm, void *sgep, int segsleft) /* Endian Safe code */ sge_length = sge->Length; sge->Length = htole32(sge_length); - sge->Address.High = htole32(sge->Address.High); - sge->Address.Low = htole32(sge->Address.Low); bcopy(sgep, cm->cm_sge, ieee_sge_size); cm->cm_sge = (MPI25_SGE_IO_UNION *)((uintptr_t)cm->cm_sge + @@ -3553,8 +3588,6 @@ mpr_push_ieee_sge(struct mpr_command *cm, void *sgep, int segsleft) /* Endian Safe code */ sge_length = sge->Length; sge->Length = htole32(sge_length); - sge->Address.High = htole32(sge->Address.High); - sge->Address.Low = htole32(sge->Address.Low); bcopy(sgep, cm->cm_sge, ieee_sge_size); cm->cm_sge = (MPI25_SGE_IO_UNION *)((uintptr_t)cm->cm_sge + ieee_sge_size); diff --git a/sys/dev/mpr/mpr_config.c b/sys/dev/mpr/mpr_config.c index 1916dc1cb3dc..2b5bc7e3964b 100644 --- a/sys/dev/mpr/mpr_config.c +++ b/sys/dev/mpr/mpr_config.c @@ -142,7 +142,7 @@ mpr_config_get_ioc_pg8(struct mpr_softc *sc, Mpi2ConfigReply_t *mpi_reply, request->Header.PageNumber = 8; request->Header.PageVersion = mpi_reply->Header.PageVersion; request->Header.PageLength = mpi_reply->Header.PageLength; - cm->cm_length = le16toh(mpi_reply->Header.PageLength) * 4; + cm->cm_length = mpi_reply->Header.PageLength * 4; cm->cm_sge = &request->PageBufferSGE; cm->cm_sglsize = sizeof(MPI2_SGE_IO_UNION); cm->cm_flags = MPR_CM_FLAGS_SGE_SIMPLE | MPR_CM_FLAGS_DATAIN; @@ -274,7 +274,7 @@ mpr_config_get_iounit_pg8(struct mpr_softc *sc, Mpi2ConfigReply_t *mpi_reply, request->Header.PageNumber = 8; request->Header.PageVersion = mpi_reply->Header.PageVersion; request->Header.PageLength = mpi_reply->Header.PageLength; - cm->cm_length = le16toh(mpi_reply->Header.PageLength) * 4; + cm->cm_length = mpi_reply->Header.PageLength * 4; cm->cm_sge = &request->PageBufferSGE; cm->cm_sglsize = sizeof(MPI2_SGE_IO_UNION); cm->cm_flags = MPR_CM_FLAGS_SGE_SIMPLE | MPR_CM_FLAGS_DATAIN; @@ -406,7 +406,7 @@ mpr_config_get_man_pg11(struct mpr_softc *sc, Mpi2ConfigReply_t *mpi_reply, request->Header.PageNumber = 11; request->Header.PageVersion = mpi_reply->Header.PageVersion; request->Header.PageLength = mpi_reply->Header.PageLength; - cm->cm_length = le16toh(mpi_reply->Header.PageLength) * 4; + cm->cm_length = mpi_reply->Header.PageLength * 4; cm->cm_sge = &request->PageBufferSGE; cm->cm_sglsize = sizeof(MPI2_SGE_IO_UNION); cm->cm_flags = MPR_CM_FLAGS_SGE_SIMPLE | MPR_CM_FLAGS_DATAIN; @@ -602,7 +602,7 @@ mpr_config_get_dpm_pg0(struct mpr_softc *sc, Mpi2ConfigReply_t *mpi_reply, request->PageAddress = sc->max_dpm_entries << MPI2_DPM_PGAD_ENTRY_COUNT_SHIFT; request->ExtPageLength = mpi_reply->ExtPageLength; - cm->cm_length = le16toh(request->ExtPageLength) * 4; + cm->cm_length = le16toh(request->ExtPageLength) * 4; cm->cm_sge = &request->PageBufferSGE; cm->cm_sglsize = sizeof(MPI2_SGE_IO_UNION); cm->cm_flags = MPR_CM_FLAGS_SGE_SIMPLE | MPR_CM_FLAGS_DATAIN; @@ -1282,7 +1282,7 @@ mpr_config_get_bios_pg3(struct mpr_softc *sc, Mpi2ConfigReply_t *mpi_reply, request->Header.PageNumber = 3; request->Header.PageVersion = mpi_reply->Header.PageVersion; request->Header.PageLength = mpi_reply->Header.PageLength; - cm->cm_length = le16toh(mpi_reply->Header.PageLength) * 4; + cm->cm_length = mpi_reply->Header.PageLength * 4; cm->cm_sge = &request->PageBufferSGE; cm->cm_sglsize = sizeof(MPI2_SGE_IO_UNION); cm->cm_flags = MPR_CM_FLAGS_SGE_SIMPLE | MPR_CM_FLAGS_DATAIN; @@ -1414,7 +1414,7 @@ mpr_config_get_raid_volume_pg0(struct mpr_softc *sc, Mpi2ConfigReply_t request->Header.PageLength = mpi_reply->Header.PageLength; request->Header.PageVersion = mpi_reply->Header.PageVersion; request->PageAddress = page_address; - cm->cm_length = le16toh(mpi_reply->Header.PageLength) * 4; + cm->cm_length = mpi_reply->Header.PageLength * 4; cm->cm_sge = &request->PageBufferSGE; cm->cm_sglsize = sizeof(MPI2_SGE_IO_UNION); cm->cm_flags = MPR_CM_FLAGS_SGE_SIMPLE | MPR_CM_FLAGS_DATAIN; @@ -1546,7 +1546,7 @@ mpr_config_get_raid_volume_pg1(struct mpr_softc *sc, Mpi2ConfigReply_t request->Header.PageLength = mpi_reply->Header.PageLength; request->Header.PageVersion = mpi_reply->Header.PageVersion; request->PageAddress = htole32(form | handle); - cm->cm_length = le16toh(mpi_reply->Header.PageLength) * 4; + cm->cm_length = mpi_reply->Header.PageLength * 4; cm->cm_sge = &request->PageBufferSGE; cm->cm_sglsize = sizeof(MPI2_SGE_IO_UNION); cm->cm_flags = MPR_CM_FLAGS_SGE_SIMPLE | MPR_CM_FLAGS_DATAIN; @@ -1704,7 +1704,7 @@ mpr_config_get_raid_pd_pg0(struct mpr_softc *sc, Mpi2ConfigReply_t *mpi_reply, request->Header.PageLength = mpi_reply->Header.PageLength; request->Header.PageVersion = mpi_reply->Header.PageVersion; request->PageAddress = page_address; - cm->cm_length = le16toh(mpi_reply->Header.PageLength) * 4; + cm->cm_length = mpi_reply->Header.PageLength * 4; cm->cm_sge = &request->PageBufferSGE; cm->cm_sglsize = sizeof(MPI2_SGE_IO_UNION); cm->cm_flags = MPR_CM_FLAGS_SGE_SIMPLE | MPR_CM_FLAGS_DATAIN; diff --git a/sys/dev/mpr/mpr_mapping.c b/sys/dev/mpr/mpr_mapping.c index 2b83ce49c158..ef97080fb175 100644 --- a/sys/dev/mpr/mpr_mapping.c +++ b/sys/dev/mpr/mpr_mapping.c @@ -2567,7 +2567,7 @@ mpr_mapping_initialize(struct mpr_softc *sc) sc->pending_map_events = 0; sc->num_enc_table_entries = 0; sc->num_rsvd_entries = 0; - sc->max_dpm_entries = sc->ioc_pg8.MaxPersistentEntries; + sc->max_dpm_entries = le16toh(sc->ioc_pg8.MaxPersistentEntries); sc->is_dpm_enable = (sc->max_dpm_entries) ? 1 : 0; sc->track_mapping_events = 0; @@ -2581,7 +2581,7 @@ mpr_mapping_initialize(struct mpr_softc *sc) if (ioc_pg8_flags & MPI2_IOCPAGE8_FLAGS_RESERVED_TARGETID_0) sc->num_rsvd_entries = 1; - volume_mapping_flags = sc->ioc_pg8.IRVolumeMappingFlags & + volume_mapping_flags = le16toh(sc->ioc_pg8.IRVolumeMappingFlags) & MPI2_IOCPAGE8_IRFLAGS_MASK_VOLUME_MAPPING_MODE; if (sc->ir_firmware && (volume_mapping_flags == MPI2_IOCPAGE8_IRFLAGS_LOW_VOLUME_MAPPING)) diff --git a/sys/dev/mpr/mpr_sas.c b/sys/dev/mpr/mpr_sas.c index de61ac7b8dd8..a60881553f01 100644 --- a/sys/dev/mpr/mpr_sas.c +++ b/sys/dev/mpr/mpr_sas.c @@ -2034,7 +2034,7 @@ mprsas_action_scsiio(struct mprsas_softc *sassc, union ccb *ccb) } if ((lun != NULL) && (lun->eedp_formatted)) { - req->EEDPBlockSize = htole16(lun->eedp_block_size); + req->EEDPBlockSize = htole32(lun->eedp_block_size); eedp_flags |= (MPI2_SCSIIO_EEDPFLAGS_INC_PRI_REFTAG | MPI2_SCSIIO_EEDPFLAGS_CHECK_REFTAG | MPI2_SCSIIO_EEDPFLAGS_CHECK_GUARD); @@ -2400,10 +2400,6 @@ mprsas_scsiio_complete(struct mpr_softc *sc, struct mpr_command *cm) target_id_t target_id; MPR_FUNCTRACE(sc); - mpr_dprint(sc, MPR_TRACE, - "cm %p SMID %u ccb %p reply %p outstanding %u\n", cm, - cm->cm_desc.Default.SMID, cm->cm_ccb, cm->cm_reply, - cm->cm_targ->outstanding); callout_stop(&cm->cm_callout); mtx_assert(&sc->mpr_mtx, MA_OWNED); @@ -2413,6 +2409,12 @@ mprsas_scsiio_complete(struct mpr_softc *sc, struct mpr_command *cm) csio = &ccb->csio; target_id = csio->ccb_h.target_id; rep = (MPI2_SCSI_IO_REPLY *)cm->cm_reply; + mpr_dprint(sc, MPR_TRACE, + "cm %p SMID %u ccb %p reply %p outstanding %u csio->scsi_status 0x%x," + "csio->dxfer_len 0x%x, csio->msg_le 0x%xn\n", cm, + cm->cm_desc.Default.SMID, cm->cm_ccb, cm->cm_reply, + cm->cm_targ->outstanding, csio->scsi_status, + csio->dxfer_len, csio->msg_len); /* * XXX KDM if the chain allocation fails, does it matter if we do * the sync and unload here? It is simpler to do it in every case, @@ -3483,7 +3485,7 @@ mprsas_portenable_complete(struct mpr_softc *sc, struct mpr_command *cm) reply = (MPI2_PORT_ENABLE_REPLY *)cm->cm_reply; if (reply == NULL) mpr_dprint(sc, MPR_FAULT, "Portenable NULL reply\n"); - else if (le16toh(reply->IOCStatus & MPI2_IOCSTATUS_MASK) != + else if ((le16toh(reply->IOCStatus) & MPI2_IOCSTATUS_MASK) != MPI2_IOCSTATUS_SUCCESS) mpr_dprint(sc, MPR_FAULT, "Portenable failed\n"); diff --git a/sys/dev/mpr/mpr_sas_lsi.c b/sys/dev/mpr/mpr_sas_lsi.c index db4cbbb24440..3d698cc4d431 100644 --- a/sys/dev/mpr/mpr_sas_lsi.c +++ b/sys/dev/mpr/mpr_sas_lsi.c @@ -160,11 +160,11 @@ mprsas_evt_handler(struct mpr_softc *sc, uintptr_t data, } bcopy(event->EventData, fw_event->event_data, sz); - fw_event->event = event->Event; - if ((event->Event == MPI2_EVENT_SAS_TOPOLOGY_CHANGE_LIST || - event->Event == MPI2_EVENT_PCIE_TOPOLOGY_CHANGE_LIST || - event->Event == MPI2_EVENT_SAS_ENCL_DEVICE_STATUS_CHANGE || - event->Event == MPI2_EVENT_IR_CONFIGURATION_CHANGE_LIST) && + fw_event->event = le16toh(event->Event); + if ((fw_event->event == MPI2_EVENT_SAS_TOPOLOGY_CHANGE_LIST || + fw_event->event == MPI2_EVENT_PCIE_TOPOLOGY_CHANGE_LIST || + fw_event->event == MPI2_EVENT_SAS_ENCL_DEVICE_STATUS_CHANGE || + fw_event->event == MPI2_EVENT_IR_CONFIGURATION_CHANGE_LIST) && sc->track_mapping_events) sc->pending_map_events++; @@ -173,9 +173,9 @@ mprsas_evt_handler(struct mpr_softc *sc, uintptr_t data, * are processed. Increment the startup_refcount and decrement it after * events are processed. */ - if ((event->Event == MPI2_EVENT_SAS_TOPOLOGY_CHANGE_LIST || - event->Event == MPI2_EVENT_PCIE_TOPOLOGY_CHANGE_LIST || - event->Event == MPI2_EVENT_IR_CONFIGURATION_CHANGE_LIST) && + if ((fw_event->event == MPI2_EVENT_SAS_TOPOLOGY_CHANGE_LIST || + fw_event->event == MPI2_EVENT_PCIE_TOPOLOGY_CHANGE_LIST || + fw_event->event == MPI2_EVENT_IR_CONFIGURATION_CHANGE_LIST) && sc->wait_for_port_enable) mprsas_startup_increment(sc->sassc); @@ -867,9 +867,8 @@ mprsas_add_device(struct mpr_softc *sc, u16 handle, u8 linkrate) parent_devinfo = le32toh(parent_config_page.DeviceInfo); } } - /* TODO Check proper endianness */ - sas_address = config_page.SASAddress.High; - sas_address = (sas_address << 32) | config_page.SASAddress.Low; + sas_address = htole32(config_page.SASAddress.High); + sas_address = (sas_address << 32) | htole32(config_page.SASAddress.Low); mpr_dprint(sc, MPR_MAPPING, "Handle 0x%04x SAS Address from SAS device " "page0 = %jx\n", handle, sas_address); diff --git a/sys/dev/mpr/mpr_table.c b/sys/dev/mpr/mpr_table.c index c2f31af14e91..719866b5fa74 100644 --- a/sys/dev/mpr/mpr_table.c +++ b/sys/dev/mpr/mpr_table.c @@ -316,7 +316,7 @@ mpr_print_portfacts(struct mpr_softc *sc, MPI2_PORT_FACTS_REPLY *facts) MPR_PRINTFIELD_START(sc, "PortFacts"); MPR_PRINTFIELD(sc, facts, PortNumber, %d); MPR_PRINTFIELD(sc, facts, PortType, 0x%x); - MPR_PRINTFIELD(sc, facts, MaxPostedCmdBuffers, %d); + MPR_PRINTFIELD_16(sc, facts, MaxPostedCmdBuffers, %d); } void @@ -324,33 +324,33 @@ mpr_print_evt_generic(struct mpr_softc *sc, MPI2_EVENT_NOTIFICATION_REPLY *event { MPR_PRINTFIELD_START(sc, "EventReply"); - MPR_PRINTFIELD(sc, event, EventDataLength, %d); + MPR_PRINTFIELD_16(sc, event, EventDataLength, %d); MPR_PRINTFIELD(sc, event, AckRequired, %d); mpr_print_field(sc, "Event: %s (0x%x)\n", - mpr_describe_table(mpr_event_names, event->Event), event->Event); - MPR_PRINTFIELD(sc, event, EventContext, 0x%x); + mpr_describe_table(mpr_event_names, le16toh(event->Event)), le16toh(event->Event)); + MPR_PRINTFIELD_32(sc, event, EventContext, 0x%x); } void mpr_print_sasdev0(struct mpr_softc *sc, MPI2_CONFIG_PAGE_SAS_DEV_0 *buf) { MPR_PRINTFIELD_START(sc, "SAS Device Page 0"); - MPR_PRINTFIELD(sc, buf, Slot, %d); - MPR_PRINTFIELD(sc, buf, EnclosureHandle, 0x%x); + MPR_PRINTFIELD_16(sc, buf, Slot, %d); + MPR_PRINTFIELD_16(sc, buf, EnclosureHandle, 0x%x); mpr_print_field(sc, "SASAddress: 0x%jx\n", mpr_to_u64(&buf->SASAddress)); - MPR_PRINTFIELD(sc, buf, ParentDevHandle, 0x%x); + MPR_PRINTFIELD_16(sc, buf, ParentDevHandle, 0x%x); MPR_PRINTFIELD(sc, buf, PhyNum, %d); MPR_PRINTFIELD(sc, buf, AccessStatus, 0x%x); - MPR_PRINTFIELD(sc, buf, DevHandle, 0x%x); + MPR_PRINTFIELD_16(sc, buf, DevHandle, 0x%x); MPR_PRINTFIELD(sc, buf, AttachedPhyIdentifier, 0x%x); MPR_PRINTFIELD(sc, buf, ZoneGroup, %d); - mpr_print_field(sc, "DeviceInfo: %b,%s\n", buf->DeviceInfo, + mpr_print_field(sc, "DeviceInfo: %b,%s\n", le32toh(buf->DeviceInfo), "\20" "\4SataHost" "\5SmpInit" "\6StpInit" "\7SspInit" "\10SataDev" "\11SmpTarg" "\12StpTarg" "\13SspTarg" "\14Direct" "\15LsiDev" "\16AtapiDev" "\17SepDev", mpr_describe_table(mpr_sasdev0_devtype, buf->DeviceInfo & 0x03)); - MPR_PRINTFIELD(sc, buf, Flags, 0x%x); + MPR_PRINTFIELD_16(sc, buf, Flags, 0x%x); MPR_PRINTFIELD(sc, buf, PhysicalPort, %d); MPR_PRINTFIELD(sc, buf, MaxPortConnections, %d); mpr_print_field(sc, "DeviceName: 0x%jx\n", @@ -366,7 +366,7 @@ mpr_print_evt_sas(struct mpr_softc *sc, MPI2_EVENT_NOTIFICATION_REPLY *event) mpr_print_evt_generic(sc, event); - switch(event->Event) { + switch(le16toh(event->Event)) { case MPI2_EVENT_SAS_DISCOVERY: { MPI2_EVENT_DATA_SAS_DISCOVERY *data; @@ -378,7 +378,7 @@ mpr_print_evt_sas(struct mpr_softc *sc, MPI2_EVENT_NOTIFICATION_REPLY *event) mpr_describe_table(mpr_sasdisc_reason, data->ReasonCode)); MPR_PRINTFIELD(sc, data, PhysicalPort, %d); mpr_print_field(sc, "DiscoveryStatus: %b\n", - data->DiscoveryStatus, "\20" + le32toh(data->DiscoveryStatus), "\20" "\1Loop" "\2UnaddressableDev" "\3DupSasAddr" "\5SmpTimeout" "\6ExpRouteFull" "\7RouteIndexError" "\10SmpFailed" "\11SmpCrcError" "\12SubSubLink" "\13TableTableLink" @@ -397,8 +397,8 @@ mpr_print_evt_sas(struct mpr_softc *sc, MPI2_EVENT_NOTIFICATION_REPLY *event) data = (MPI2_EVENT_DATA_SAS_TOPOLOGY_CHANGE_LIST *) &event->EventData; - MPR_PRINTFIELD(sc, data, EnclosureHandle, 0x%x); - MPR_PRINTFIELD(sc, data, ExpanderDevHandle, 0x%x); + MPR_PRINTFIELD_16(sc, data, EnclosureHandle, 0x%x); + MPR_PRINTFIELD_16(sc, data, ExpanderDevHandle, 0x%x); MPR_PRINTFIELD(sc, data, NumPhys, %d); MPR_PRINTFIELD(sc, data, NumEntries, %d); MPR_PRINTFIELD(sc, data, StartPhyNum, %d); @@ -411,7 +411,7 @@ mpr_print_evt_sas(struct mpr_softc *sc, MPI2_EVENT_NOTIFICATION_REPLY *event) phynum = data->StartPhyNum + i; mpr_print_field(sc, "PHY[%d].AttachedDevHandle: 0x%04x\n", phynum, - phy->AttachedDevHandle); + le16toh(phy->AttachedDevHandle)); mpr_print_field(sc, "PHY[%d].LinkRate: %s (0x%x)\n", phynum, mpr_describe_table(mpr_linkrate_names, @@ -428,13 +428,13 @@ mpr_print_evt_sas(struct mpr_softc *sc, MPI2_EVENT_NOTIFICATION_REPLY *event) data = (MPI2_EVENT_DATA_SAS_ENCL_DEV_STATUS_CHANGE *) &event->EventData; - MPR_PRINTFIELD(sc, data, EnclosureHandle, 0x%x); + MPR_PRINTFIELD_16(sc, data, EnclosureHandle, 0x%x); mpr_print_field(sc, "ReasonCode: %s\n", mpr_describe_table(mpr_sastopo_exp, data->ReasonCode)); MPR_PRINTFIELD(sc, data, PhysicalPort, %d); - MPR_PRINTFIELD(sc, data, NumSlots, %d); - MPR_PRINTFIELD(sc, data, StartSlot, %d); - MPR_PRINTFIELD(sc, data, PhyBits, 0x%x); + MPR_PRINTFIELD_16(sc, data, NumSlots, %d); + MPR_PRINTFIELD_16(sc, data, StartSlot, %d); + MPR_PRINTFIELD_32(sc, data, PhyBits, 0x%x); break; } case MPI2_EVENT_SAS_DEVICE_STATUS_CHANGE: @@ -443,12 +443,12 @@ mpr_print_evt_sas(struct mpr_softc *sc, MPI2_EVENT_NOTIFICATION_REPLY *event) data = (MPI2_EVENT_DATA_SAS_DEVICE_STATUS_CHANGE *) &event->EventData; - MPR_PRINTFIELD(sc, data, TaskTag, 0x%x); + MPR_PRINTFIELD_16(sc, data, TaskTag, 0x%x); mpr_print_field(sc, "ReasonCode: %s\n", mpr_describe_table(mpr_sasdev_reason, data->ReasonCode)); MPR_PRINTFIELD(sc, data, ASC, 0x%x); MPR_PRINTFIELD(sc, data, ASCQ, 0x%x); - MPR_PRINTFIELD(sc, data, DevHandle, 0x%x); + MPR_PRINTFIELD_16(sc, data, DevHandle, 0x%x); mpr_print_field(sc, "SASAddress: 0x%jx\n", mpr_to_u64(&data->SASAddress)); break; @@ -476,24 +476,24 @@ mpr_print_expander1(struct mpr_softc *sc, MPI2_CONFIG_PAGE_EXPANDER_1 *buf) MPR_PRINTFIELD(sc, buf, PhysicalPort, %d); MPR_PRINTFIELD(sc, buf, NumPhys, %d); MPR_PRINTFIELD(sc, buf, Phy, %d); - MPR_PRINTFIELD(sc, buf, NumTableEntriesProgrammed, %d); + MPR_PRINTFIELD_16(sc, buf, NumTableEntriesProgrammed, %d); mpr_print_field(sc, "ProgrammedLinkRate: %s (0x%x)\n", mpr_describe_table(mpr_linkrate_names, (buf->ProgrammedLinkRate >> 4) & 0xf), buf->ProgrammedLinkRate); mpr_print_field(sc, "HwLinkRate: %s (0x%x)\n", mpr_describe_table(mpr_linkrate_names, (buf->HwLinkRate >> 4) & 0xf), buf->HwLinkRate); - MPR_PRINTFIELD(sc, buf, AttachedDevHandle, 0x%04x); + MPR_PRINTFIELD_16(sc, buf, AttachedDevHandle, 0x%04x); mpr_print_field(sc, "PhyInfo Reason: %s (0x%x)\n", mpr_describe_table(mpr_phyinfo_reason_names, - (buf->PhyInfo >> 16) & 0xf), buf->PhyInfo); + (le32toh(buf->PhyInfo) >> 16) & 0xf), le32toh(buf->PhyInfo)); mpr_print_field(sc, "AttachedDeviceInfo: %b,%s\n", - buf->AttachedDeviceInfo, "\20" "\4SATAhost" "\5SMPinit" "\6STPinit" + le32toh(buf->AttachedDeviceInfo), "\20" "\4SATAhost" "\5SMPinit" "\6STPinit" "\7SSPinit" "\10SATAdev" "\11SMPtarg" "\12STPtarg" "\13SSPtarg" "\14Direct" "\15LSIdev" "\16ATAPIdev" "\17SEPdev", mpr_describe_table(mpr_sasdev0_devtype, - buf->AttachedDeviceInfo & 0x03)); - MPR_PRINTFIELD(sc, buf, ExpanderDevHandle, 0x%04x); + le32toh(buf->AttachedDeviceInfo) & 0x03)); + MPR_PRINTFIELD_16(sc, buf, ExpanderDevHandle, 0x%04x); MPR_PRINTFIELD(sc, buf, ChangeCount, %d); mpr_print_field(sc, "NegotiatedLinkRate: %s (0x%x)\n", mpr_describe_table(mpr_linkrate_names, @@ -501,10 +501,10 @@ mpr_print_expander1(struct mpr_softc *sc, MPI2_CONFIG_PAGE_EXPANDER_1 *buf) MPR_PRINTFIELD(sc, buf, PhyIdentifier, %d); MPR_PRINTFIELD(sc, buf, AttachedPhyIdentifier, %d); MPR_PRINTFIELD(sc, buf, DiscoveryInfo, 0x%x); - MPR_PRINTFIELD(sc, buf, AttachedPhyInfo, 0x%x); + MPR_PRINTFIELD_32(sc, buf, AttachedPhyInfo, 0x%x); mpr_print_field(sc, "AttachedPhyInfo Reason: %s (0x%x)\n", mpr_describe_table(mpr_phyinfo_reason_names, - buf->AttachedPhyInfo & 0xf), buf->AttachedPhyInfo); + le32toh(buf->AttachedPhyInfo) & 0xf), le32toh(buf->AttachedPhyInfo)); MPR_PRINTFIELD(sc, buf, ZoneGroup, %d); MPR_PRINTFIELD(sc, buf, SelfConfigStatus, 0x%x); } @@ -513,12 +513,12 @@ void mpr_print_sasphy0(struct mpr_softc *sc, MPI2_CONFIG_PAGE_SAS_PHY_0 *buf) { MPR_PRINTFIELD_START(sc, "SAS PHY Page 0"); - MPR_PRINTFIELD(sc, buf, OwnerDevHandle, 0x%04x); - MPR_PRINTFIELD(sc, buf, AttachedDevHandle, 0x%04x); + MPR_PRINTFIELD_16(sc, buf, OwnerDevHandle, 0x%04x); + MPR_PRINTFIELD_16(sc, buf, AttachedDevHandle, 0x%04x); MPR_PRINTFIELD(sc, buf, AttachedPhyIdentifier, %d); mpr_print_field(sc, "AttachedPhyInfo Reason: %s (0x%x)\n", mpr_describe_table(mpr_phyinfo_reason_names, - buf->AttachedPhyInfo & 0xf), buf->AttachedPhyInfo); + le32toh(buf->AttachedPhyInfo) & 0xf), le32toh(buf->AttachedPhyInfo)); mpr_print_field(sc, "ProgrammedLinkRate: %s (0x%x)\n", mpr_describe_table(mpr_linkrate_names, (buf->ProgrammedLinkRate >> 4) & 0xf), buf->ProgrammedLinkRate); @@ -529,7 +529,7 @@ mpr_print_sasphy0(struct mpr_softc *sc, MPI2_CONFIG_PAGE_SAS_PHY_0 *buf) MPR_PRINTFIELD(sc, buf, Flags, 0x%x); mpr_print_field(sc, "PhyInfo Reason: %s (0x%x)\n", mpr_describe_table(mpr_phyinfo_reason_names, - (buf->PhyInfo >> 16) & 0xf), buf->PhyInfo); + (le32toh(buf->PhyInfo) >> 16) & 0xf), le32toh(buf->PhyInfo)); mpr_print_field(sc, "NegotiatedLinkRate: %s (0x%x)\n", mpr_describe_table(mpr_linkrate_names, buf->NegotiatedLinkRate & 0xf), buf->NegotiatedLinkRate); diff --git a/sys/dev/mpr/mprvar.h b/sys/dev/mpr/mprvar.h index 3728a6b5a131..ce755188d706 100644 --- a/sys/dev/mpr/mprvar.h +++ b/sys/dev/mpr/mprvar.h @@ -764,6 +764,10 @@ do { \ mpr_printf((sc), tag "\n") #define MPR_PRINTFIELD(sc, facts, attr, fmt) \ mpr_print_field((sc), #attr ": " #fmt "\n", (facts)->attr) +#define MPR_PRINTFIELD_16(sc, facts, attr, fmt) \ + mpr_print_field((sc), #attr ": " #fmt "\n", le16toh((facts)->attr)) +#define MPR_PRINTFIELD_32(sc, facts, attr, fmt) \ + mpr_print_field((sc), #attr ": " #fmt "\n", le32toh((facts)->attr)) static __inline void mpr_from_u64(uint64_t data, U64 *mpr) From owner-dev-commits-src-main@freebsd.org Tue Mar 2 22:22:38 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 63071553329; Tue, 2 Mar 2021 22:22:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dqs7y2Jgyz3jTm; Tue, 2 Mar 2021 22:22:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4208C1EB81; Tue, 2 Mar 2021 22:22:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 122MMcWj009016; Tue, 2 Mar 2021 22:22:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 122MMccZ009015; Tue, 2 Mar 2021 22:22:38 GMT (envelope-from git) Date: Tue, 2 Mar 2021 22:22:38 GMT Message-Id: <202103022222.122MMccZ009015@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alfredo Dal'Ava Junior" Subject: git: 231633a2e900 - main - [PowerPC64] add mpr to GENERIC64 and GENERIC64LE MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: alfredo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 231633a2e9000d67b09f132ee26951a4621c778a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2021 22:22:38 -0000 The branch main has been updated by alfredo: URL: https://cgit.FreeBSD.org/src/commit/?id=231633a2e9000d67b09f132ee26951a4621c778a commit 231633a2e9000d67b09f132ee26951a4621c778a Author: Alfredo Dal'Ava Junior AuthorDate: 2021-03-02 14:05:37 +0000 Commit: Alfredo Dal'Ava Junior CommitDate: 2021-03-03 01:21:43 +0000 [PowerPC64] add mpr to GENERIC64 and GENERIC64LE Submitted by: Andre Fernando da Silva Reviewed by: luporl, alfredo, Sreekanth Reddy (by email) Sponsored by: Eldorado Research Institute (eldorado.org.br) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D25785 --- sys/powerpc/conf/GENERIC64 | 1 + sys/powerpc/conf/GENERIC64LE | 1 + 2 files changed, 2 insertions(+) diff --git a/sys/powerpc/conf/GENERIC64 b/sys/powerpc/conf/GENERIC64 index e19052379c4a..634a8c2731a8 100644 --- a/sys/powerpc/conf/GENERIC64 +++ b/sys/powerpc/conf/GENERIC64 @@ -147,6 +147,7 @@ device ispfw # Firmware module for Qlogic host adapters device mrsas # LSI/Avago MegaRAID SAS/SATA, 6Gb/s and 12Gb/s device mpt # LSI-Logic MPT-Fusion device mps # LSI-Logic MPT-Fusion 2 +device mpr # LSI SAS3008 MPT-Fusion SAS-3 device sym # NCR/Symbios/LSI Logic 53C8XX/53C1010/53C1510D # ATA/SCSI peripherals diff --git a/sys/powerpc/conf/GENERIC64LE b/sys/powerpc/conf/GENERIC64LE index fc4fc4ceac7c..41815a6a01cc 100644 --- a/sys/powerpc/conf/GENERIC64LE +++ b/sys/powerpc/conf/GENERIC64LE @@ -139,6 +139,7 @@ device ispfw # Firmware module for Qlogic host adapters device mrsas # LSI/Avago MegaRAID SAS/SATA, 6Gb/s and 12Gb/s device mpt # LSI-Logic MPT-Fusion device mps # LSI-Logic MPT-Fusion 2 +device mpr # LSI SAS3008 MPT-Fusion SAS-3 device sym # NCR/Symbios/LSI Logic 53C8XX/53C1010/53C1510D # ATA/SCSI peripherals From owner-dev-commits-src-main@freebsd.org Tue Mar 2 23:22:29 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 31870554D00; Tue, 2 Mar 2021 23:22:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DqtT110Q2z3mdp; Tue, 2 Mar 2021 23:22:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 152211F5D6; Tue, 2 Mar 2021 23:22:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 122NMT7J087573; Tue, 2 Mar 2021 23:22:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 122NMTeC087572; Tue, 2 Mar 2021 23:22:29 GMT (envelope-from git) Date: Tue, 2 Mar 2021 23:22:29 GMT Message-Id: <202103022322.122NMTeC087572@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Wing Subject: git: ce22a792deed - main - autounmountd: set filter-specific flags for the EVFILT_FS filter MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ce22a792deed226ba329005a3fc21b38255c689c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2021 23:22:29 -0000 The branch main has been updated by rew: URL: https://cgit.FreeBSD.org/src/commit/?id=ce22a792deed226ba329005a3fc21b38255c689c commit ce22a792deed226ba329005a3fc21b38255c689c Author: Robert Wing AuthorDate: 2021-03-02 23:18:40 +0000 Commit: Robert Wing CommitDate: 2021-03-02 23:18:40 +0000 autounmountd: set filter-specific flags for the EVFILT_FS filter Set the filter-specific flags VQ_MOUNT and VQ_UNMOUNT for the EVFILT_FS filter. The filter-specific flags for the EVFILT_FS filter are undocumented, but their usage can be found by looking up vfs_event_signal(). Reviewed by: trasz Differential Revision: https://reviews.freebsd.org/D28975 --- usr.sbin/autofs/autounmountd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/autofs/autounmountd.c b/usr.sbin/autofs/autounmountd.c index 92bc8a03c96f..7a4f04c0b848 100644 --- a/usr.sbin/autofs/autounmountd.c +++ b/usr.sbin/autofs/autounmountd.c @@ -327,7 +327,7 @@ main_autounmountd(int argc, char **argv) if (kq < 0) log_err(1, "kqueue"); - EV_SET(&event, 0, EVFILT_FS, EV_ADD | EV_CLEAR, 0, 0, NULL); + EV_SET(&event, 0, EVFILT_FS, EV_ADD | EV_CLEAR, VQ_MOUNT | VQ_UNMOUNT, 0, NULL); error = kevent(kq, &event, 1, NULL, 0, NULL); if (error < 0) log_err(1, "kevent"); From owner-dev-commits-src-main@freebsd.org Tue Mar 2 23:22:30 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 54577554E00; Tue, 2 Mar 2021 23:22:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DqtT21ykSz3mk6; Tue, 2 Mar 2021 23:22:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 369C11F7E8; Tue, 2 Mar 2021 23:22:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 122NMUiv087591; Tue, 2 Mar 2021 23:22:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 122NMUmE087590; Tue, 2 Mar 2021 23:22:30 GMT (envelope-from git) Date: Tue, 2 Mar 2021 23:22:30 GMT Message-Id: <202103022322.122NMUmE087590@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Wing Subject: git: 0cc746f19352 - main - filt_fsevent: only record interested events MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0cc746f19352979b65a3652149e4f6bd21c0104c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2021 23:22:30 -0000 The branch main has been updated by rew: URL: https://cgit.FreeBSD.org/src/commit/?id=0cc746f19352979b65a3652149e4f6bd21c0104c commit 0cc746f19352979b65a3652149e4f6bd21c0104c Author: Robert Wing AuthorDate: 2021-03-02 23:19:22 +0000 Commit: Robert Wing CommitDate: 2021-03-02 23:19:22 +0000 filt_fsevent: only record interested events Respect filter-specific flags for the EVFILT_FS filter. When a kevent is registered with the EVFILT_FS filter, it is always triggered when an EVFILT_FS event occurs, regardless of the filter-specific flags used. Fix that. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D28974 --- sys/kern/vfs_subr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 3f7dae762de0..c4772f691397 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -6016,7 +6016,8 @@ static int filt_fsevent(struct knote *kn, long hint) { - kn->kn_fflags |= hint; + kn->kn_fflags |= kn->kn_sfflags & hint; + return (kn->kn_fflags != 0); } From owner-dev-commits-src-main@freebsd.org Tue Mar 2 23:23:11 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 43FE5554D97; Tue, 2 Mar 2021 23:23:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DqtTq1WJzz3mym; Tue, 2 Mar 2021 23:23:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 26D991F3B8; Tue, 2 Mar 2021 23:23:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 122NNBf3087816; Tue, 2 Mar 2021 23:23:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 122NNB2V087813; Tue, 2 Mar 2021 23:23:11 GMT (envelope-from git) Date: Tue, 2 Mar 2021 23:23:11 GMT Message-Id: <202103022323.122NNB2V087813@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marcin Wojtas Subject: git: 819760b35f31 - main - mvebu_gpio: fix interrupt cause register configuration MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mw X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 819760b35f3196227a1d90089fb98ee115e7ed0d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2021 23:23:11 -0000 The branch main has been updated by mw: URL: https://cgit.FreeBSD.org/src/commit/?id=819760b35f3196227a1d90089fb98ee115e7ed0d commit 819760b35f3196227a1d90089fb98ee115e7ed0d Author: Marcin Wojtas AuthorDate: 2021-02-24 17:02:40 +0000 Commit: Marcin Wojtas CommitDate: 2021-03-02 23:22:42 +0000 mvebu_gpio: fix interrupt cause register configuration According to Armada 8k documentation, the interrupt cause register (at offset 0x14) is RW0C. Update the configuration in attach and the mvebu_gpio_isrc_eoi() to follow the description. Reviewed by: mmel Obtained from: Semihalf Sponsored by: Marvell Differential Revision: https://reviews.freebsd.org/D29013 --- sys/arm/mv/mvebu_gpio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/arm/mv/mvebu_gpio.c b/sys/arm/mv/mvebu_gpio.c index afc3f177ade3..f0471b8d019c 100644 --- a/sys/arm/mv/mvebu_gpio.c +++ b/sys/arm/mv/mvebu_gpio.c @@ -333,7 +333,7 @@ mvebu_gpio_isrc_eoi(struct mvebu_gpio_softc *sc, { if (!mgi->is_level) - intr_modify(sc, GPIO_INT_CAUSE, mgi, 1, 1); + intr_modify(sc, GPIO_INT_CAUSE, mgi, 0, 1); } static int @@ -778,7 +778,7 @@ mvebu_gpio_attach(device_t dev) /* Init HW */ gpio_write(sc, GPIO_INT_MASK, pin, 0); gpio_write(sc, GPIO_INT_LEVEL_MASK, pin, 0); - gpio_write(sc, GPIO_INT_CAUSE, pin, 1); + gpio_write(sc, GPIO_INT_CAUSE, pin, 0); gpio_write(sc, GPIO_DATA_IN_POL, pin, 1); gpio_write(sc, GPIO_BLINK_ENA, pin, 0); } From owner-dev-commits-src-main@freebsd.org Tue Mar 2 23:33:44 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4267D555058; Tue, 2 Mar 2021 23:33:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dqtk01S4mz3nGF; Tue, 2 Mar 2021 23:33:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 24DF41F772; Tue, 2 Mar 2021 23:33:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 122NXi5h001478; Tue, 2 Mar 2021 23:33:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 122NXi9w001477; Tue, 2 Mar 2021 23:33:44 GMT (envelope-from git) Date: Tue, 2 Mar 2021 23:33:44 GMT Message-Id: <202103022333.122NXi9w001477@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Moeller Subject: git: e175b519a6fb - main - lib/flua/libjail: Allow empty params table MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: freqlabs X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e175b519a6fb83889fb3ca679b73d11ea5bea7ad Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2021 23:33:44 -0000 The branch main has been updated by freqlabs: URL: https://cgit.FreeBSD.org/src/commit/?id=e175b519a6fb83889fb3ca679b73d11ea5bea7ad commit e175b519a6fb83889fb3ca679b73d11ea5bea7ad Author: Ryan Moeller AuthorDate: 2021-02-25 05:16:52 +0000 Commit: Ryan Moeller CommitDate: 2021-03-02 23:32:22 +0000 lib/flua/libjail: Allow empty params table The name or jid always gets added to the params, and that's enough to avoid allocating a 0 length params array. Reported by: kevans Reviewed by: kevans MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28778 --- lib/flua/libjail/lua_jail.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/flua/libjail/lua_jail.c b/lib/flua/libjail/lua_jail.c index 9981fd5421c6..b66c60b43bc8 100644 --- a/lib/flua/libjail/lua_jail.c +++ b/lib/flua/libjail/lua_jail.c @@ -113,7 +113,6 @@ l_getparams(lua_State *L) "expected a jail name (string) or id (integer)"); luaL_checktype(L, 2, LUA_TTABLE); params_count = 1 + lua_rawlen(L, 2); - luaL_argcheck(L, params_count > 1, 2, "expected #params > 0"); flags = luaL_optinteger(L, 3, 0); params = malloc(params_count * sizeof(struct jailparam)); @@ -236,7 +235,6 @@ l_setparams(lua_State *L) lua_pushnil(L); for (params_count = 1; lua_next(L, 2) != 0; ++params_count) lua_pop(L, 1); - luaL_argcheck(L, params_count > 1, 2, "expected #params > 0"); flags = luaL_optinteger(L, 3, 0); From owner-dev-commits-src-main@freebsd.org Tue Mar 2 23:41:22 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7F62955507A; Tue, 2 Mar 2021 23:41:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dqttp3DsKz3ngG; Tue, 2 Mar 2021 23:41:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5795E1F6BD; Tue, 2 Mar 2021 23:41:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 122NfMcY012502; Tue, 2 Mar 2021 23:41:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 122NfMuH012501; Tue, 2 Mar 2021 23:41:22 GMT (envelope-from git) Date: Tue, 2 Mar 2021 23:41:22 GMT Message-Id: <202103022341.122NfMuH012501@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marcin Wojtas Subject: git: 09c3f04ff3be - main - iflib: add support for admin completion queues MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mw X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 09c3f04ff3be97ef442f2484396b1f963565b259 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2021 23:41:22 -0000 The branch main has been updated by mw: URL: https://cgit.FreeBSD.org/src/commit/?id=09c3f04ff3be97ef442f2484396b1f963565b259 commit 09c3f04ff3be97ef442f2484396b1f963565b259 Author: Marcin Wojtas AuthorDate: 2021-03-02 23:24:29 +0000 Commit: Marcin Wojtas CommitDate: 2021-03-02 23:40:47 +0000 iflib: add support for admin completion queues For interfaces with admin completion queues, introduce a new devmethod IFDI_ADMIN_COMPLETION_HANDLE and a corresponding flag IFLIB_HAS_ADMINCQ. This provides an option for handling any admin cq logic, which cannot be run from an interrupt context. Said method is called from within iflib's admin task, making it safe to sleep. Reviewed by: mmacy Submitted by: Artur Rojek Obtained from: Semihalf Sponsored by: Amazon, Inc. Differential Revision: https://reviews.freebsd.org/D28708 --- sys/net/ifdi_if.m | 4 ++++ sys/net/iflib.c | 2 ++ sys/net/iflib.h | 5 +++++ 3 files changed, 11 insertions(+) diff --git a/sys/net/ifdi_if.m b/sys/net/ifdi_if.m index 2214d17fbcf1..077b19dd7481 100644 --- a/sys/net/ifdi_if.m +++ b/sys/net/ifdi_if.m @@ -321,6 +321,10 @@ METHOD void link_intr_enable { if_ctx_t _ctx; } DEFAULT null_void_op; +METHOD void admin_completion_handle { + if_ctx_t _ctx; +} DEFAULT null_void_op; + # # interface configuration # diff --git a/sys/net/iflib.c b/sys/net/iflib.c index a7d5a8c24658..05e99ba318df 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -4008,6 +4008,8 @@ _task_fn_admin(void *context) callout_stop(&txq->ift_timer); CALLOUT_UNLOCK(txq); } + if (ctx->ifc_sctx->isc_flags & IFLIB_HAS_ADMINCQ) + IFDI_ADMIN_COMPLETION_HANDLE(ctx); if (do_watchdog) { ctx->ifc_watchdog_events++; IFDI_WATCHDOG_RESET(ctx); diff --git a/sys/net/iflib.h b/sys/net/iflib.h index 95305850f7d3..1e8aed271334 100644 --- a/sys/net/iflib.h +++ b/sys/net/iflib.h @@ -398,6 +398,11 @@ typedef enum { */ #define IFLIB_PSEUDO_ETHER 0x80000 +/* + * Interface has an admin completion queue + */ +#define IFLIB_HAS_ADMINCQ 0x100000 + /* * These enum values are used in iflib_needs_restart to indicate to iflib * functions whether or not the interface needs restarting when certain events From owner-dev-commits-src-main@freebsd.org Tue Mar 2 23:48:54 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9D7995554A6; Tue, 2 Mar 2021 23:48:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dqv3V44bfz3ntc; Tue, 2 Mar 2021 23:48:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7B2581F9E6; Tue, 2 Mar 2021 23:48:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 122NmswK015470; Tue, 2 Mar 2021 23:48:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 122NmsBD015469; Tue, 2 Mar 2021 23:48:54 GMT (envelope-from git) Date: Tue, 2 Mar 2021 23:48:54 GMT Message-Id: <202103022348.122NmsBD015469@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: df3747c6607b - main - Replace STAILQ_SWAP() with simpler STAILQ_CONCAT(). MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: df3747c6607be12d48db825653e6adfc3041e97f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2021 23:48:54 -0000 The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=df3747c6607be12d48db825653e6adfc3041e97f commit df3747c6607be12d48db825653e6adfc3041e97f Author: Alexander Motin AuthorDate: 2021-03-02 23:39:44 +0000 Commit: Alexander Motin CommitDate: 2021-03-02 23:48:49 +0000 Replace STAILQ_SWAP() with simpler STAILQ_CONCAT(). Also remove stray STAILQ_REMOVE_AFTER(), not causing problems only because STAILQ_SWAP() fixed corrupted stqh_last. MFC after: 1 week --- sys/dev/iscsi/icl_soft.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/sys/dev/iscsi/icl_soft.c b/sys/dev/iscsi/icl_soft.c index c64f0cfde71b..d579c034e63f 100644 --- a/sys/dev/iscsi/icl_soft.c +++ b/sys/dev/iscsi/icl_soft.c @@ -933,7 +933,6 @@ icl_conn_send_pdus(struct icl_conn *ic, struct icl_pdu_stailq *queue) request2->ip_bhs_mbuf = NULL; request->ip_bhs_mbuf->m_pkthdr.len += size2; size += size2; - STAILQ_REMOVE_AFTER(queue, request, ip_next); icl_soft_pdu_done(request2, 0); } #if 0 @@ -972,13 +971,11 @@ icl_send_thread(void *arg) for (;;) { for (;;) { /* - * If the local queue is empty, populate it from - * the main one. This way the icl_conn_send_pdus() - * can go through all the queued PDUs without holding - * any locks. + * Populate the local queue from the main one. + * This way the icl_conn_send_pdus() can go through + * all the queued PDUs without holding any locks. */ - if (STAILQ_EMPTY(&queue)) - STAILQ_SWAP(&ic->ic_to_send, &queue, icl_pdu); + STAILQ_CONCAT(&queue, &ic->ic_to_send); ic->ic_check_send_space = false; ICL_CONN_UNLOCK(ic); From owner-dev-commits-src-main@freebsd.org Wed Mar 3 00:26:21 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2B9BE5564F7 for ; Wed, 3 Mar 2021 00:26:21 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x830.google.com (mail-qt1-x830.google.com [IPv6:2607:f8b0:4864:20::830]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dqvtj0YpFz3qxC for ; Wed, 3 Mar 2021 00:26:21 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x830.google.com with SMTP id w1so16299402qto.2 for ; Tue, 02 Mar 2021 16:26:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=PbdnyUqeSy9ovjvbRZ0JWbLz/LQB2M2jtoMyiZlCvhs=; b=lxnXo3MTkAET5KOHv7DL5fKmKifBfomDaZjK6vAOF5wt74AWOsKAyLnuent1cXn0nA ygPtcsUeCVB1oA6MYxgiKAKUktpKLFjBVs+tAjkXn1A9RvZ2h9r+WAOzW9rVDQv7Fg4k 0MLKq4586mwhPExI8abfbUV64AIMjTfRCAIeMWKdBtRKy0lYsgFkZFT9nO6dybhHcQ9u gyAmzcS/IbEFPL2VdqAQeK6sjU4Hqa/kv4oUpRyocg6TY6gIMtYdgUl5PU1OGfsdim1g EE+1/eCXKjXbhtq544290x6yqlHpk3kg7E2leDaYF1iQFeH4OZsE6KSOzPqUG+tjNh58 sB2A== 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=PbdnyUqeSy9ovjvbRZ0JWbLz/LQB2M2jtoMyiZlCvhs=; b=IajZo5TOm/OIf8LXYiSz+jSOq2NUg+trxLtf+dFXNTQuD6mbOx/tl91V4fGpd+FT1z vsokqayEVGvl7d3IvCopd75Vt5JYI9KzNcAn22oygLZv9dRngij8b0/3ReM6RO74w6jF NLJT+xk1hbS1pXPFPSCpo+iERHlcjJwH7eSsE2rPUkdZ4LUNINl5l668HhhqxQquq6yp 9PFLofJerpY9mGQsPdT8zVlCcRcl3fzFQmneOtXL88Tzc0s6fpgtk6b1ioVVzl7LUwD+ PMzUFIy/ghduAxFWzMp3h4LDcOARLXP+YUtxeNOlR7jHMaeOudXJ/J7vYh0xLHSEzDsa GouA== X-Gm-Message-State: AOAM530q1hIb94SRUAxQiHrxh3xaA+Zra2drD6wWuKBDyV0VUoJkubYB 5J7E9ShYi662qlYMZALnz2IrNGySiVGkP8EswR9TcQ== X-Google-Smtp-Source: ABdhPJxJNLbf6CX+7CnbTNr9AJJ84OG2U62/yeVO5E4F+SD5Gp2NznXO+Qk8q6rB9MTUCeJXmVJ/dJCJHJK0U+QvIN0= X-Received: by 2002:ac8:6796:: with SMTP id b22mr20555816qtp.101.1614731180134; Tue, 02 Mar 2021 16:26:20 -0800 (PST) MIME-Version: 1.0 References: <202103021856.122IuYgV048086@gndrsh.dnsmgr.net> <3d947e4c-a529-0b27-a8d7-415600783e53@freebsd.org> In-Reply-To: <3d947e4c-a529-0b27-a8d7-415600783e53@freebsd.org> From: Warner Losh Date: Tue, 2 Mar 2021 17:26:09 -0700 Message-ID: Subject: Re: git: 2c26d77d989a - main - Remove /boot/efi from mtree, missed in 0b7472b3d8d2. To: Nathan Whitehorn Cc: "Rodney W. Grimes" , Brandon Bergren , src-committers , "" , dev-commits-src-main@freebsd.org X-Rspamd-Queue-Id: 4Dqvtj0YpFz3qxC X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 00:26:21 -0000 On Tue, Mar 2, 2021 at 11:58 AM Nathan Whitehorn wrote: > > > On 3/2/21 1:56 PM, Rodney W. Grimes wrote: > >> > >> On Tue, Mar 2, 2021, at 12:26 PM, Rodney W. Grimes wrote: > >>> This fails to apply the proper owner/group and mode values > >>> using what ever defaults are in place of the process running > >>> the build. > >> Keep in mind that this is the root of a mounted filesystem in the case > where it matters, and the filesystem being mounted there doesn't support > proper modes anyway, so the mtree values are a bit irrelevant anyway as the > actual control of that is in the fstab. > > That assumes the mount is done and/or kept. My concern is more > > of a lack security (aka world writable) /boot/efi getting created > > in a distribution that then is *not* mounted for some reason, > > either by choice or error. > > > > mkdir should be stricken from use when possible, install -d > > should be used instead. > > > > But that can't happen in this code. For one thing, it's only used in a > controlled environment to generate SD-card images for a handful of ARM > boards. For another the mount is set up and installed in fstab a couple > lines further down the same script. > Removing this from mtree.root wasn't what was agreed upon. Please put it back and fix it another way. It needs to be in mtree.root because we need it for x86 automatic updating code that's coming later. Warner From owner-dev-commits-src-main@freebsd.org Wed Mar 3 00:29:57 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2716A556CCA for ; Wed, 3 Mar 2021 00:29:57 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x830.google.com (mail-qt1-x830.google.com [IPv6:2607:f8b0:4864:20::830]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dqvyr2pHpz3rQr for ; Wed, 3 Mar 2021 00:29:56 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x830.google.com with SMTP id o1so11860309qta.13 for ; Tue, 02 Mar 2021 16:29:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7TXoQMBcBCrCo2Y18xbdJAPXVlEgTZ1kXAPzDUshS1c=; b=wZA9gePAScKoc5TpISwRlZY0lfYfXWbPf7+tcykOQVf/2gw/vYLUqKP4ERDBEgMuDq L6/zG1bcVpWz3+rk4NQmyM8sxGYfzVCwqIDMCoEQxPFS/rsXBrQVYQyvee2Nv86kCTNM onaJHvsW4U2xilVdwT4j+JdxFcAbKvG1EXVOK+nhYK3udiOGhHHi5Sa/QGDEMS5VWg0F txSmqUigs1iCBbMexdWtN2JdTTLYjFSW+GhgouL7GhvZsoQhfmejVvxpZRSmIH/mZLqi WsXHv1Bsr5wP3wmKmQH2D7WZkW0vQ5O1LlfAgnMkkKMy91Gsg2QgeNlBVeoLA/7L59Q0 dXZA== 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=7TXoQMBcBCrCo2Y18xbdJAPXVlEgTZ1kXAPzDUshS1c=; b=K7Z1CxIIpYQ4PuQRNr8FFV5TtdvwQ6KEe2Tr0gnYkQx1gKns8JJt+z/Iw1lIIOiW6u KJDJSvuezi+EpxETXV9eGVqNf9CaCwYsylLLzmWcC1PDbChez7t3exBhDeLtvb/DYiCW XQFF/Jb6NeVKXmk60Z1udCTkEAVy7dtkWaKDm94lLACdc7Wvw0t4ZamAzdQhRzEhtL6H LDLEXFZDjy9aRtdoSqQ+FNDjNBqXWfHWRM8ek9Tl24nHH/La21BZRmPioSXQG2b9rC/H f4nYebnO0vWK6G8g3vWe+cki72nHFU445C9eYR7q/GbhMCVGiOoEU1NtCB14m0ldDu7q 056Q== X-Gm-Message-State: AOAM533sCY1nRrXms4LwICzt7QDjPYmeWoQ7ARedHLf5CkuWcifgk4xo evCgujwutxTbMK7hs5/hcSlt/SiKEkBhRmXyhNEiug== X-Google-Smtp-Source: ABdhPJzvWZwFj4SGKE1wLod7FUe0qSCP9BorNWV0SC44W7gTPAaIegHxFdPc9OS6L+Rglf6U1LvbCXexf1sO/4Zk+T8= X-Received: by 2002:a05:622a:90:: with SMTP id o16mr19807264qtw.49.1614731395577; Tue, 02 Mar 2021 16:29:55 -0800 (PST) MIME-Version: 1.0 References: <202103021856.122IuYgV048086@gndrsh.dnsmgr.net> <3d947e4c-a529-0b27-a8d7-415600783e53@freebsd.org> In-Reply-To: From: Warner Losh Date: Tue, 2 Mar 2021 17:29:44 -0700 Message-ID: Subject: Re: git: 2c26d77d989a - main - Remove /boot/efi from mtree, missed in 0b7472b3d8d2. To: Nathan Whitehorn Cc: "Rodney W. Grimes" , Brandon Bergren , src-committers , "" , dev-commits-src-main@freebsd.org X-Rspamd-Queue-Id: 4Dqvyr2pHpz3rQr X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=wZA9gePA; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::830) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-3.00 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; RCPT_COUNT_FIVE(0.00)[6]; SPAMHAUS_ZRD(0.00)[2607:f8b0:4864:20::830:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::830:from]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RBL_DBL_DONT_QUERY_IPS(0.00)[2607:f8b0:4864:20::830:from]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; MAILMAN_DEST(0.00)[dev-commits-src-main]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 00:29:57 -0000 On Tue, Mar 2, 2021 at 5:26 PM Warner Losh wrote: > > > On Tue, Mar 2, 2021 at 11:58 AM Nathan Whitehorn > wrote: > >> >> >> On 3/2/21 1:56 PM, Rodney W. Grimes wrote: >> >> >> >> On Tue, Mar 2, 2021, at 12:26 PM, Rodney W. Grimes wrote: >> >>> This fails to apply the proper owner/group and mode values >> >>> using what ever defaults are in place of the process running >> >>> the build. >> >> Keep in mind that this is the root of a mounted filesystem in the case >> where it matters, and the filesystem being mounted there doesn't support >> proper modes anyway, so the mtree values are a bit irrelevant anyway as the >> actual control of that is in the fstab. >> > That assumes the mount is done and/or kept. My concern is more >> > of a lack security (aka world writable) /boot/efi getting created >> > in a distribution that then is *not* mounted for some reason, >> > either by choice or error. >> > >> > mkdir should be stricken from use when possible, install -d >> > should be used instead. >> > >> >> But that can't happen in this code. For one thing, it's only used in a >> controlled environment to generate SD-card images for a handful of ARM >> boards. For another the mount is set up and installed in fstab a couple >> lines further down the same script. >> > > Removing this from mtree.root wasn't what was agreed upon. Please put it > back and fix it another way. > > It needs to be in mtree.root because we need it for x86 automatic updating > code that's coming later. > I should explain that it was there as the result of careful negotiation about a year or so ago. If some architecture shouldn't have it, that architecture should remove it. All mainstream architectures need it, and we've biased towards convenience of the vast majority of our users over catering to less popular architectures. It doesn't have to have the ESP mounted on it, but it does need to be there, be in heir, etc. There has been some talk of moving the mount point to /efi, but I think that went nowhere... Warner From owner-dev-commits-src-main@freebsd.org Wed Mar 3 01:16:24 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5319555820F; Wed, 3 Mar 2021 01:16:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dqx0S1T0sz3tpL; Wed, 3 Mar 2021 01:16:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 21131208DF; Wed, 3 Mar 2021 01:16:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1231GOcG034148; Wed, 3 Mar 2021 01:16:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1231GNDc034147; Wed, 3 Mar 2021 01:16:23 GMT (envelope-from git) Date: Wed, 3 Mar 2021 01:16:23 GMT Message-Id: <202103030116.1231GNDc034147@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Martin Matuska Subject: git: caed7b1c399d - main - zfs: merge OpenZFS master-bedbc13da MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: caed7b1c399de04279822028e15b36367e84232f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 01:16:24 -0000 The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=caed7b1c399de04279822028e15b36367e84232f commit caed7b1c399de04279822028e15b36367e84232f Merge: df3747c6607b 154ce66101db Author: Martin Matuska AuthorDate: 2021-03-03 01:15:33 +0000 Commit: Martin Matuska CommitDate: 2021-03-03 01:15:33 +0000 zfs: merge OpenZFS master-bedbc13da Notable upstream commits: 8e43fa12c Fix vdev_rebuild_thread deadlock 03ef8f09e Add missing checks for unsupported features 2e160dee9 Fix assert in FreeBSD-specific dmu_read_pages bedbc13da Cancel TRIM / initialize on FAULTED non-writeable vdevs MFC after: 1 week Obtained from: OpenZFS sys/contrib/openzfs/cmd/vdev_id/vdev_id | 12 ++- sys/contrib/openzfs/cmd/zpool/Makefile.am | 2 +- sys/contrib/openzfs/config/kernel-bio.m4 | 29 ++++++++ .../openzfs/config/kernel-generic_io_acct.m4 | 69 +++++++++++------ sys/contrib/openzfs/configure.ac | 1 + .../include/os/linux/kernel/linux/blkdev_compat.h | 8 +- sys/contrib/openzfs/include/sys/dsl_synctask.h | 9 ++- sys/contrib/openzfs/lib/libzfs/libzfs_sendrecv.c | 9 +++ .../openzfs/man/man5/zfs-module-parameters.5 | 2 +- sys/contrib/openzfs/module/os/freebsd/zfs/dmu_os.c | 2 +- .../openzfs/module/os/linux/zfs/vdev_disk.c | 4 + .../openzfs/module/os/linux/zfs/zfs_ioctl_os.c | 2 +- sys/contrib/openzfs/module/os/linux/zfs/zvol_os.c | 4 + sys/contrib/openzfs/module/zfs/spa_misc.c | 31 +++++--- sys/contrib/openzfs/module/zfs/vdev_initialize.c | 10 ++- sys/contrib/openzfs/module/zfs/vdev_rebuild.c | 2 +- sys/contrib/openzfs/module/zfs/vdev_trim.c | 15 +++- sys/contrib/openzfs/module/zfs/zfs_ioctl.c | 4 +- sys/contrib/openzfs/tests/runfiles/common.run | 4 +- .../openzfs/tests/zfs-tests/cmd/Makefile.am | 1 + .../tests/zfs-tests/cmd/send_doall/.gitignore | 1 + .../tests/zfs-tests/cmd/send_doall/Makefile.am | 11 +++ .../tests/zfs-tests/cmd/send_doall/send_doall.c | 87 ++++++++++++++++++++++ .../openzfs/tests/zfs-tests/include/commands.cfg | 1 + .../cli_root/zpool_initialize/Makefile.am | 1 + ...zpool_initialize_fault_export_import_online.ksh | 59 +++++++++++++++ .../functional/cli_root/zpool_trim/Makefile.am | 1 + .../zpool_trim_fault_export_import_online.ksh | 62 +++++++++++++++ .../zpool_trim/zpool_trim_start_and_cancel_pos.ksh | 22 +++--- .../zfs-tests/tests/functional/rsend/Makefile.am | 4 +- .../tests/functional/rsend/send_doall.ksh | 67 +++++++++++++++++ 31 files changed, 467 insertions(+), 69 deletions(-) diff --cc sys/contrib/openzfs/module/zfs/zfs_ioctl.c index 922253469fba,000000000000..5f291d067bef mode 100644,000000..100644 --- a/sys/contrib/openzfs/module/zfs/zfs_ioctl.c +++ b/sys/contrib/openzfs/module/zfs/zfs_ioctl.c @@@ -1,7688 -1,0 +1,7688 @@@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Portions Copyright 2011 Martin Matuska + * Copyright 2015, OmniTI Computer Consulting, Inc. All rights reserved. + * Portions Copyright 2012 Pawel Jakub Dawidek + * Copyright (c) 2014, 2016 Joyent, Inc. All rights reserved. + * Copyright 2016 Nexenta Systems, Inc. All rights reserved. + * Copyright (c) 2014, Joyent, Inc. All rights reserved. + * Copyright (c) 2011, 2020 by Delphix. All rights reserved. + * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. + * Copyright (c) 2013 Steven Hartland. All rights reserved. + * Copyright (c) 2014 Integros [integros.com] + * Copyright 2016 Toomas Soome + * Copyright (c) 2016 Actifio, Inc. All rights reserved. + * Copyright (c) 2018, loli10K . All rights reserved. + * Copyright 2017 RackTop Systems. + * Copyright (c) 2017 Open-E, Inc. All Rights Reserved. + * Copyright (c) 2019 Datto Inc. + * Copyright (c) 2019, 2020 by Christian Schwarz. All rights reserved. + * Copyright (c) 2019, Klara Inc. + * Copyright (c) 2019, Allan Jude + */ + +/* + * ZFS ioctls. + * + * This file handles the ioctls to /dev/zfs, used for configuring ZFS storage + * pools and filesystems, e.g. with /sbin/zfs and /sbin/zpool. + * + * There are two ways that we handle ioctls: the legacy way where almost + * all of the logic is in the ioctl callback, and the new way where most + * of the marshalling is handled in the common entry point, zfsdev_ioctl(). + * + * Non-legacy ioctls should be registered by calling + * zfs_ioctl_register() from zfs_ioctl_init(). The ioctl is invoked + * from userland by lzc_ioctl(). + * + * The registration arguments are as follows: + * + * const char *name + * The name of the ioctl. This is used for history logging. If the + * ioctl returns successfully (the callback returns 0), and allow_log + * is true, then a history log entry will be recorded with the input & + * output nvlists. The log entry can be printed with "zpool history -i". + * + * zfs_ioc_t ioc + * The ioctl request number, which userland will pass to ioctl(2). + * We want newer versions of libzfs and libzfs_core to run against + * existing zfs kernel modules (i.e. a deferred reboot after an update). + * Therefore the ioctl numbers cannot change from release to release. + * + * zfs_secpolicy_func_t *secpolicy + * This function will be called before the zfs_ioc_func_t, to + * determine if this operation is permitted. It should return EPERM + * on failure, and 0 on success. Checks include determining if the + * dataset is visible in this zone, and if the user has either all + * zfs privileges in the zone (SYS_MOUNT), or has been granted permission + * to do this operation on this dataset with "zfs allow". + * + * zfs_ioc_namecheck_t namecheck + * This specifies what to expect in the zfs_cmd_t:zc_name -- a pool + * name, a dataset name, or nothing. If the name is not well-formed, + * the ioctl will fail and the callback will not be called. + * Therefore, the callback can assume that the name is well-formed + * (e.g. is null-terminated, doesn't have more than one '@' character, + * doesn't have invalid characters). + * + * zfs_ioc_poolcheck_t pool_check + * This specifies requirements on the pool state. If the pool does + * not meet them (is suspended or is readonly), the ioctl will fail + * and the callback will not be called. If any checks are specified + * (i.e. it is not POOL_CHECK_NONE), namecheck must not be NO_NAME. + * Multiple checks can be or-ed together (e.g. POOL_CHECK_SUSPENDED | + * POOL_CHECK_READONLY). + * + * zfs_ioc_key_t *nvl_keys + * The list of expected/allowable innvl input keys. This list is used + * to validate the nvlist input to the ioctl. + * + * boolean_t smush_outnvlist + * If smush_outnvlist is true, then the output is presumed to be a + * list of errors, and it will be "smushed" down to fit into the + * caller's buffer, by removing some entries and replacing them with a + * single "N_MORE_ERRORS" entry indicating how many were removed. See + * nvlist_smush() for details. If smush_outnvlist is false, and the + * outnvlist does not fit into the userland-provided buffer, then the + * ioctl will fail with ENOMEM. + * + * zfs_ioc_func_t *func + * The callback function that will perform the operation. + * + * The callback should return 0 on success, or an error number on + * failure. If the function fails, the userland ioctl will return -1, + * and errno will be set to the callback's return value. The callback + * will be called with the following arguments: + * + * const char *name + * The name of the pool or dataset to operate on, from + * zfs_cmd_t:zc_name. The 'namecheck' argument specifies the + * expected type (pool, dataset, or none). + * + * nvlist_t *innvl + * The input nvlist, deserialized from zfs_cmd_t:zc_nvlist_src. Or + * NULL if no input nvlist was provided. Changes to this nvlist are + * ignored. If the input nvlist could not be deserialized, the + * ioctl will fail and the callback will not be called. + * + * nvlist_t *outnvl + * The output nvlist, initially empty. The callback can fill it in, + * and it will be returned to userland by serializing it into + * zfs_cmd_t:zc_nvlist_dst. If it is non-empty, and serialization + * fails (e.g. because the caller didn't supply a large enough + * buffer), then the overall ioctl will fail. See the + * 'smush_nvlist' argument above for additional behaviors. + * + * There are two typical uses of the output nvlist: + * - To return state, e.g. property values. In this case, + * smush_outnvlist should be false. If the buffer was not large + * enough, the caller will reallocate a larger buffer and try + * the ioctl again. + * + * - To return multiple errors from an ioctl which makes on-disk + * changes. In this case, smush_outnvlist should be true. + * Ioctls which make on-disk modifications should generally not + * use the outnvl if they succeed, because the caller can not + * distinguish between the operation failing, and + * deserialization failing. + * + * IOCTL Interface Errors + * + * The following ioctl input errors can be returned: + * ZFS_ERR_IOC_CMD_UNAVAIL the ioctl number is not supported by kernel + * ZFS_ERR_IOC_ARG_UNAVAIL an input argument is not supported by kernel + * ZFS_ERR_IOC_ARG_REQUIRED a required input argument is missing + * ZFS_ERR_IOC_ARG_BADTYPE an input argument has an invalid type + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "zfs_namecheck.h" +#include "zfs_prop.h" +#include "zfs_deleg.h" +#include "zfs_comutil.h" + +#include +#include +#include + +kmutex_t zfsdev_state_lock; +zfsdev_state_t *zfsdev_state_list; + +/* + * Limit maximum nvlist size. We don't want users passing in insane values + * for zc->zc_nvlist_src_size, since we will need to allocate that much memory. + * Defaults to 0=auto which is handled by platform code. + */ +unsigned long zfs_max_nvlist_src_size = 0; + +/* + * When logging the output nvlist of an ioctl in the on-disk history, limit + * the logged size to this many bytes. This must be less then DMU_MAX_ACCESS. + * This applies primarily to zfs_ioc_channel_program(). + */ +unsigned long zfs_history_output_max = 1024 * 1024; + +uint_t zfs_fsyncer_key; +uint_t zfs_allow_log_key; + +/* DATA_TYPE_ANY is used when zkey_type can vary. */ +#define DATA_TYPE_ANY DATA_TYPE_UNKNOWN + +typedef struct zfs_ioc_vec { + zfs_ioc_legacy_func_t *zvec_legacy_func; + zfs_ioc_func_t *zvec_func; + zfs_secpolicy_func_t *zvec_secpolicy; + zfs_ioc_namecheck_t zvec_namecheck; + boolean_t zvec_allow_log; + zfs_ioc_poolcheck_t zvec_pool_check; + boolean_t zvec_smush_outnvlist; + const char *zvec_name; + const zfs_ioc_key_t *zvec_nvl_keys; + size_t zvec_nvl_key_count; +} zfs_ioc_vec_t; + +/* This array is indexed by zfs_userquota_prop_t */ +static const char *userquota_perms[] = { + ZFS_DELEG_PERM_USERUSED, + ZFS_DELEG_PERM_USERQUOTA, + ZFS_DELEG_PERM_GROUPUSED, + ZFS_DELEG_PERM_GROUPQUOTA, + ZFS_DELEG_PERM_USEROBJUSED, + ZFS_DELEG_PERM_USEROBJQUOTA, + ZFS_DELEG_PERM_GROUPOBJUSED, + ZFS_DELEG_PERM_GROUPOBJQUOTA, + ZFS_DELEG_PERM_PROJECTUSED, + ZFS_DELEG_PERM_PROJECTQUOTA, + ZFS_DELEG_PERM_PROJECTOBJUSED, + ZFS_DELEG_PERM_PROJECTOBJQUOTA, +}; + +static int zfs_ioc_userspace_upgrade(zfs_cmd_t *zc); +static int zfs_ioc_id_quota_upgrade(zfs_cmd_t *zc); +static int zfs_check_settable(const char *name, nvpair_t *property, + cred_t *cr); +static int zfs_check_clearable(const char *dataset, nvlist_t *props, + nvlist_t **errors); +static int zfs_fill_zplprops_root(uint64_t, nvlist_t *, nvlist_t *, + boolean_t *); +int zfs_set_prop_nvlist(const char *, zprop_source_t, nvlist_t *, nvlist_t *); +static int get_nvlist(uint64_t nvl, uint64_t size, int iflag, nvlist_t **nvp); + +static void +history_str_free(char *buf) +{ + kmem_free(buf, HIS_MAX_RECORD_LEN); +} + +static char * +history_str_get(zfs_cmd_t *zc) +{ + char *buf; + + if (zc->zc_history == 0) + return (NULL); + + buf = kmem_alloc(HIS_MAX_RECORD_LEN, KM_SLEEP); + if (copyinstr((void *)(uintptr_t)zc->zc_history, + buf, HIS_MAX_RECORD_LEN, NULL) != 0) { + history_str_free(buf); + return (NULL); + } + + buf[HIS_MAX_RECORD_LEN -1] = '\0'; + + return (buf); +} + +/* + * Return non-zero if the spa version is less than requested version. + */ +static int +zfs_earlier_version(const char *name, int version) +{ + spa_t *spa; + + if (spa_open(name, &spa, FTAG) == 0) { + if (spa_version(spa) < version) { + spa_close(spa, FTAG); + return (1); + } + spa_close(spa, FTAG); + } + return (0); +} + +/* + * Return TRUE if the ZPL version is less than requested version. + */ +static boolean_t +zpl_earlier_version(const char *name, int version) +{ + objset_t *os; + boolean_t rc = B_TRUE; + + if (dmu_objset_hold(name, FTAG, &os) == 0) { + uint64_t zplversion; + + if (dmu_objset_type(os) != DMU_OST_ZFS) { + dmu_objset_rele(os, FTAG); + return (B_TRUE); + } + /* XXX reading from non-owned objset */ + if (zfs_get_zplprop(os, ZFS_PROP_VERSION, &zplversion) == 0) + rc = zplversion < version; + dmu_objset_rele(os, FTAG); + } + return (rc); +} + +static void +zfs_log_history(zfs_cmd_t *zc) +{ + spa_t *spa; + char *buf; + + if ((buf = history_str_get(zc)) == NULL) + return; + + if (spa_open(zc->zc_name, &spa, FTAG) == 0) { + if (spa_version(spa) >= SPA_VERSION_ZPOOL_HISTORY) + (void) spa_history_log(spa, buf); + spa_close(spa, FTAG); + } + history_str_free(buf); +} + +/* + * Policy for top-level read operations (list pools). Requires no privileges, + * and can be used in the local zone, as there is no associated dataset. + */ +/* ARGSUSED */ +static int +zfs_secpolicy_none(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr) +{ + return (0); +} + +/* + * Policy for dataset read operations (list children, get statistics). Requires + * no privileges, but must be visible in the local zone. + */ +/* ARGSUSED */ +static int +zfs_secpolicy_read(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr) +{ + if (INGLOBALZONE(curproc) || + zone_dataset_visible(zc->zc_name, NULL)) + return (0); + + return (SET_ERROR(ENOENT)); +} + +static int +zfs_dozonecheck_impl(const char *dataset, uint64_t zoned, cred_t *cr) +{ + int writable = 1; + + /* + * The dataset must be visible by this zone -- check this first + * so they don't see EPERM on something they shouldn't know about. + */ + if (!INGLOBALZONE(curproc) && + !zone_dataset_visible(dataset, &writable)) + return (SET_ERROR(ENOENT)); + + if (INGLOBALZONE(curproc)) { + /* + * If the fs is zoned, only root can access it from the + * global zone. + */ + if (secpolicy_zfs(cr) && zoned) + return (SET_ERROR(EPERM)); + } else { + /* + * If we are in a local zone, the 'zoned' property must be set. + */ + if (!zoned) + return (SET_ERROR(EPERM)); + + /* must be writable by this zone */ + if (!writable) + return (SET_ERROR(EPERM)); + } + return (0); +} + +static int +zfs_dozonecheck(const char *dataset, cred_t *cr) +{ + uint64_t zoned; + + if (dsl_prop_get_integer(dataset, zfs_prop_to_name(ZFS_PROP_ZONED), + &zoned, NULL)) + return (SET_ERROR(ENOENT)); + + return (zfs_dozonecheck_impl(dataset, zoned, cr)); +} + +static int +zfs_dozonecheck_ds(const char *dataset, dsl_dataset_t *ds, cred_t *cr) +{ + uint64_t zoned; + + if (dsl_prop_get_int_ds(ds, zfs_prop_to_name(ZFS_PROP_ZONED), &zoned)) + return (SET_ERROR(ENOENT)); + + return (zfs_dozonecheck_impl(dataset, zoned, cr)); +} + +static int +zfs_secpolicy_write_perms_ds(const char *name, dsl_dataset_t *ds, + const char *perm, cred_t *cr) +{ + int error; + + error = zfs_dozonecheck_ds(name, ds, cr); + if (error == 0) { + error = secpolicy_zfs(cr); + if (error != 0) + error = dsl_deleg_access_impl(ds, perm, cr); + } + return (error); +} + +static int +zfs_secpolicy_write_perms(const char *name, const char *perm, cred_t *cr) +{ + int error; + dsl_dataset_t *ds; + dsl_pool_t *dp; + + /* + * First do a quick check for root in the global zone, which + * is allowed to do all write_perms. This ensures that zfs_ioc_* + * will get to handle nonexistent datasets. + */ + if (INGLOBALZONE(curproc) && secpolicy_zfs(cr) == 0) + return (0); + + error = dsl_pool_hold(name, FTAG, &dp); + if (error != 0) + return (error); + + error = dsl_dataset_hold(dp, name, FTAG, &ds); + if (error != 0) { + dsl_pool_rele(dp, FTAG); + return (error); + } + + error = zfs_secpolicy_write_perms_ds(name, ds, perm, cr); + + dsl_dataset_rele(ds, FTAG); + dsl_pool_rele(dp, FTAG); + return (error); +} + +/* + * Policy for setting the security label property. + * + * Returns 0 for success, non-zero for access and other errors. + */ +static int +zfs_set_slabel_policy(const char *name, const char *strval, cred_t *cr) +{ +#ifdef HAVE_MLSLABEL + char ds_hexsl[MAXNAMELEN]; + bslabel_t ds_sl, new_sl; + boolean_t new_default = FALSE; + uint64_t zoned; + int needed_priv = -1; + int error; + + /* First get the existing dataset label. */ + error = dsl_prop_get(name, zfs_prop_to_name(ZFS_PROP_MLSLABEL), + 1, sizeof (ds_hexsl), &ds_hexsl, NULL); + if (error != 0) + return (SET_ERROR(EPERM)); + + if (strcasecmp(strval, ZFS_MLSLABEL_DEFAULT) == 0) + new_default = TRUE; + + /* The label must be translatable */ + if (!new_default && (hexstr_to_label(strval, &new_sl) != 0)) + return (SET_ERROR(EINVAL)); + + /* + * In a non-global zone, disallow attempts to set a label that + * doesn't match that of the zone; otherwise no other checks + * are needed. + */ + if (!INGLOBALZONE(curproc)) { + if (new_default || !blequal(&new_sl, CR_SL(CRED()))) + return (SET_ERROR(EPERM)); + return (0); + } + + /* + * For global-zone datasets (i.e., those whose zoned property is + * "off", verify that the specified new label is valid for the + * global zone. + */ + if (dsl_prop_get_integer(name, + zfs_prop_to_name(ZFS_PROP_ZONED), &zoned, NULL)) + return (SET_ERROR(EPERM)); + if (!zoned) { + if (zfs_check_global_label(name, strval) != 0) + return (SET_ERROR(EPERM)); + } + + /* + * If the existing dataset label is nondefault, check if the + * dataset is mounted (label cannot be changed while mounted). + * Get the zfsvfs_t; if there isn't one, then the dataset isn't + * mounted (or isn't a dataset, doesn't exist, ...). + */ + if (strcasecmp(ds_hexsl, ZFS_MLSLABEL_DEFAULT) != 0) { + objset_t *os; + static const char *setsl_tag = "setsl_tag"; + + /* + * Try to own the dataset; abort if there is any error, + * (e.g., already mounted, in use, or other error). + */ + error = dmu_objset_own(name, DMU_OST_ZFS, B_TRUE, B_TRUE, + setsl_tag, &os); + if (error != 0) + return (SET_ERROR(EPERM)); + + dmu_objset_disown(os, B_TRUE, setsl_tag); + + if (new_default) { + needed_priv = PRIV_FILE_DOWNGRADE_SL; + goto out_check; + } + + if (hexstr_to_label(strval, &new_sl) != 0) + return (SET_ERROR(EPERM)); + + if (blstrictdom(&ds_sl, &new_sl)) + needed_priv = PRIV_FILE_DOWNGRADE_SL; + else if (blstrictdom(&new_sl, &ds_sl)) + needed_priv = PRIV_FILE_UPGRADE_SL; + } else { + /* dataset currently has a default label */ + if (!new_default) + needed_priv = PRIV_FILE_UPGRADE_SL; + } + +out_check: + if (needed_priv != -1) + return (PRIV_POLICY(cr, needed_priv, B_FALSE, EPERM, NULL)); + return (0); +#else + return (SET_ERROR(ENOTSUP)); +#endif /* HAVE_MLSLABEL */ +} + +static int +zfs_secpolicy_setprop(const char *dsname, zfs_prop_t prop, nvpair_t *propval, + cred_t *cr) +{ + char *strval; + + /* + * Check permissions for special properties. + */ + switch (prop) { + default: + break; + case ZFS_PROP_ZONED: + /* + * Disallow setting of 'zoned' from within a local zone. + */ + if (!INGLOBALZONE(curproc)) + return (SET_ERROR(EPERM)); + break; + + case ZFS_PROP_QUOTA: + case ZFS_PROP_FILESYSTEM_LIMIT: + case ZFS_PROP_SNAPSHOT_LIMIT: + if (!INGLOBALZONE(curproc)) { + uint64_t zoned; + char setpoint[ZFS_MAX_DATASET_NAME_LEN]; + /* + * Unprivileged users are allowed to modify the + * limit on things *under* (ie. contained by) + * the thing they own. + */ + if (dsl_prop_get_integer(dsname, + zfs_prop_to_name(ZFS_PROP_ZONED), &zoned, setpoint)) + return (SET_ERROR(EPERM)); + if (!zoned || strlen(dsname) <= strlen(setpoint)) + return (SET_ERROR(EPERM)); + } + break; + + case ZFS_PROP_MLSLABEL: + if (!is_system_labeled()) + return (SET_ERROR(EPERM)); + + if (nvpair_value_string(propval, &strval) == 0) { + int err; + + err = zfs_set_slabel_policy(dsname, strval, CRED()); + if (err != 0) + return (err); + } + break; + } + + return (zfs_secpolicy_write_perms(dsname, zfs_prop_to_name(prop), cr)); +} + +/* ARGSUSED */ +static int +zfs_secpolicy_set_fsacl(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr) +{ + int error; + + error = zfs_dozonecheck(zc->zc_name, cr); + if (error != 0) + return (error); + + /* + * permission to set permissions will be evaluated later in + * dsl_deleg_can_allow() + */ + return (0); +} + +/* ARGSUSED */ +static int +zfs_secpolicy_rollback(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr) +{ + return (zfs_secpolicy_write_perms(zc->zc_name, + ZFS_DELEG_PERM_ROLLBACK, cr)); +} + +/* ARGSUSED */ +static int +zfs_secpolicy_send(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr) +{ + dsl_pool_t *dp; + dsl_dataset_t *ds; + const char *cp; + int error; + + /* + * Generate the current snapshot name from the given objsetid, then + * use that name for the secpolicy/zone checks. + */ + cp = strchr(zc->zc_name, '@'); + if (cp == NULL) + return (SET_ERROR(EINVAL)); + error = dsl_pool_hold(zc->zc_name, FTAG, &dp); + if (error != 0) + return (error); + + error = dsl_dataset_hold_obj(dp, zc->zc_sendobj, FTAG, &ds); + if (error != 0) { + dsl_pool_rele(dp, FTAG); + return (error); + } + + dsl_dataset_name(ds, zc->zc_name); + + error = zfs_secpolicy_write_perms_ds(zc->zc_name, ds, + ZFS_DELEG_PERM_SEND, cr); + dsl_dataset_rele(ds, FTAG); + dsl_pool_rele(dp, FTAG); + + return (error); +} + +/* ARGSUSED */ +static int +zfs_secpolicy_send_new(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr) +{ + return (zfs_secpolicy_write_perms(zc->zc_name, + ZFS_DELEG_PERM_SEND, cr)); +} + +static int +zfs_secpolicy_share(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr) +{ + return (SET_ERROR(ENOTSUP)); +} + +static int +zfs_secpolicy_smb_acl(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr) +{ + return (SET_ERROR(ENOTSUP)); +} + +static int +zfs_get_parent(const char *datasetname, char *parent, int parentsize) +{ + char *cp; + + /* + * Remove the @bla or /bla from the end of the name to get the parent. + */ + (void) strncpy(parent, datasetname, parentsize); + cp = strrchr(parent, '@'); + if (cp != NULL) { + cp[0] = '\0'; + } else { + cp = strrchr(parent, '/'); + if (cp == NULL) + return (SET_ERROR(ENOENT)); + cp[0] = '\0'; + } + + return (0); +} + +int +zfs_secpolicy_destroy_perms(const char *name, cred_t *cr) +{ + int error; + + if ((error = zfs_secpolicy_write_perms(name, + ZFS_DELEG_PERM_MOUNT, cr)) != 0) + return (error); + + return (zfs_secpolicy_write_perms(name, ZFS_DELEG_PERM_DESTROY, cr)); +} + +/* ARGSUSED */ +static int +zfs_secpolicy_destroy(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr) +{ + return (zfs_secpolicy_destroy_perms(zc->zc_name, cr)); +} + +/* + * Destroying snapshots with delegated permissions requires + * descendant mount and destroy permissions. + */ +/* ARGSUSED */ +static int +zfs_secpolicy_destroy_snaps(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr) +{ + nvlist_t *snaps; + nvpair_t *pair, *nextpair; + int error = 0; + + snaps = fnvlist_lookup_nvlist(innvl, "snaps"); + + for (pair = nvlist_next_nvpair(snaps, NULL); pair != NULL; + pair = nextpair) { + nextpair = nvlist_next_nvpair(snaps, pair); + error = zfs_secpolicy_destroy_perms(nvpair_name(pair), cr); + if (error == ENOENT) { + /* + * Ignore any snapshots that don't exist (we consider + * them "already destroyed"). Remove the name from the + * nvl here in case the snapshot is created between + * now and when we try to destroy it (in which case + * we don't want to destroy it since we haven't + * checked for permission). + */ + fnvlist_remove_nvpair(snaps, pair); + error = 0; + } + if (error != 0) + break; + } + + return (error); +} + +int +zfs_secpolicy_rename_perms(const char *from, const char *to, cred_t *cr) +{ + char parentname[ZFS_MAX_DATASET_NAME_LEN]; + int error; + + if ((error = zfs_secpolicy_write_perms(from, + ZFS_DELEG_PERM_RENAME, cr)) != 0) + return (error); + + if ((error = zfs_secpolicy_write_perms(from, + ZFS_DELEG_PERM_MOUNT, cr)) != 0) + return (error); + + if ((error = zfs_get_parent(to, parentname, + sizeof (parentname))) != 0) + return (error); + + if ((error = zfs_secpolicy_write_perms(parentname, + ZFS_DELEG_PERM_CREATE, cr)) != 0) + return (error); + + if ((error = zfs_secpolicy_write_perms(parentname, + ZFS_DELEG_PERM_MOUNT, cr)) != 0) + return (error); + + return (error); +} + +/* ARGSUSED */ +static int +zfs_secpolicy_rename(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr) +{ + return (zfs_secpolicy_rename_perms(zc->zc_name, zc->zc_value, cr)); +} + +/* ARGSUSED */ +static int +zfs_secpolicy_promote(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr) +{ + dsl_pool_t *dp; + dsl_dataset_t *clone; + int error; + + error = zfs_secpolicy_write_perms(zc->zc_name, + ZFS_DELEG_PERM_PROMOTE, cr); + if (error != 0) + return (error); + + error = dsl_pool_hold(zc->zc_name, FTAG, &dp); + if (error != 0) + return (error); + + error = dsl_dataset_hold(dp, zc->zc_name, FTAG, &clone); + + if (error == 0) { + char parentname[ZFS_MAX_DATASET_NAME_LEN]; + dsl_dataset_t *origin = NULL; + dsl_dir_t *dd; + dd = clone->ds_dir; + + error = dsl_dataset_hold_obj(dd->dd_pool, + dsl_dir_phys(dd)->dd_origin_obj, FTAG, &origin); + if (error != 0) { + dsl_dataset_rele(clone, FTAG); + dsl_pool_rele(dp, FTAG); + return (error); + } + + error = zfs_secpolicy_write_perms_ds(zc->zc_name, clone, + ZFS_DELEG_PERM_MOUNT, cr); + + dsl_dataset_name(origin, parentname); + if (error == 0) { + error = zfs_secpolicy_write_perms_ds(parentname, origin, + ZFS_DELEG_PERM_PROMOTE, cr); + } + dsl_dataset_rele(clone, FTAG); + dsl_dataset_rele(origin, FTAG); + } + dsl_pool_rele(dp, FTAG); + return (error); +} + +/* ARGSUSED */ +static int +zfs_secpolicy_recv(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr) +{ + int error; + + if ((error = zfs_secpolicy_write_perms(zc->zc_name, + ZFS_DELEG_PERM_RECEIVE, cr)) != 0) + return (error); + + if ((error = zfs_secpolicy_write_perms(zc->zc_name, + ZFS_DELEG_PERM_MOUNT, cr)) != 0) + return (error); + + return (zfs_secpolicy_write_perms(zc->zc_name, + ZFS_DELEG_PERM_CREATE, cr)); +} + +/* ARGSUSED */ +static int +zfs_secpolicy_recv_new(zfs_cmd_t *zc, nvlist_t *innvl, cred_t *cr) +{ + return (zfs_secpolicy_recv(zc, innvl, cr)); +} + *** 6794 LINES SKIPPED *** From owner-dev-commits-src-main@freebsd.org Wed Mar 3 01:31:11 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 674FB5588A6; Wed, 3 Mar 2021 01:31:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DqxKW2XbLz3wVy; Wed, 3 Mar 2021 01:31:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 49D5821108; Wed, 3 Mar 2021 01:31:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1231VBur056555; Wed, 3 Mar 2021 01:31:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1231VBqq056554; Wed, 3 Mar 2021 01:31:11 GMT (envelope-from git) Date: Wed, 3 Mar 2021 01:31:11 GMT Message-Id: <202103030131.1231VBqq056554@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Eric Joyner Subject: git: afb1aa4e6df2 - main - ix(4): Report RX errors as sum of all RX error counters MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: erj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: afb1aa4e6df245d38fd2ba683fa521d5dabe8392 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 01:31:11 -0000 The branch main has been updated by erj: URL: https://cgit.FreeBSD.org/src/commit/?id=afb1aa4e6df245d38fd2ba683fa521d5dabe8392 commit afb1aa4e6df245d38fd2ba683fa521d5dabe8392 Author: Piotr Pietruszewski AuthorDate: 2021-03-03 01:21:58 +0000 Commit: Eric Joyner CommitDate: 2021-03-03 01:25:32 +0000 ix(4): Report RX errors as sum of all RX error counters HW keeps track of RX errors using several counters, each for specific type of errors. Report RX errors to OS as sum of all those counters: CRC errors, illegal bytes, checksum, length, undersize, fragment, oversize and jabber errors. Also, add new "rx_errs" sysctl in the dev.ix.N.mac_stats tree. This is to provide an another way to display the sum of RX errors. Signed-off-by: Piotr Pietruszewski Reviewed By: erj Tested By: gowtham.kumar.ks@intel.com Sponsored By: Intel Corporation Differential Revision: https://reviews.freebsd.org/D27191 --- sys/dev/ixgbe/if_ix.c | 19 ++++++++++++++++++- sys/dev/ixgbe/ixgbe.h | 12 ++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c index 7eb32077f8b0..9f3674cdab5d 100644 --- a/sys/dev/ixgbe/if_ix.c +++ b/sys/dev/ixgbe/if_ix.c @@ -1531,7 +1531,22 @@ ixgbe_update_stats_counters(struct adapter *adapter) IXGBE_SET_OMCASTS(adapter, stats->mptc); IXGBE_SET_COLLISIONS(adapter, 0); IXGBE_SET_IQDROPS(adapter, total_missed_rx); - IXGBE_SET_IERRORS(adapter, stats->crcerrs + stats->rlec); + + /* + * Aggregate following types of errors as RX errors: + * - CRC error count, + * - illegal byte error count, + * - checksum error count, + * - missed packets count, + * - length error count, + * - undersized packets count, + * - fragmented packets count, + * - oversized packets count, + * - jabber count. + */ + IXGBE_SET_IERRORS(adapter, stats->crcerrs + stats->illerrc + stats->xec + + stats->mpc[0] + stats->rlec + stats->ruc + stats->rfc + stats->roc + + stats->rjc); } /* ixgbe_update_stats_counters */ /************************************************************************ @@ -1621,6 +1636,8 @@ ixgbe_add_hw_stats(struct adapter *adapter) CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "MAC Statistics"); stat_list = SYSCTL_CHILDREN(stat_node); + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "rx_errs", + CTLFLAG_RD, &adapter->ierrors, IXGBE_SYSCTL_DESC_RX_ERRS); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "crc_errs", CTLFLAG_RD, &stats->crcerrs, "CRC Errors"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "ill_errs", diff --git a/sys/dev/ixgbe/ixgbe.h b/sys/dev/ixgbe/ixgbe.h index 1502c7fb866e..30dd1d5368fb 100644 --- a/sys/dev/ixgbe/ixgbe.h +++ b/sys/dev/ixgbe/ixgbe.h @@ -536,6 +536,18 @@ struct adapter { "\t2 - tx pause\n" \ "\t3 - tx and rx pause" +#define IXGBE_SYSCTL_DESC_RX_ERRS \ + "\nSum of the following RX errors counters:\n" \ + " * CRC errors,\n" \ + " * illegal byte error count,\n" \ + " * checksum error count,\n" \ + " * missed packet count,\n" \ + " * length error count,\n" \ + " * undersized packets count,\n" \ + " * fragmented packets count,\n" \ + " * oversized packets count,\n" \ + " * jabber count." + /* Workaround to make 8.0 buildable */ #if __FreeBSD_version >= 800000 && __FreeBSD_version < 800504 static __inline int From owner-dev-commits-src-main@freebsd.org Wed Mar 3 01:34:41 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 47DF85589BC; Wed, 3 Mar 2021 01:34:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DqxPY1Rwrz4RFS; Wed, 3 Mar 2021 01:34:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 248212111F; Wed, 3 Mar 2021 01:34:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1231Yf8M060578; Wed, 3 Mar 2021 01:34:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1231YfMj060577; Wed, 3 Mar 2021 01:34:41 GMT (envelope-from git) Date: Wed, 3 Mar 2021 01:34:41 GMT Message-Id: <202103030134.1231YfMj060577@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: ab63da3564e8 - main - Speed up geom_stats_resync in the presence of many devices MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ab63da3564e8ab0907f9d8eb565774848ffdadeb Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 01:34:41 -0000 The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=ab63da3564e8ab0907f9d8eb565774848ffdadeb commit ab63da3564e8ab0907f9d8eb565774848ffdadeb Author: Alan Somers AuthorDate: 2021-02-27 15:59:40 +0000 Commit: Alan Somers CommitDate: 2021-03-03 01:33:45 +0000 Speed up geom_stats_resync in the presence of many devices The old code had a O(n) loop, where n is the size of /dev/devstat. Multiply that by another O(n) loop in devstat_mmap for a total of O(n^2). This change adds DIOCGMEDIASIZE support to /dev/devstat so userland can quickly determine the right amount of memory to map, eliminating the O(n) loop in userland. This change decreases the time to run "gstat -bI0.001" with 16,384 md devices from 29.7s to 4.2s. Also, fix a memory leak first reported as PR 203097. Sponsored by: Axcient Reviewed by: mav, imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D28968 --- lib/libgeom/geom_stats.c | 26 +++++++++++++++++--------- sys/kern/subr_devstat.c | 21 +++++++++++++++++++++ 2 files changed, 38 insertions(+), 9 deletions(-) diff --git a/lib/libgeom/geom_stats.c b/lib/libgeom/geom_stats.c index ebf7868c3c65..450ee491ea1c 100644 --- a/lib/libgeom/geom_stats.c +++ b/lib/libgeom/geom_stats.c @@ -32,9 +32,12 @@ */ #include +#include +#include #include #include #include +#include #include #include #include @@ -53,7 +56,7 @@ geom_stats_close(void) { if (statsfd == -1) return; - munmap(statp, npages *pagesize); + munmap(statp, npages * pagesize); statp = NULL; close (statsfd); statsfd = -1; @@ -63,17 +66,22 @@ void geom_stats_resync(void) { void *p; + off_t mediasize; + int error; if (statsfd == -1) return; - for (;;) { - p = mmap(statp, (npages + 1) * pagesize, - PROT_READ, MAP_SHARED, statsfd, 0); - if (p == MAP_FAILED) - break; - else - statp = p; - npages++; + error = ioctl(statsfd, DIOCGMEDIASIZE, &mediasize); + if (error) + err(1, "DIOCGMEDIASIZE(" _PATH_DEV DEVSTAT_DEVICE_NAME ")"); + + munmap(statp, npages * pagesize); + p = mmap(statp, mediasize, PROT_READ, MAP_SHARED, statsfd, 0); + if (p == MAP_FAILED) + err(1, "mmap(/dev/devstat):"); + else { + statp = p; + npages = mediasize / pagesize; } } diff --git a/sys/kern/subr_devstat.c b/sys/kern/subr_devstat.c index 091164a11fcf..98a41fd179c2 100644 --- a/sys/kern/subr_devstat.c +++ b/sys/kern/subr_devstat.c @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include @@ -473,10 +474,12 @@ SYSCTL_INT(_kern_devstat, OID_AUTO, version, CTLFLAG_RD, #define statsperpage (PAGE_SIZE / sizeof(struct devstat)) +static d_ioctl_t devstat_ioctl; static d_mmap_t devstat_mmap; static struct cdevsw devstat_cdevsw = { .d_version = D_VERSION, + .d_ioctl = devstat_ioctl, .d_mmap = devstat_mmap, .d_name = "devstat", }; @@ -487,9 +490,26 @@ struct statspage { u_int nfree; }; +static size_t pagelist_pages = 0; static TAILQ_HEAD(, statspage) pagelist = TAILQ_HEAD_INITIALIZER(pagelist); static MALLOC_DEFINE(M_DEVSTAT, "devstat", "Device statistics"); +static int +devstat_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, + struct thread *td) +{ + int error = ENOTTY; + + switch (cmd) { + case DIOCGMEDIASIZE: + error = 0; + *(off_t *)data = pagelist_pages * PAGE_SIZE; + break; + } + + return (error); +} + static int devstat_mmap(struct cdev *dev, vm_ooffset_t offset, vm_paddr_t *paddr, int nprot, vm_memattr_t *memattr) @@ -556,6 +576,7 @@ devstat_alloc(void) * head but the order on the list determine the * sequence of the mapping so we can't do that. */ + pagelist_pages++; TAILQ_INSERT_TAIL(&pagelist, spp, list); } else break; From owner-dev-commits-src-main@freebsd.org Wed Mar 3 01:34:42 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 61DF4558CCE; Wed, 3 Mar 2021 01:34:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DqxPZ2NRZz4QtZ; Wed, 3 Mar 2021 01:34:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 44CEB20CEE; Wed, 3 Mar 2021 01:34:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1231YgeF060600; Wed, 3 Mar 2021 01:34:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1231YgLO060599; Wed, 3 Mar 2021 01:34:42 GMT (envelope-from git) Date: Wed, 3 Mar 2021 01:34:42 GMT Message-Id: <202103030134.1231YgLO060599@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: d977417d74a7 - main - [skip ci] fix a typo in a comment in mdconfig.c MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d977417d74a704930b5952cbd653638ccd25eaa7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 01:34:42 -0000 The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=d977417d74a704930b5952cbd653638ccd25eaa7 commit d977417d74a704930b5952cbd653638ccd25eaa7 Author: Alan Somers AuthorDate: 2021-02-27 16:04:10 +0000 Commit: Alan Somers CommitDate: 2021-03-03 01:33:45 +0000 [skip ci] fix a typo in a comment in mdconfig.c Sponsored by: Axcient Reviewed by: mav, imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D28968 --- sbin/mdconfig/mdconfig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/mdconfig/mdconfig.c b/sbin/mdconfig/mdconfig.c index 852909aa9032..0f76ca6149f1 100644 --- a/sbin/mdconfig/mdconfig.c +++ b/sbin/mdconfig/mdconfig.c @@ -423,7 +423,7 @@ md_set_file(const char *fn) /* * Lists md(4) disks. Is used also as a query routine, since it handles XML * interface. 'units' can be NULL for listing memory disks. It might be - * coma-separated string containing md(4) disk names. 'opt' distinguished + * comma-separated string containing md(4) disk names. 'opt' distinguished * between list and query mode. */ static int From owner-dev-commits-src-main@freebsd.org Wed Mar 3 01:35:22 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3F83A558D28; Wed, 3 Mar 2021 01:35:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DqxQL1Mc9z4RTr; Wed, 3 Mar 2021 01:35:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 173F321317; Wed, 3 Mar 2021 01:35:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1231ZLqO060826; Wed, 3 Mar 2021 01:35:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1231ZLFh060825; Wed, 3 Mar 2021 01:35:21 GMT (envelope-from git) Date: Wed, 3 Mar 2021 01:35:21 GMT Message-Id: <202103030135.1231ZLFh060825@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: b3fce46a3eac - main - cam: remove redundant scsi_vpd_block_characteristics definition MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b3fce46a3eac600935f3aac2b224a83defcf1cb3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 01:35:22 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=b3fce46a3eac600935f3aac2b224a83defcf1cb3 commit b3fce46a3eac600935f3aac2b224a83defcf1cb3 Author: Warner Losh AuthorDate: 2021-03-03 01:31:43 +0000 Commit: Warner Losh CommitDate: 2021-03-03 01:35:09 +0000 cam: remove redundant scsi_vpd_block_characteristics definition There were two definitions for the SCSI VPD Block Device Characteristics (page 0xb1): struct scsi_vpd_block_characteristics and struct scsi_vpd_block_device_characteristics. The latter is more complete and more widely used. Convert uses of the former to the latter by tweaking the da driver and removing sturct scsi_vpd_block_characteristics. --- sys/cam/scsi/scsi_all.h | 24 ------------------------ sys/cam/scsi/scsi_da.c | 7 +++---- 2 files changed, 3 insertions(+), 28 deletions(-) diff --git a/sys/cam/scsi/scsi_all.h b/sys/cam/scsi/scsi_all.h index ff27388e446c..597d5fd68447 100644 --- a/sys/cam/scsi/scsi_all.h +++ b/sys/cam/scsi/scsi_all.h @@ -2820,30 +2820,6 @@ struct scsi_vpd_sfs uint8_t codes[]; }; -/* - * Block Device Characteristics VPD Page based on - * T10/1799-D Revision 31 - */ -struct scsi_vpd_block_characteristics -{ - u_int8_t device; - u_int8_t page_code; -#define SVPD_BDC 0xB1 - u_int8_t page_length[2]; - u_int8_t medium_rotation_rate[2]; -#define SVPD_BDC_RATE_NOT_REPORTED 0x00 -#define SVPD_BDC_RATE_NON_ROTATING 0x01 - u_int8_t reserved1; - u_int8_t nominal_form_factor; -#define SVPD_BDC_FORM_NOT_REPORTED 0x00 -#define SVPD_BDC_FORM_5_25INCH 0x01 -#define SVPD_BDC_FORM_3_5INCH 0x02 -#define SVPD_BDC_FORM_2_5INCH 0x03 -#define SVPD_BDC_FORM_1_5INCH 0x04 -#define SVPD_BDC_FORM_LESSTHAN_1_5INCH 0x05 - u_int8_t reserved2[56]; -}; - /* * Block Device Characteristics VPD Page */ diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c index e426fe07621b..c13b51921745 100644 --- a/sys/cam/scsi/scsi_da.c +++ b/sys/cam/scsi/scsi_da.c @@ -3650,14 +3650,14 @@ out: } case DA_STATE_PROBE_BDC: { - struct scsi_vpd_block_characteristics *bdc; + struct scsi_vpd_block_device_characteristics *bdc; if (!scsi_vpd_supported_page(periph, SVPD_BDC)) { softc->state = DA_STATE_PROBE_ATA; goto skipstate; } - bdc = (struct scsi_vpd_block_characteristics *) + bdc = (struct scsi_vpd_block_device_characteristics *) malloc(sizeof(*bdc), M_SCSIDA, M_NOWAIT|M_ZERO); if (bdc == NULL) { @@ -5208,8 +5208,7 @@ dadone_probebdc(struct cam_periph *periph, union ccb *done_ccb) medium_rotation_rate)) { softc->disk->d_rotation_rate = scsi_2btoul(bdc->medium_rotation_rate); - if (softc->disk->d_rotation_rate == - SVPD_BDC_RATE_NON_ROTATING) { + if (softc->disk->d_rotation_rate == SVPD_NON_ROTATING) { cam_iosched_set_sort_queue( softc->cam_iosched, 0); softc->flags &= ~DA_FLAG_ROTATING; From owner-dev-commits-src-main@freebsd.org Wed Mar 3 01:37:26 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8A329558E0B; Wed, 3 Mar 2021 01:37:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DqxSk3W8nz4Rf2; Wed, 3 Mar 2021 01:37:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6B87D20E72; Wed, 3 Mar 2021 01:37:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1231bQSs061311; Wed, 3 Mar 2021 01:37:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1231bQsF061310; Wed, 3 Mar 2021 01:37:26 GMT (envelope-from git) Date: Wed, 3 Mar 2021 01:37:26 GMT Message-Id: <202103030137.1231bQsF061310@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Eric Joyner Subject: git: 9f99061ef9c9 - main - ixl(4): Report RX errors as sum of all RX error counters MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: erj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9f99061ef9c95b171fc92d34026222bb5e052337 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 01:37:26 -0000 The branch main has been updated by erj: URL: https://cgit.FreeBSD.org/src/commit/?id=9f99061ef9c95b171fc92d34026222bb5e052337 commit 9f99061ef9c95b171fc92d34026222bb5e052337 Author: Krzysztof Galazka AuthorDate: 2021-03-03 01:33:11 +0000 Commit: Eric Joyner CommitDate: 2021-03-03 01:37:04 +0000 ixl(4): Report RX errors as sum of all RX error counters HW keeps track of RX errors using several counters, each for specific type of errors. Report RX errors to OS as sum of all those counters: CRC errors, illegal bytes, checksum, length, undersize, fragment, oversize and jabber errors. There is no HW counter for frames with invalid L3/L4 checksums so add a SW one. Also add a "rx_errors" sysctl with a copy of netstat IERRORS counter value to make it easier accessible from scripts. Reviewed By: erj Tested By: gowtham.kumar.ks@intel.com Sponsored By: Intel Corporation Differential Revision: https://reviews.freebsd.org/D27639 --- sys/dev/ixl/ixl.h | 1 + sys/dev/ixl/ixl_pf_main.c | 15 +++++++++++++-- sys/dev/ixl/ixl_txrx.c | 16 +++++++++------- 3 files changed, 23 insertions(+), 9 deletions(-) diff --git a/sys/dev/ixl/ixl.h b/sys/dev/ixl/ixl.h index 3eb0fa4f6b5a..9828760e4ea6 100644 --- a/sys/dev/ixl/ixl.h +++ b/sys/dev/ixl/ixl.h @@ -390,6 +390,7 @@ struct rx_ring { u64 rx_packets; u64 rx_bytes; u64 desc_errs; + u64 csum_errs; }; /* diff --git a/sys/dev/ixl/ixl_pf_main.c b/sys/dev/ixl/ixl_pf_main.c index 2714b1a0e6d8..070ddaef522e 100644 --- a/sys/dev/ixl/ixl_pf_main.c +++ b/sys/dev/ixl/ixl_pf_main.c @@ -808,6 +808,11 @@ ixl_vsi_add_sysctls(struct ixl_vsi * vsi, const char * sysctl_name, bool queues_ vsi_list = SYSCTL_CHILDREN(vsi->vsi_node); ixl_add_sysctls_eth_stats(&vsi->sysctl_ctx, vsi_list, &vsi->eth_stats); + /* Copy of netstat RX errors counter for validation purposes */ + SYSCTL_ADD_UQUAD(&vsi->sysctl_ctx, vsi_list, OID_AUTO, "rx_errors", + CTLFLAG_RD, &vsi->ierrors, + "RX packet errors"); + if (queues_sysctls) ixl_vsi_add_queues_stats(vsi, &vsi->sysctl_ctx); } @@ -2183,7 +2188,7 @@ ixl_update_vsi_stats(struct ixl_vsi *vsi) struct ixl_pf *pf; struct ifnet *ifp; struct i40e_eth_stats *es; - u64 tx_discards; + u64 tx_discards, csum_errs; struct i40e_hw_port_stats *nsd; @@ -2196,6 +2201,11 @@ ixl_update_vsi_stats(struct ixl_vsi *vsi) tx_discards = es->tx_discards + nsd->tx_dropped_link_down; + csum_errs = 0; + for (int i = 0; i < vsi->num_rx_queues; i++) + csum_errs += vsi->rx_queues[i].rxr.csum_errs; + nsd->checksum_error = csum_errs; + /* Update ifnet stats */ IXL_SET_IPACKETS(vsi, es->rx_unicast + es->rx_multicast + @@ -2209,7 +2219,8 @@ ixl_update_vsi_stats(struct ixl_vsi *vsi) IXL_SET_OMCASTS(vsi, es->tx_multicast); IXL_SET_IERRORS(vsi, nsd->crc_errors + nsd->illegal_bytes + - nsd->rx_undersize + nsd->rx_oversize + nsd->rx_fragments + + nsd->checksum_error + nsd->rx_length_errors + + nsd->rx_undersize + nsd->rx_fragments + nsd->rx_oversize + nsd->rx_jabber); IXL_SET_OERRORS(vsi, es->tx_errors); IXL_SET_IQDROPS(vsi, es->rx_discards + nsd->eth.rx_discards); diff --git a/sys/dev/ixl/ixl_txrx.c b/sys/dev/ixl/ixl_txrx.c index e589bb8392cd..bdd3cb8725f8 100644 --- a/sys/dev/ixl/ixl_txrx.c +++ b/sys/dev/ixl/ixl_txrx.c @@ -51,7 +51,7 @@ #endif /* Local Prototypes */ -static void ixl_rx_checksum(if_rxd_info_t ri, u32 status, u32 error, u8 ptype); +static u8 ixl_rx_checksum(if_rxd_info_t ri, u32 status, u32 error, u8 ptype); static int ixl_isc_txd_encap(void *arg, if_pkt_info_t pi); static void ixl_isc_txd_flush(void *arg, uint16_t txqid, qidx_t pidx); @@ -720,7 +720,7 @@ ixl_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) rxr->rx_packets++; if ((if_getcapenable(vsi->ifp) & IFCAP_RXCSUM) != 0) - ixl_rx_checksum(ri, status, error, ptype); + rxr->csum_errs += ixl_rx_checksum(ri, status, error, ptype); ri->iri_flowid = le32toh(cur->wb.qword0.hi_dword.rss); ri->iri_rsstype = ixl_ptype_to_hash(ptype); ri->iri_vtag = vtag; @@ -737,7 +737,7 @@ ixl_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) * doesn't spend time verifying the checksum. * *********************************************************************/ -static void +static u8 ixl_rx_checksum(if_rxd_info_t ri, u32 status, u32 error, u8 ptype) { struct i40e_rx_ptype_decoded decoded; @@ -746,7 +746,7 @@ ixl_rx_checksum(if_rxd_info_t ri, u32 status, u32 error, u8 ptype) /* No L3 or L4 checksum was calculated */ if (!(status & (1 << I40E_RX_DESC_STATUS_L3L4P_SHIFT))) - return; + return (0); decoded = decode_rx_desc_ptype(ptype); @@ -756,7 +756,7 @@ ixl_rx_checksum(if_rxd_info_t ri, u32 status, u32 error, u8 ptype) if (status & (1 << I40E_RX_DESC_STATUS_IPV6EXADD_SHIFT)) { ri->iri_csum_flags = 0; - return; + return (1); } } @@ -764,17 +764,19 @@ ixl_rx_checksum(if_rxd_info_t ri, u32 status, u32 error, u8 ptype) /* IPv4 checksum error */ if (error & (1 << I40E_RX_DESC_ERROR_IPE_SHIFT)) - return; + return (1); ri->iri_csum_flags |= CSUM_L3_VALID; ri->iri_csum_flags |= CSUM_L4_CALC; /* L4 checksum error */ if (error & (1 << I40E_RX_DESC_ERROR_L4E_SHIFT)) - return; + return (1); ri->iri_csum_flags |= CSUM_L4_VALID; ri->iri_csum_data |= htons(0xffff); + + return (0); } /* Set Report Status queue fields to 0 */ From owner-dev-commits-src-main@freebsd.org Wed Mar 3 01:50:34 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DE9EA558D75; Wed, 3 Mar 2021 01:50:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dqxlt5lDTz4S3G; Wed, 3 Mar 2021 01:50:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B817321514; Wed, 3 Mar 2021 01:50:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1231oYxh082143; Wed, 3 Mar 2021 01:50:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1231oYMc082142; Wed, 3 Mar 2021 01:50:34 GMT (envelope-from git) Date: Wed, 3 Mar 2021 01:50:34 GMT Message-Id: <202103030150.1231oYMc082142@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Eric Joyner Subject: git: 21802a127d83 - main - ixl(4): Add ability to control link state on ifconfig down MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: erj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 21802a127d83e8a8c721d69b697e7ddb223d7797 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 01:50:34 -0000 The branch main has been updated by erj: URL: https://cgit.FreeBSD.org/src/commit/?id=21802a127d83e8a8c721d69b697e7ddb223d7797 commit 21802a127d83e8a8c721d69b697e7ddb223d7797 Author: Krzysztof Galazka AuthorDate: 2021-03-03 01:38:51 +0000 Commit: Eric Joyner CommitDate: 2021-03-03 01:43:38 +0000 ixl(4): Add ability to control link state on ifconfig down Add sysctl link_active_on_if_down, which allows user to control if interface is kept in active state when it is brought down with ifconfig. Set it to enabled by default to preserve backwards compatibility. Reviewed by: erj Tested by: gowtham.kumar.ks@intel.com Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D28028 --- sys/dev/ixl/if_ixl.c | 18 +++++++ sys/dev/ixl/ixl_pf.h | 7 +++ sys/dev/ixl/ixl_pf_iflib.c | 2 + sys/dev/ixl/ixl_pf_main.c | 128 ++++++++++++++++++++++++++++++++++++++++++++- 4 files changed, 154 insertions(+), 1 deletion(-) diff --git a/sys/dev/ixl/if_ixl.c b/sys/dev/ixl/if_ixl.c index 340565d66bc8..a79648de274f 100644 --- a/sys/dev/ixl/if_ixl.c +++ b/sys/dev/ixl/if_ixl.c @@ -770,6 +770,12 @@ ixl_if_attach_post(if_ctx_t ctx) ixl_update_stats_counters(pf); ixl_add_hw_stats(pf); + /* + * Driver may have been reloaded. Ensure that the link state + * is consistent with current settings. + */ + ixl_set_link(pf, (pf->state & IXL_PF_STATE_LINK_ACTIVE_ON_DOWN) != 0); + hw->phy.get_link_info = true; i40e_get_link_status(hw, &pf->link_up); ixl_update_link_status(pf); @@ -961,6 +967,8 @@ ixl_if_init(if_ctx_t ctx) return; } + ixl_set_link(pf, true); + /* Reconfigure multicast filters in HW */ ixl_if_multi_set(ctx); @@ -1003,6 +1011,7 @@ void ixl_if_stop(if_ctx_t ctx) { struct ixl_pf *pf = iflib_get_softc(ctx); + struct ifnet *ifp = iflib_get_ifp(ctx); struct ixl_vsi *vsi = &pf->vsi; INIT_DEBUGOUT("ixl_if_stop: begin\n"); @@ -1019,6 +1028,15 @@ ixl_if_stop(if_ctx_t ctx) ixl_disable_rings_intr(vsi); ixl_disable_rings(pf, vsi, &pf->qtag); + + /* + * Don't set link state if only reconfiguring + * e.g. on MTU change. + */ + if ((if_getflags(ifp) & IFF_UP) == 0 && + (atomic_load_acq_32(&pf->state) & + IXL_PF_STATE_LINK_ACTIVE_ON_DOWN) == 0) + ixl_set_link(pf, false); } static int diff --git a/sys/dev/ixl/ixl_pf.h b/sys/dev/ixl/ixl_pf.h index c3fbdc91d358..83c764bc617c 100644 --- a/sys/dev/ixl/ixl_pf.h +++ b/sys/dev/ixl/ixl_pf.h @@ -88,6 +88,7 @@ enum ixl_pf_state { IXL_PF_STATE_EMP_RESET_REQ = (1 << 8), IXL_PF_STATE_FW_LLDP_DISABLED = (1 << 9), IXL_PF_STATE_EEE_ENABLED = (1 << 10), + IXL_PF_STATE_LINK_ACTIVE_ON_DOWN = (1 << 11), }; #define IXL_PF_IN_RECOVERY_MODE(pf) \ @@ -229,6 +230,11 @@ struct ixl_pf { "\t0 - disable\n" \ "\t1 - enable\n" +#define IXL_SYSCTL_HELP_SET_LINK_ACTIVE \ +"\nKeep link active after setting interface down:\n" \ +"\t0 - disable\n" \ +"\t1 - enable\n" + #define IXL_SYSCTL_HELP_READ_I2C \ "\nRead a byte from I2C bus\n" \ "Input: 32-bit value\n" \ @@ -351,6 +357,7 @@ void ixl_pf_reset_stats(struct ixl_pf *); void ixl_get_bus_info(struct ixl_pf *pf); int ixl_aq_get_link_status(struct ixl_pf *, struct i40e_aqc_get_link_status *); +void ixl_set_link(struct ixl_pf *, bool); int ixl_handle_nvmupd_cmd(struct ixl_pf *, struct ifdrv *); int ixl_handle_i2c_eeprom_read_cmd(struct ixl_pf *, struct ifreq *ifr); diff --git a/sys/dev/ixl/ixl_pf_iflib.c b/sys/dev/ixl/ixl_pf_iflib.c index 2b3d035fbcfe..23d9f30299a9 100644 --- a/sys/dev/ixl/ixl_pf_iflib.c +++ b/sys/dev/ixl/ixl_pf_iflib.c @@ -413,6 +413,8 @@ ixl_link_event(struct ixl_pf *pf, struct i40e_arq_event_info *e) /* Print out message if an unqualified module is found */ if ((status->link_info & I40E_AQ_MEDIA_AVAILABLE) && (pf->advertised_speed) && + (atomic_load_32(&pf->state) & + IXL_PF_STATE_LINK_ACTIVE_ON_DOWN) != 0 && (!(status->an_info & I40E_AQ_QUALIFIED_MODULE)) && (!(status->link_info & I40E_AQ_LINK_UP))) device_printf(dev, "Link failed because " diff --git a/sys/dev/ixl/ixl_pf_main.c b/sys/dev/ixl/ixl_pf_main.c index 070ddaef522e..b546701608f1 100644 --- a/sys/dev/ixl/ixl_pf_main.c +++ b/sys/dev/ixl/ixl_pf_main.c @@ -62,6 +62,7 @@ static int ixl_sysctl_pf_tx_itr(SYSCTL_HANDLER_ARGS); static int ixl_sysctl_pf_rx_itr(SYSCTL_HANDLER_ARGS); static int ixl_sysctl_eee_enable(SYSCTL_HANDLER_ARGS); +static int ixl_sysctl_set_link_active(SYSCTL_HANDLER_ARGS); /* Debug Sysctls */ static int ixl_sysctl_link_status(SYSCTL_HANDLER_ARGS); @@ -385,6 +386,9 @@ retry: break; } + /* Keep link active by default */ + atomic_set_32(&pf->state, IXL_PF_STATE_LINK_ACTIVE_ON_DOWN); + /* Print a subset of the capability information. */ device_printf(dev, "PF-ID[%d]: VFs %d, MSI-X %d, VF MSI-X %d, QPs %d, %s\n", @@ -2499,6 +2503,12 @@ ixl_add_device_sysctls(struct ixl_pf *pf) CTLFLAG_RD | CTLFLAG_MPSAFE, &pf->stats.rx_lpi_count, "RX LPI count"); + SYSCTL_ADD_PROC(ctx, ctx_list, OID_AUTO, + "link_active_on_if_down", + CTLTYPE_INT | CTLFLAG_RWTUN, + pf, 0, ixl_sysctl_set_link_active, "I", + IXL_SYSCTL_HELP_SET_LINK_ACTIVE); + /* Add sysctls meant to print debug information, but don't list them * in "sysctl -a" output. */ debug_node = SYSCTL_ADD_NODE(ctx, ctx_list, @@ -2519,6 +2529,11 @@ ixl_add_device_sysctls(struct ixl_pf *pf) CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, pf, 0, ixl_sysctl_link_status, "A", IXL_SYSCTL_HELP_LINK_STATUS); + SYSCTL_ADD_PROC(ctx, debug_list, + OID_AUTO, "phy_abilities_init", + CTLTYPE_STRING | CTLFLAG_RD, + pf, 1, ixl_sysctl_phy_abilities, "A", "Initial PHY Abilities"); + SYSCTL_ADD_PROC(ctx, debug_list, OID_AUTO, "phy_abilities", CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, @@ -3107,6 +3122,95 @@ ixl_find_i2c_interface(struct ixl_pf *pf) return (-1); } +void +ixl_set_link(struct ixl_pf *pf, bool enable) +{ + struct i40e_hw *hw = &pf->hw; + device_t dev = pf->dev; + struct i40e_aq_get_phy_abilities_resp abilities; + struct i40e_aq_set_phy_config config; + enum i40e_status_code aq_error = 0; + u32 phy_type, phy_type_ext; + + /* Get initial capability information */ + aq_error = i40e_aq_get_phy_capabilities(hw, + FALSE, TRUE, &abilities, NULL); + if (aq_error) { + device_printf(dev, + "%s: Error getting phy capabilities %d," + " aq error: %d\n", __func__, aq_error, + hw->aq.asq_last_status); + return; + } + + phy_type = abilities.phy_type; + phy_type_ext = abilities.phy_type_ext; + + /* Get current capability information */ + aq_error = i40e_aq_get_phy_capabilities(hw, + FALSE, FALSE, &abilities, NULL); + if (aq_error) { + device_printf(dev, + "%s: Error getting phy capabilities %d," + " aq error: %d\n", __func__, aq_error, + hw->aq.asq_last_status); + return; + } + + /* Prepare new config */ + memset(&config, 0, sizeof(config)); + config.link_speed = abilities.link_speed; + config.abilities = abilities.abilities; + config.eee_capability = abilities.eee_capability; + config.eeer = abilities.eeer_val; + config.low_power_ctrl = abilities.d3_lpan; + config.fec_config = abilities.fec_cfg_curr_mod_ext_info + & I40E_AQ_PHY_FEC_CONFIG_MASK; + config.phy_type = 0; + config.phy_type_ext = 0; + + if (enable) { + config.phy_type = phy_type; + config.phy_type_ext = phy_type_ext; + + config.abilities &= ~(I40E_AQ_PHY_FLAG_PAUSE_TX | + I40E_AQ_PHY_FLAG_PAUSE_RX); + + switch (pf->fc) { + case I40E_FC_FULL: + config.abilities |= I40E_AQ_PHY_FLAG_PAUSE_TX | + I40E_AQ_PHY_FLAG_PAUSE_RX; + break; + case I40E_FC_RX_PAUSE: + config.abilities |= I40E_AQ_PHY_FLAG_PAUSE_RX; + break; + case I40E_FC_TX_PAUSE: + config.abilities |= I40E_AQ_PHY_FLAG_PAUSE_TX; + break; + default: + break; + } + } + + aq_error = i40e_aq_set_phy_config(hw, &config, NULL); + if (aq_error) { + device_printf(dev, + "%s: Error setting new phy config %d," + " aq error: %d\n", __func__, aq_error, + hw->aq.asq_last_status); + return; + } + + aq_error = i40e_aq_set_link_restart_an(hw, enable, NULL); + if (aq_error) { + device_printf(dev, + "%s: Error set link config %d," + " aq error: %d\n", __func__, aq_error, + hw->aq.asq_last_status); + return; + } +} + static char * ixl_phy_type_string(u32 bit_pos, bool ext) { @@ -3265,7 +3369,7 @@ ixl_sysctl_phy_abilities(SYSCTL_HANDLER_ARGS) } status = i40e_aq_get_phy_capabilities(hw, - FALSE, FALSE, &abilities, NULL); + FALSE, arg2 != 0, &abilities, NULL); if (status) { device_printf(dev, "%s: i40e_aq_get_phy_capabilities() status %s, aq error %s\n", @@ -4447,6 +4551,28 @@ ixl_sysctl_eee_enable(SYSCTL_HANDLER_ARGS) return (0); } +static int +ixl_sysctl_set_link_active(SYSCTL_HANDLER_ARGS) +{ + struct ixl_pf *pf = (struct ixl_pf *)arg1; + int error, state; + + state = !!(atomic_load_acq_32(&pf->state) & + IXL_PF_STATE_LINK_ACTIVE_ON_DOWN); + + error = sysctl_handle_int(oidp, &state, 0, req); + if ((error) || (req->newptr == NULL)) + return (error); + + if (state == 0) + atomic_clear_32(&pf->state, IXL_PF_STATE_LINK_ACTIVE_ON_DOWN); + else + atomic_set_32(&pf->state, IXL_PF_STATE_LINK_ACTIVE_ON_DOWN); + + return (0); +} + + int ixl_attach_get_link_status(struct ixl_pf *pf) { From owner-dev-commits-src-main@freebsd.org Wed Mar 3 02:01:01 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9A028559676; Wed, 3 Mar 2021 02:01:01 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-il1-f169.google.com (mail-il1-f169.google.com [209.85.166.169]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dqxzx3kNfz4SGs; Wed, 3 Mar 2021 02:01:01 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-il1-f169.google.com with SMTP id p10so7797538ils.9; Tue, 02 Mar 2021 18:01:01 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8dyNTo0sFalEHSF/N9Im4Aiyx7vK/96dD1DYZ5wtBG0=; b=V7GS8arj4HJaauu7lUJGypJOeAyqx0BtwpZ0jyROwPIJRQjuvegUiCNWKRZBCeir96 TWVWTzeRfQbC8jJizqxfXFd3U/6rGuQ81oXtHj/tORd7v3OkqOq2X5vbpOwY6D4DzpB1 QhyD9yRR/iuXFiyqOwbif8vS1zEcobE2s9NJ/pVXIxrq8OpnOEnzLximpbrLnZBEffUV eqzlydO73wLevAabvQ47oJZaugWc+ynhEitih4rkYHJSKvW0CBe/ACk/rlvv43NDgGrx txTg1V0+Z8iPX3XDnq8IlXH2wmGrq40gClDR9miFaQyoSjysRyNIwm1O+Z0B8kX755rd gnSQ== X-Gm-Message-State: AOAM531k2N9ZacvTqTT83tMLi7FikNhK6v22BOWrraHNtXWe9VA7brwH lvejNVnU2wj+UX8nxebfYOIJHxnwvaUJNRZ2aKs= X-Google-Smtp-Source: ABdhPJwDuhJZsmZ8tkQeEMtg5NxQDV8zvPkpKDUpxeAl9X8wk8W+U/0yEkIpahqotDWiFuGmm1sKcLkgtNE7dLbOWZU= X-Received: by 2002:a92:d981:: with SMTP id r1mr19638899iln.98.1614736860349; Tue, 02 Mar 2021 18:01:00 -0800 (PST) MIME-Version: 1.0 References: <202103021856.122IuYgV048086@gndrsh.dnsmgr.net> <3d947e4c-a529-0b27-a8d7-415600783e53@freebsd.org> In-Reply-To: From: Ed Maste Date: Tue, 2 Mar 2021 21:00:45 -0500 Message-ID: Subject: Re: git: 2c26d77d989a - main - Remove /boot/efi from mtree, missed in 0b7472b3d8d2. To: Warner Losh Cc: Nathan Whitehorn , "Rodney W. Grimes" , Brandon Bergren , src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4Dqxzx3kNfz4SGs X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 02:01:01 -0000 On Tue, 2 Mar 2021 at 19:30, Warner Losh wrote: > > There has been some talk of moving the mount point to /efi, but I think that went nowhere... I thought about /efi based on arguments from the Linux world, more info at https://wiki.archlinux.org/index.php/EFI_system_partition#Typical_mount_points. I did open https://reviews.freebsd.org/D28814 to move the existing uses to /efi. That said, I'm much more interested in us picking something and using it in the installer/other tooling than whether it's /boot/efi or /efi. From owner-dev-commits-src-main@freebsd.org Wed Mar 3 02:16:25 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1B3B1559BE9; Wed, 3 Mar 2021 02:16:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DqyKj0GV3z4Trj; Wed, 3 Mar 2021 02:16:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F00C8218AF; Wed, 3 Mar 2021 02:16:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1232GOvK014675; Wed, 3 Mar 2021 02:16:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1232GOjv014674; Wed, 3 Mar 2021 02:16:24 GMT (envelope-from git) Date: Wed, 3 Mar 2021 02:16:24 GMT Message-Id: <202103030216.1232GOjv014674@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Moeller Subject: git: 8b22242550c9 - main - sbin/ifconfig: Use a global libifconfig handle MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: freqlabs X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8b22242550c98d0a59b6589f2be0beb1dc2eac13 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 02:16:25 -0000 The branch main has been updated by freqlabs: URL: https://cgit.FreeBSD.org/src/commit/?id=8b22242550c98d0a59b6589f2be0beb1dc2eac13 commit 8b22242550c98d0a59b6589f2be0beb1dc2eac13 Author: Ryan Moeller AuthorDate: 2021-02-28 10:30:09 +0000 Commit: Ryan Moeller CommitDate: 2021-03-03 02:15:40 +0000 sbin/ifconfig: Use a global libifconfig handle This should eventually replace the socket passed to the various handlers. In the meantime, making it global avoids repeatedly opening and closing handles. Reported by: kp Reviewed by: kp (earlier version) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D28990 --- sbin/ifconfig/carp.c | 9 +-------- sbin/ifconfig/ifbridge.c | 9 +-------- sbin/ifconfig/ifclone.c | 6 ------ sbin/ifconfig/ifconfig.c | 9 +++++++++ sbin/ifconfig/ifconfig.h | 5 +++++ sbin/ifconfig/ifgroup.c | 9 +-------- sbin/ifconfig/iflagg.c | 9 +-------- sbin/ifconfig/sfp.c | 14 +++----------- 8 files changed, 21 insertions(+), 49 deletions(-) diff --git a/sbin/ifconfig/carp.c b/sbin/ifconfig/carp.c index d6f8d78ba920..23a119e3b9d7 100644 --- a/sbin/ifconfig/carp.c +++ b/sbin/ifconfig/carp.c @@ -73,14 +73,9 @@ static void carp_status(int s) { struct carpreq carpr[CARP_MAXVHID]; - ifconfig_handle_t *lifh; - - lifh = ifconfig_open(); - if (lifh == NULL) - return; if (ifconfig_carp_get_info(lifh, name, carpr, CARP_MAXVHID) == -1) - goto close; + return; for (size_t i = 0; i < carpr[0].carpr_count; i++) { printf("\tcarp: %s vhid %d advbase %d advskew %d", @@ -91,8 +86,6 @@ carp_status(int s) else printf("\n"); } -close: - ifconfig_close(lifh); } static void diff --git a/sbin/ifconfig/ifbridge.c b/sbin/ifconfig/ifbridge.c index cc1520a2e3f0..2bd9c96f2489 100644 --- a/sbin/ifconfig/ifbridge.c +++ b/sbin/ifconfig/ifbridge.c @@ -156,19 +156,14 @@ bridge_addresses(int s, const char *prefix) static void bridge_status(int s) { - ifconfig_handle_t *lifh; struct ifconfig_bridge_status *bridge; struct ifbropreq *params; const char *pad, *prefix; uint8_t lladdr[ETHER_ADDR_LEN]; uint16_t bprio; - lifh = ifconfig_open(); - if (lifh == NULL) - return; - if (ifconfig_bridge_get_bridge_status(lifh, name, &bridge) == -1) - goto close; + return; params = bridge->params; @@ -227,8 +222,6 @@ bridge_status(int s) } ifconfig_bridge_free_bridge_status(bridge); -close: - ifconfig_close(lifh); } static void diff --git a/sbin/ifconfig/ifclone.c b/sbin/ifconfig/ifclone.c index ad39bd43757a..9cacff239967 100644 --- a/sbin/ifconfig/ifclone.c +++ b/sbin/ifconfig/ifclone.c @@ -57,17 +57,11 @@ typedef enum { static void list_cloners(void) { - ifconfig_handle_t *lifh; char *cloners; size_t cloners_count; - lifh = ifconfig_open(); - if (lifh == NULL) - return; - if (ifconfig_list_cloners(lifh, &cloners, &cloners_count) < 0) errc(1, ifconfig_err_errno(lifh), "unable to list cloners"); - ifconfig_close(lifh); for (const char *name = cloners; name < cloners + cloners_count * IFNAMSIZ; diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c index 5b12baa0656e..fc5351bd420e 100644 --- a/sbin/ifconfig/ifconfig.c +++ b/sbin/ifconfig/ifconfig.c @@ -78,8 +78,12 @@ static const char rcsid[] = #include #include +#include + #include "ifconfig.h" +ifconfig_handle_t *lifh; + /* * Since "struct ifreq" is composed of various union members, callers * should pay special attention to interpret the value. @@ -427,6 +431,10 @@ main(int argc, char *argv[]) f_inet = f_inet6 = f_ether = f_addr = NULL; matchgroup = nogroup = NULL; + lifh = ifconfig_open(); + if (lifh == NULL) + err(EXIT_FAILURE, "ifconfig_open"); + envformat = getenv("IFCONFIG_FORMAT"); if (envformat != NULL) setformat(envformat); @@ -699,6 +707,7 @@ main(int argc, char *argv[]) done: freeformat(); + ifconfig_close(lifh); exit(exit_code); } diff --git a/sbin/ifconfig/ifconfig.h b/sbin/ifconfig/ifconfig.h index 67c25f5921d6..61b1137b47ba 100644 --- a/sbin/ifconfig/ifconfig.h +++ b/sbin/ifconfig/ifconfig.h @@ -36,6 +36,10 @@ * $FreeBSD$ */ +#pragma once + +#include + #define __constructor __attribute__((constructor)) struct afswtch; @@ -128,6 +132,7 @@ struct option { }; void opt_register(struct option *); +extern ifconfig_handle_t *lifh; extern struct ifreq ifr; extern char name[IFNAMSIZ]; /* name of interface */ extern int allmedia; diff --git a/sbin/ifconfig/ifgroup.c b/sbin/ifconfig/ifgroup.c index 2b13227af4f3..7f1173c316d7 100644 --- a/sbin/ifconfig/ifgroup.c +++ b/sbin/ifconfig/ifgroup.c @@ -86,16 +86,11 @@ unsetifgroup(const char *group_name, int d, int s, const struct afswtch *rafp) static void getifgroups(int s) { - ifconfig_handle_t *lifh; struct ifgroupreq ifgr; size_t cnt; - lifh = ifconfig_open(); - if (lifh == NULL) - return; - if (ifconfig_get_groups(lifh, name, &ifgr) == -1) - goto close; + return; cnt = 0; for (size_t i = 0; i < ifgr.ifgr_len / sizeof(struct ifg_req); ++i) { @@ -112,8 +107,6 @@ getifgroups(int s) printf("\n"); free(ifgr.ifgr_groups); -close: - ifconfig_close(lifh); } static void diff --git a/sbin/ifconfig/iflagg.c b/sbin/ifconfig/iflagg.c index 5e726115662a..48d7450076a9 100644 --- a/sbin/ifconfig/iflagg.c +++ b/sbin/ifconfig/iflagg.c @@ -219,7 +219,6 @@ static void lagg_status(int s) { struct lagg_protos protos[] = LAGG_PROTOS; - ifconfig_handle_t *lifh; struct ifconfig_lagg_status *lagg; struct lagg_reqall *ra; struct lagg_reqflags *rf; @@ -228,12 +227,8 @@ lagg_status(int s) struct lacp_opreq *lp; const char *proto; - lifh = ifconfig_open(); - if (lifh == NULL) - return; - if (ifconfig_lagg_get_lagg_status(lifh, name, &lagg) == -1) - goto close; + return; ra = lagg->ra; rf = lagg->rf; @@ -297,8 +292,6 @@ lagg_status(int s) } ifconfig_lagg_free_lagg_status(lagg); -close: - ifconfig_close(lifh); } static diff --git a/sbin/ifconfig/sfp.c b/sbin/ifconfig/sfp.c index 15ff22639060..4900b18ff2c8 100644 --- a/sbin/ifconfig/sfp.c +++ b/sbin/ifconfig/sfp.c @@ -61,15 +61,10 @@ sfp_status(int s, struct ifreq *ifr, int verbose) struct ifconfig_sfp_info_strings strings; struct ifconfig_sfp_vendor_info vendor_info; struct ifconfig_sfp_status status; - ifconfig_handle_t *lifh; size_t channel_count; - lifh = ifconfig_open(); - if (lifh == NULL) - return; - if (ifconfig_sfp_get_sfp_info(lifh, name, &info) == -1) - goto close; + return; ifconfig_sfp_get_sfp_info_strings(&info, &strings); @@ -79,7 +74,7 @@ sfp_status(int s, struct ifreq *ifr, int verbose) strings.sfp_conn); if (ifconfig_sfp_get_sfp_vendor_info(lifh, name, &vendor_info) == -1) - goto close; + return; printf("\tvendor: %s PN: %s SN: %s DATE: %s\n", vendor_info.name, vendor_info.pn, vendor_info.sn, vendor_info.date); @@ -118,7 +113,7 @@ sfp_status(int s, struct ifreq *ifr, int verbose) struct ifconfig_sfp_dump dump; if (ifconfig_sfp_get_sfp_dump(lifh, name, &dump) == -1) - goto close; + return; if (ifconfig_sfp_id_is_qsfp(info.sfp_id)) { printf("\n\tSFF8436 DUMP (0xA0 128..255 range):\n"); @@ -133,7 +128,4 @@ sfp_status(int s, struct ifreq *ifr, int verbose) "\t", HD_OMIT_COUNT | HD_OMIT_CHARS); } } - -close: - ifconfig_close(lifh); } From owner-dev-commits-src-main@freebsd.org Wed Mar 3 02:20:25 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D7F70559C16; Wed, 3 Mar 2021 02:20:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DqyQK5hG2z4TqX; Wed, 3 Mar 2021 02:20:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B1F1B218B1; Wed, 3 Mar 2021 02:20:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1232KP1p022720; Wed, 3 Mar 2021 02:20:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1232KPue022718; Wed, 3 Mar 2021 02:20:25 GMT (envelope-from git) Date: Wed, 3 Mar 2021 02:20:25 GMT Message-Id: <202103030220.1232KPue022718@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Moeller Subject: git: 80545a16df95 - main - libifconfig: Fix typo in symbol map MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: freqlabs X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 80545a16df95263781b3422695527b6238f4bd2c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 02:20:25 -0000 The branch main has been updated by freqlabs: URL: https://cgit.FreeBSD.org/src/commit/?id=80545a16df95263781b3422695527b6238f4bd2c commit 80545a16df95263781b3422695527b6238f4bd2c Author: Ryan Moeller AuthorDate: 2021-03-03 01:55:18 +0000 Commit: Ryan Moeller CommitDate: 2021-03-03 02:19:42 +0000 libifconfig: Fix typo in symbol map MFC after: 1 week --- lib/libifconfig/Symbol.map | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libifconfig/Symbol.map b/lib/libifconfig/Symbol.map index b3e81d6ee497..235092376b11 100644 --- a/lib/libifconfig/Symbol.map +++ b/lib/libifconfig/Symbol.map @@ -10,7 +10,7 @@ FBSD_1.6 { ifconfig_err_errtype; ifconfig_err_ioctlreq; ifconfig_foreach_ifaddr; - ifconfig_foreach_interface; + ifconfig_foreach_iface; ifconfig_get_capability; ifconfig_get_description; ifconfig_get_fib; From owner-dev-commits-src-main@freebsd.org Wed Mar 3 02:41:09 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F339555A333; Wed, 3 Mar 2021 02:41:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DqytF6cjhz4Vps; Wed, 3 Mar 2021 02:41:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D606F21C70; Wed, 3 Mar 2021 02:41:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1232f9lA049200; Wed, 3 Mar 2021 02:41:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1232f9QW049199; Wed, 3 Mar 2021 02:41:09 GMT (envelope-from git) Date: Wed, 3 Mar 2021 02:41:09 GMT Message-Id: <202103030241.1232f9QW049199@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: de415e663c75 - main - release.7: describe the NOGIT option MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: de415e663c7507f6cc59aafeb20243f1fa0994f9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 02:41:10 -0000 The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=de415e663c7507f6cc59aafeb20243f1fa0994f9 commit de415e663c7507f6cc59aafeb20243f1fa0994f9 Author: Alan Somers AuthorDate: 2021-03-03 01:05:25 +0000 Commit: Alan Somers CommitDate: 2021-03-03 02:39:57 +0000 release.7: describe the NOGIT option It was added in 91ce469984500aa994c85640e0af129e3e0c938f (svn r365638) MFC after: 7 days Sponsored by: Axcient Reviewed by: gjb Differential Revision: https://reviews.freebsd.org/D29027 --- share/man/man7/release.7 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/share/man/man7/release.7 b/share/man/man7/release.7 index f176251d89cc..82c1b83fe3a4 100644 --- a/share/man/man7/release.7 +++ b/share/man/man7/release.7 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 23, 2021 +.Dd March 2, 2021 .Dt RELEASE 7 .Os .Sh NAME @@ -143,6 +143,10 @@ Additional .Xr make 1 arguments to pass through, which directly affect the tuning of the build chroot. +.It Va NOGIT +Do not explicitly require the +.Xr git 1 +port to be installed. .It Va GITROOT The .Xr git 1 From owner-dev-commits-src-main@freebsd.org Wed Mar 3 03:20:02 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2FCA155AFE2 for ; Wed, 3 Mar 2021 03:20:02 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qv1-xf30.google.com (mail-qv1-xf30.google.com [IPv6:2607:f8b0:4864:20::f30]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dqzl60Qgjz4Xlt for ; Wed, 3 Mar 2021 03:20:01 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qv1-xf30.google.com with SMTP id bh3so4205031qvb.5 for ; Tue, 02 Mar 2021 19:20:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=G82nZB1qjjdOmSzV3pBP7dqcm/bpWcuHpub2Bd3X7yU=; b=Ib/7ziK+rSw0DzE6WWU47G55cbiv1NcNFhoYctXhnWUXSEga0Bk7C0u/kj6JnDrt+j ugdLSiWkGzgUQTu9YtlNdYFBSqslWStPL94Kxu2yy5Dp4C0Mu2k9JPr8BoahlrpR3QOT SMvlIzpsdINggmzvxwTJL8kAA6uCR/QImIsg2jkur3uLW20vyDImUezzjb1hV9g/NtG7 ktnF5SVzg5DXWjuiLWKwsCk7Ignw8E6F2vy8hQvOxOtsVWHvhClzTnusm+xl+D1mP+fu jiASBZYm/KvRYgOWBWXWJifDpADjWUTo5VM5eTY1/jkndxtraR8/SYC7FXKLwpJhYI/J 8EHw== 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=G82nZB1qjjdOmSzV3pBP7dqcm/bpWcuHpub2Bd3X7yU=; b=lH+C4puK58t4b8bdNgy6+9mY383/9E+/Ee9gqyeROHlKBARfc7YAeEv9RuHslfjlrq kobgkIR14bqaUaEHMM/YKxQWtLLCNrtYeyhvrtcD+KhQ/BMBa2gculO3DTpNN9ggNybs syvrgcszUWTTsAkkyeD2l45jQTTEs/Abn6g3NfbOEqhggmz3pG7tArj5ru/xGChmRLMC ey167LyEXCH7bzzMR2FEaH+PpwgyXZkIRsCYBcj1hJUB7OZRgnL44+TAhAXJB8nzIoXd bkgE382uui6P819qgyH1QOrZLRb/1p+QgFXlz+553JCNlNfHW3siw2nIAUqnehdczzFx kYcw== X-Gm-Message-State: AOAM5311NB/iwQEzFzOsNuRFcIk8dTFPFVL/EI60ATQYKul9wp45iMtd a+bc8LiYT00LfRBT5dTo/P2k1YZ5iB50+YxFCx12/w== X-Google-Smtp-Source: ABdhPJx/7qNC3LgUN/CQKJECX/SXr1yjU9y9LDsGW1YFpP6yFIjye4PgUI/U8RFrYsY62Q+7+z4HwmcZYMAH2r5IMsc= X-Received: by 2002:a0c:a954:: with SMTP id z20mr886084qva.29.1614741600932; Tue, 02 Mar 2021 19:20:00 -0800 (PST) MIME-Version: 1.0 References: <202103021856.122IuYgV048086@gndrsh.dnsmgr.net> <3d947e4c-a529-0b27-a8d7-415600783e53@freebsd.org> In-Reply-To: From: Warner Losh Date: Tue, 2 Mar 2021 20:19:38 -0700 Message-ID: Subject: Re: git: 2c26d77d989a - main - Remove /boot/efi from mtree, missed in 0b7472b3d8d2. To: Ed Maste Cc: Nathan Whitehorn , "Rodney W. Grimes" , Brandon Bergren , src-committers , "" , dev-commits-src-main@freebsd.org X-Rspamd-Queue-Id: 4Dqzl60Qgjz4Xlt X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 03:20:02 -0000 On Tue, Mar 2, 2021, 7:01 PM Ed Maste wrote: > On Tue, 2 Mar 2021 at 19:30, Warner Losh wrote: > > > > There has been some talk of moving the mount point to /efi, but I think > that went nowhere... > > I thought about /efi based on arguments from the Linux world, more > info at > https://wiki.archlinux.org/index.php/EFI_system_partition#Typical_mount_points > . > I did open https://reviews.freebsd.org/D28814 to move the existing > uses to /efi. That said, I'm much more interested in us picking > something and using it in the installer/other tooling than whether > it's /boot/efi or /efi. > Me too. I am actually open to either. If I had a do over, I'd pick /efi honestly. But the directory presence or absence shouldn't be used to know if we have an ESP to deal with or not. Warner > From owner-dev-commits-src-main@freebsd.org Wed Mar 3 03:34:26 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 85AD255B592; Wed, 3 Mar 2021 03:34:26 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dr03k2sMDz4YF7; Wed, 3 Mar 2021 03:34:26 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from auth2-smtp.messagingengine.com (auth2-smtp.messagingengine.com [66.111.4.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bdragon/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4BF4BC94B; Wed, 3 Mar 2021 03:34:26 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailauth.nyi.internal (Postfix) with ESMTP id 010D027C005C; Tue, 2 Mar 2021 22:34:25 -0500 (EST) Received: from imap38 ([10.202.2.88]) by compute3.internal (MEProxy); Tue, 02 Mar 2021 22:34:26 -0500 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledruddtuddgheehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdluddtmdenucfjughrpefofgggkfgjfhffhffvufgtsehttdertder reejnecuhfhrohhmpedfuehrrghnughonhcuuegvrhhgrhgvnhdfuceosggurhgrghhonh eshfhrvggvuefuffdrohhrgheqnecuggftrfgrthhtvghrnhepjefhfedtuddtleegkeeg tdegjeekffdvjedttdehgffgveeugffgfeelvdeghffgnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepsggurhgrghhonhdomhgvshhmthhprghu thhhphgvrhhsohhnrghlihhthidquddtgedvfeehkeeigedqudekuddtkeehuddqsggurh grghhonheppefhrhgvvgeuufffrdhorhhgsehimhgrphdrtggt X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 72094CA005D; Tue, 2 Mar 2021 22:34:25 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-206-g078a48fda5-fm-20210226.001-g078a48fd Mime-Version: 1.0 Message-Id: <63ccc815-d23b-44f5-8bf8-d301ce0665f7@www.fastmail.com> In-Reply-To: References: <202103021856.122IuYgV048086@gndrsh.dnsmgr.net> <3d947e4c-a529-0b27-a8d7-415600783e53@freebsd.org> Date: Tue, 02 Mar 2021 21:34:04 -0600 From: "Brandon Bergren" To: "Ed Maste" , "Warner Losh" Cc: "Nathan Whitehorn" , "Rodney W. Grimes" , src-committers , "" , dev-commits-src-main@freebsd.org Subject: =?UTF-8?Q?Re:_git:_2c26d77d989a_-_main_-_Remove_/boot/efi_from_mtree, _mi?= =?UTF-8?Q?ssed_in_0b7472b3d8d2.?= Content-Type: text/plain X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 03:34:26 -0000 OK, how about this as an idea then: Parse mount output to see if anything is mounted to /boot/efi directly? if mount -p | cut -f 2 | grep '^/boot/efi$'; then .... fi -- Brandon Bergren bdragon@FreeBSD.org From owner-dev-commits-src-main@freebsd.org Wed Mar 3 03:38:17 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EBE2955B535; Wed, 3 Mar 2021 03:38:17 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dr0895Xg6z4YWm; Wed, 3 Mar 2021 03:38:17 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from auth2-smtp.messagingengine.com (auth2-smtp.messagingengine.com [66.111.4.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bdragon/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id A97F3C94C; Wed, 3 Mar 2021 03:38:17 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailauth.nyi.internal (Postfix) with ESMTP id 9E74727C005B; Tue, 2 Mar 2021 22:38:17 -0500 (EST) Received: from imap38 ([10.202.2.88]) by compute3.internal (MEProxy); Tue, 02 Mar 2021 22:38:17 -0500 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledruddtuddgheehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdluddtmdenucfjughrpefofgggkfgjfhffhffvufgtsehttdertder reejnecuhfhrohhmpedfuehrrghnughonhcuuegvrhhgrhgvnhdfuceosggurhgrghhonh eshfhrvggvuefuffdrohhrgheqnecuggftrfgrthhtvghrnhepjefhfedtuddtleegkeeg tdegjeekffdvjedttdehgffgveeugffgfeelvdeghffgnecuvehluhhsthgvrhfuihiivg epudenucfrrghrrghmpehmrghilhhfrhhomhepsggurhgrghhonhdomhgvshhmthhprghu thhhphgvrhhsohhnrghlihhthidquddtgedvfeehkeeigedqudekuddtkeehuddqsggurh grghhonheppefhrhgvvgeuufffrdhorhhgsehimhgrphdrtggt X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 16633CA005D; Tue, 2 Mar 2021 22:38:17 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-206-g078a48fda5-fm-20210226.001-g078a48fd Mime-Version: 1.0 Message-Id: In-Reply-To: <63ccc815-d23b-44f5-8bf8-d301ce0665f7@www.fastmail.com> References: <202103021856.122IuYgV048086@gndrsh.dnsmgr.net> <3d947e4c-a529-0b27-a8d7-415600783e53@freebsd.org> <63ccc815-d23b-44f5-8bf8-d301ce0665f7@www.fastmail.com> Date: Tue, 02 Mar 2021 21:37:43 -0600 From: "Brandon Bergren" To: "Brandon Bergren" , "Ed Maste" , "Warner Losh" Cc: "Nathan Whitehorn" , "Rodney W. Grimes" , src-committers , "" , dev-commits-src-main@freebsd.org Subject: =?UTF-8?Q?Re:_git:_2c26d77d989a_-_main_-_Remove_/boot/efi_from_mtree, _mi?= =?UTF-8?Q?ssed_in_0b7472b3d8d2.?= Content-Type: text/plain X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 03:38:18 -0000 grep -q rather. In any case, instead of checking for directory existence, checking whether something is actually mounted there. On Tue, Mar 2, 2021, at 9:34 PM, Brandon Bergren wrote: > OK, how about this as an idea then: > > Parse mount output to see if anything is mounted to /boot/efi directly? > > if mount -p | cut -f 2 | grep '^/boot/efi$'; then > .... > fi > > -- > Brandon Bergren > bdragon@FreeBSD.org > -- Brandon Bergren bdragon@FreeBSD.org From owner-dev-commits-src-main@freebsd.org Wed Mar 3 03:56:51 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EE1BF55BB75; Wed, 3 Mar 2021 03:56:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dr0Yb6StWz4ZlD; Wed, 3 Mar 2021 03:56:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D080A23032; Wed, 3 Mar 2021 03:56:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1233upaa048362; Wed, 3 Mar 2021 03:56:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1233upTF048361; Wed, 3 Mar 2021 03:56:51 GMT (envelope-from git) Date: Wed, 3 Mar 2021 03:56:51 GMT Message-Id: <202103030356.1233upTF048361@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 852f70b24043 - main - init: use explicit_bzero() for clearing passwords MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 852f70b24043885f0e438e8fecedd482a9a96d5e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 03:56:52 -0000 The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=852f70b24043885f0e438e8fecedd482a9a96d5e commit 852f70b24043885f0e438e8fecedd482a9a96d5e Author: Kyle Evans AuthorDate: 2021-03-03 03:38:37 +0000 Commit: Kyle Evans CommitDate: 2021-03-03 03:55:41 +0000 init: use explicit_bzero() for clearing passwords This is a nop in practice, because it cannot be proven that this particular bzero() is not significant. Make it explicit anyways, rather than relying on an implementation detail of how the password is collected. Discussed with: Andrew Gierth --- sbin/init/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/init/init.c b/sbin/init/init.c index c5f3c121f7f9..943db9f26bd3 100644 --- a/sbin/init/init.c +++ b/sbin/init/init.c @@ -908,7 +908,7 @@ single_user(void) if (clear == NULL || *clear == '\0') _exit(0); password = crypt(clear, pp->pw_passwd); - bzero(clear, _PASSWORD_LEN); + explicit_bzero(clear, _PASSWORD_LEN); if (password != NULL && strcmp(password, pp->pw_passwd) == 0) break; From owner-dev-commits-src-main@freebsd.org Wed Mar 3 05:14:37 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D477E55D67F for ; Wed, 3 Mar 2021 05:14:37 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic308-10.consmr.mail.ne1.yahoo.com (sonic308-10.consmr.mail.ne1.yahoo.com [66.163.187.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dr2HJ5ZPHz4f4w for ; Wed, 3 Mar 2021 05:14:36 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1614748475; bh=lS06ZtbexvQdIAxWuCHO8AtQU41wxh/aATwpIkizpk6=; h=X-Sonic-MF:From:Subject:Date:To:From:Subject; b=FudFq6YgotF7WP2M+P44m+RQZsozgAWVCDYTLudTtY1S2KLyAGaRMB0Mov5ciCqiEikxx6Pxe87U/4ytqDIdpDm59p2R3sZ++L8csWlAIMv7YifY6TUDkWDnD9AXMy5s/L+ayjuZyfOkINLCZ2z16339Y4XOdo9doQt90A4ZzAv/ACG6olujXiS9w7QjO0fbJUJIQQvJvgkitrp+Sla1O5Y5fGtee+je/CoDoN5m7ir4g6C5UxOQhZPdIsNV944MIYeY0zTIHrTJHlZCe2/Hgzn+maCeDGnoHtZ/KuCmuOJIItZ02eYQ1SOz2dR6jzu+sTG6wOBvNDTMh6iwK/YMNQ== X-YMail-OSG: PS0.Kr4VM1nuSk.jQFqoXBbDQoXRQhOQof_LoCBwxMpuANHoXFD1xwHYzWHW3VS dmJnq1ys8XS6A6qSaifFlmAa0iCDBSQ6tJBOC5GFRFbnaVsuF51qCiIe3Xe2Oj1Lki5nGcaNtfoy EZO_jtDFsAwxQOsf_jvNlMj706v26DUD.E_UQrva.uBh9yhCg_PfZIbiiU60jhKxrUYgW6zXxCzg hrZ2YSTwGgTkMif8h.a1KXFA4N6WZ0TDmG5m.HYiLfHGkwTjo7B_m2zBiGtFoV4U9eLhbH_0cuBt KH0DcozW8ERbQk046pZPRR9B1njc5AUEAtY2EBsXdOD3cTocR1nxfCexTrMxH7Jy2rLVQEDdKq7Y XR9naGZlxXfOtvYm7zmafMnRxl6k2gOZHdMoWhcEMhGdVrYujMX9S6u4Hkyikl5DgEXehULop.Wu g0b7lrmjWv5oHkK10MRZcSgdIo1r50LycObNcDST4v2PDa7Q.OqEIxo_tEXZTeahY5KE0kcoTcVS EnzPxqoA1aUlIQ_994oyQSxed9psBFzvCII47n2Re8526gGXOd2MJOcdqTwt81ehAV0Qldfmvr4m xKLVcl8fz8_IkpQgurYMscx6W8K2lLQWYtrgJT9vqHG0e1WhxkFCFfHK4j843_asNS2JqdnzFeCK tjnTqfkMPbOf1FYexjbdWzqrgZPSa2aaM8lNsfijY315ot7YWNfsovbOoXmq52G.Th6awUXhMoMl Cn5KtH_Mpim43xBPHLNL1.vNvs2D_bqsNJzXxncZJLU4cXVG7KaIxCyyzI5E1Dktw2ekGO_cVOMb v9.7ddol344qG7P4xOC_UDuPTtsqpFMS3Eo7gniify98BmYSiWskP0LnXZpANroU7kWSiXOPXN18 8LnIrf1SxZEzguqK3AuEtORnWhMFUOGw4d.axZ2dzH4.CfF.N2yotc717OYqNsv86CMYJHKUCTpX gOr5N3BgyTjqJax1xpbu0eZOHoFRXTDQtWxq0UGQgmJsKyqAPecCDLmDx.aEvkwLAO3ykPEvMdOH FC6rKGShoiTByGG_FPOXj8CtTFr0NhvxzYTPflrkkxxj6xIdkWGYpOOUy52k39rBY.kd6bxwcOTz U3_sCl1.aHbq69v3S3jqmKKC65YkJLP.02tsZQGcaTls.EMjPR1yYYp4EVX6fS4P0sK18lZQdiAX 8HCjhsyToqwUrwOZDen26DJKySdhZP1ETLWlO.hDSPSO2IjeyBRqCq7W8nyBDDbxAvUFZA634AD_ ofycKUfOKIT.EzNsU6Q8DaLcpsbQrtZoUY2Ky0E0RaxqAsA9kIjtmCOXSLb8nanzNJCE16YmB0_R SVUmx8cDincE5HcOJfoDzonz2dC3Gz3LEHzkjGoqrvrIZdo959a5xVSlrQJptBRb1M1pgEVVENYH PgETGLnzJh7B9Yoa7iUWCekW_BvHbT4DiTZhLnP9sSbQ_yt2u3_SgR3hiNq_HLzBWWAE3m_H29jr aPMCA_j6fxitMNAwtJYpqIV.IOZfSIgzCRWhJRrZESk5_Qt7nhPNAF.t9W5FbmBfEndko0qi8x.m sTGQmhV82imc24sgtU9hESXE4xnR_wRJBwz_0Nn9HIL18V7HXHlzGfkMMqrGkR4ys5aZwjN6l2f7 eK8rEaSLOFlelFhuxcSmPIXA9x4CsY2PvyLL_bcSb7AOdMTvne_tKD9aIYWvK_skgFgx9vpi047d FXh0uMq.9P5xOnNGugjFtmu4vLHBsH5RDsRKKKG_3HI1Ggy_dclGbeaBf1peLaIu1cMNK0Y0O0Zg SubutFA6bMBhi3G743YIR3hN_j3a54LbS3PRJC.chIdmbN5C7tIIj9ZhS_P6gAHsXRvm3atIivSu YiNQs4e2z5KJRkBQrceFuZnWgQwPw37h3jn0NJSdwJdCZM..4UTh9Ssve66Tp8aQ0bq4h.v8EqtG wRIJT4vSzyIRxKwKfDJ9VDH6vLNIEpEt9LJNmipohOtAw0ycLRqDKNI09elqdrFQYtOlkeWQhgom vwSDJMr6m94BR.KhjfKvYQ8FmJ2LzrrZwfyf.Z6CBhmEPTEvzJAnXjAoDbUqSL3ubWmIijQosCpo abGNmch6B9bmmQaKIBbYyLOvgVsVf2sLRlbpbjdM5eBqPmgTGSdBqjCLBH2iB_Q1gSmuxPIpXFgO 7bEzGrq6Vp3usawfmWQYzcfNKwec7hOt2ByhfeSwFUZmH2KNoHmhE_GGxQVrz4ILrl.EqhsInn1e .mdER1XS6u0FEiQuahCJGzVSn1bFG4y7qEwlfObvqUAUzZF0tH0XWjKzBAGU6sqebeNmM2SkE8kd VOVbS3i5N5A4t9FXqzBwEuFWjrXft18.RG54Q5L0aDlNqm8._Yu5KQPbdF25t9zYP.Ds7LpDPdQM 2OCrlDxAhnrCuDD0eWkUQUWm0tAe1To4.3g5ZVWAGQVHX5LlpDVykNJMiTQmdngVZpxLoe7_j6gU WwW_GfXVbgBwhY2UJWFNErUutTIZCuXqShtZCci1.UIQhXQ.Ylc4eeHx.KJ0koKpWwQVVmkQ- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic308.consmr.mail.ne1.yahoo.com with HTTP; Wed, 3 Mar 2021 05:14:35 +0000 Received: by smtp414.mail.bf1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID e813987b5ca224843660c53b9baa6a01; Wed, 03 Mar 2021 05:14:31 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) Subject: Re: Re: git: 2c26d77d989a - main - Remove /boot/efi from mtree, missed in 0b7472b3d8d2. Message-Id: <55E1AE46-25F4-43FD-8029-6CBD193638D8@yahoo.com> Date: Tue, 2 Mar 2021 21:14:29 -0800 To: dev-commits-src-main@freebsd.org X-Mailer: Apple Mail (2.3654.60.0.2.21) References: <55E1AE46-25F4-43FD-8029-6CBD193638D8.ref@yahoo.com> X-Rspamd-Queue-Id: 4Dr2HJ5ZPHz4f4w X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.50 / 15.00]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; TO_DN_NONE(0.00)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; DKIM_TRACE(0.00)[yahoo.com:+]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36646, ipnet:66.163.184.0/21, country:US]; RBL_DBL_DONT_QUERY_IPS(0.00)[66.163.187.33:from]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[66.163.187.33:from:127.0.2.255]; RCVD_IN_DNSWL_NONE(0.00)[66.163.187.33:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[66.163.187.33:from]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[dev-commits-src-main] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 05:14:37 -0000 bdragon at FreeBSD.org wrote on Wed Mar 3 03:38:18 UTC 2021 : > grep -q rather. >=20 > In any case, instead of checking for directory existence, checking = whether something is actually mounted there. >=20 > On Tue, Mar 2, 2021, at 9:34 PM, Brandon Bergren wrote: > > OK, how about this as an idea then: > >=20 > > Parse mount output to see if anything is mounted to /boot/efi = directly? > >=20 > > if mount -p | cut -f 2 | grep '^/boot/efi$'; then > > .... > > fi > >=20 > > --=20 > > Brandon Bergren > > bdragon at FreeBSD.org > > I've no problem dealing with whatever ends up chosen. But I may be providing examples of what you may run into overall with folks that might not as easily adjust to rules that reserve some usage patterns. So I report the following for reference only. I've got aarch64 systems that do not automatically mount /boot/efi/ in FreeBSD but use EFI to boot FreeBSD. I only mount to /boot/efi/ when I want to update EFI material (or inspect it). Usually this is for separate removable media as far as where EFI material is vs. FreeBSD. The EFI media might be removed after booting in order to allow use of other media of the same type. I also have example aarch64 systems for which I have both /usb_efi and /microsd_efi because of direct booting USB vs. using a microsd card that in turn root-mounts the same USB drive. (Sometimes other infrastructure vintages/types determine what combinations can work.) In some contexts I used /boot/efi instead of /microsd_efi but that was commonly because of a normally less-removable eMMC that was in use instead of something live-removable, like a microsd card. (A convention I did not start with but progressed to with newer setups.) Whenever EFI might be on media not needed once FreeBSD has booted far enough, depending on EFI materials being mounted vs. not seems odd to me. =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-dev-commits-src-main@freebsd.org Wed Mar 3 06:57:29 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B8DBB55FF18; Wed, 3 Mar 2021 06:57:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dr4Z1478yz4kvx; Wed, 3 Mar 2021 06:57:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7F3FD25060; Wed, 3 Mar 2021 06:57:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1236vTAi086591; Wed, 3 Mar 2021 06:57:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1236vTTw086590; Wed, 3 Mar 2021 06:57:29 GMT (envelope-from git) Date: Wed, 3 Mar 2021 06:57:29 GMT Message-Id: <202103030657.1236vTTw086590@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Xin LI Subject: git: 5842073a9b74 - main - arcmsr(4): Fixed no action of hot plugging device on type_F adapter. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: delphij X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5842073a9b7471831e0da48d29dd984d575f4e9e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 06:57:29 -0000 The branch main has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=5842073a9b7471831e0da48d29dd984d575f4e9e commit 5842073a9b7471831e0da48d29dd984d575f4e9e Author: Xin LI AuthorDate: 2021-03-03 06:57:20 +0000 Commit: Xin LI CommitDate: 2021-03-03 06:57:20 +0000 arcmsr(4): Fixed no action of hot plugging device on type_F adapter. Many thanks to Areca for continuing to support FreeBSD. Submitted by: 黃清隆 MFC after: 3 days --- sys/dev/arcmsr/arcmsr.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/dev/arcmsr/arcmsr.c b/sys/dev/arcmsr/arcmsr.c index cba2a956ff37..f2217deb1ce0 100644 --- a/sys/dev/arcmsr/arcmsr.c +++ b/sys/dev/arcmsr/arcmsr.c @@ -82,6 +82,7 @@ ** 1.40.00.00 07/11/2017 Ching Huang Added support ARC1884 ** 1.40.00.01 10/30/2017 Ching Huang Fixed release memory resource ** 1.50.00.00 09/30/2020 Ching Huang Added support ARC-1886, NVMe/SAS/SATA controller +** 1.50.00.01 02/26/2021 Ching Huang Fixed no action of hot plugging device on type_F adapter ****************************************************************************************** */ @@ -139,7 +140,7 @@ __FBSDID("$FreeBSD$"); #define arcmsr_callout_init(a) callout_init(a, /*mpsafe*/1); -#define ARCMSR_DRIVER_VERSION "arcmsr version 1.50.00.00 2020-09-30" +#define ARCMSR_DRIVER_VERSION "arcmsr version 1.50.00.01 2021-02-26" #include /* ************************************************************************** @@ -1902,7 +1903,10 @@ static void arcmsr_hbe_message_isr(struct AdapterControlBlock *acb) { u_int32_t outbound_message; CHIP_REG_WRITE32(HBE_MessageUnit, 0, host_int_status, 0); - outbound_message = CHIP_REG_READ32(HBE_MessageUnit, 0, msgcode_rwbuffer[0]); + if (acb->adapter_type == ACB_ADAPTER_TYPE_E) + outbound_message = CHIP_REG_READ32(HBE_MessageUnit, 0, msgcode_rwbuffer[0]); + else + outbound_message = acb->msgcode_rwbuffer[0]; if (outbound_message == ARCMSR_SIGNATURE_GET_CONFIG) arcmsr_dr_handle( acb ); } From owner-dev-commits-src-main@freebsd.org Wed Mar 3 08:01:57 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 899EA56240C; Wed, 3 Mar 2021 08:01:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dr60P3Xbsz4pQ1; Wed, 3 Mar 2021 08:01:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6C6DE26287; Wed, 3 Mar 2021 08:01:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 12381vkf079137; Wed, 3 Mar 2021 08:01:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 12381vV9079134; Wed, 3 Mar 2021 08:01:57 GMT (envelope-from git) Date: Wed, 3 Mar 2021 08:01:57 GMT Message-Id: <202103030801.12381vV9079134@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 3b005d51bd0f - main - backlight: Fix incr/decr with percent value of 0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3b005d51bd0fe4d8d19fb2df4d470b6e8baebf16 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 08:01:57 -0000 The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=3b005d51bd0fe4d8d19fb2df4d470b6e8baebf16 commit 3b005d51bd0fe4d8d19fb2df4d470b6e8baebf16 Author: David Schlachter AuthorDate: 2021-03-03 07:57:35 +0000 Commit: Emmanuel Vadot CommitDate: 2021-03-03 07:57:35 +0000 backlight: Fix incr/decr with percent value of 0 This now does nothing instead of incr/decr by 10% MFC After: 3 days PR: 253736 --- usr.bin/backlight/backlight.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/usr.bin/backlight/backlight.c b/usr.bin/backlight/backlight.c index 1dae0cfe5c62..9cf7a0912e95 100644 --- a/usr.bin/backlight/backlight.c +++ b/usr.bin/backlight/backlight.c @@ -98,7 +98,7 @@ main(int argc, char *argv[]) BACKLIGHTGETSTATUS, BACKLIGHTUPDATESTATUS, BACKLIGHTGETINFO}; - long percent = 0; + long percent = -1; const char *percent_error; uint32_t i; bool setname; @@ -188,15 +188,20 @@ main(int argc, char *argv[]) } break; case BACKLIGHT_SET_BRIGHTNESS: + if (percent == -1) + usage(); props.brightness = percent; if (ioctl(fd, BACKLIGHTUPDATESTATUS, &props) == -1) errx(1, "Cannot update the backlight device"); break; case BACKLIGHT_INCR: case BACKLIGHT_DECR: + if (percent == 0) + /* Avoid any ioctl if we don't have anything to do */ + break; if (ioctl(fd, BACKLIGHTGETSTATUS, &props) == -1) errx(1, "Cannot query the backlight device"); - percent = percent == 0 ? 10 : percent; + percent = percent == -1 ? 10 : percent; percent = action == BACKLIGHT_INCR ? percent : -percent; props.brightness += percent; if ((int)props.brightness < 0) From owner-dev-commits-src-main@freebsd.org Wed Mar 3 08:01:58 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AFA40562148; Wed, 3 Mar 2021 08:01:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dr60Q4V94z4pdl; Wed, 3 Mar 2021 08:01:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8DBBD25F68; Wed, 3 Mar 2021 08:01:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 12381wTa079158; Wed, 3 Mar 2021 08:01:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 12381wKf079157; Wed, 3 Mar 2021 08:01:58 GMT (envelope-from git) Date: Wed, 3 Mar 2021 08:01:58 GMT Message-Id: <202103030801.12381wKf079157@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 1df30489a8f7 - main - backlight(8): Add note that with option it print the current brightness. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1df30489a8f7083c98010c94d9ce522f9e8213dc Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 08:01:58 -0000 The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=1df30489a8f7083c98010c94d9ce522f9e8213dc commit 1df30489a8f7083c98010c94d9ce522f9e8213dc Author: Emmanuel Vadot AuthorDate: 2021-03-03 08:00:42 +0000 Commit: Emmanuel Vadot CommitDate: 2021-03-03 08:00:42 +0000 backlight(8): Add note that with option it print the current brightness. MFC after: 3 days PR: 253737 --- usr.bin/backlight/backlight.8 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/usr.bin/backlight/backlight.8 b/usr.bin/backlight/backlight.8 index 8c3b634e152b..ce2d0e4b0325 100644 --- a/usr.bin/backlight/backlight.8 +++ b/usr.bin/backlight/backlight.8 @@ -22,7 +22,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 27, 2020 +.Dd March 03, 2021 .Dt BACKLIGHT 8 .Os .Sh NAME @@ -47,6 +47,9 @@ The .Nm utility can be used to configure brightness levels for registered backlights. .Pp +If call without any option it will print the current brightness level of the first +registered backlight. +.Pp The options are as follows: .Bl -tag -width "-f device" .It Fl f Ar device From owner-dev-commits-src-main@freebsd.org Wed Mar 3 11:44:57 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 69AEF567F0D; Wed, 3 Mar 2021 11:44:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DrBxj2XH7z3Mgg; Wed, 3 Mar 2021 11:44:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4A28DE70; Wed, 3 Mar 2021 11:44:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 123BivrL071640; Wed, 3 Mar 2021 11:44:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 123BivCW071639; Wed, 3 Mar 2021 11:44:57 GMT (envelope-from git) Date: Wed, 3 Mar 2021 11:44:57 GMT Message-Id: <202103031144.123BivCW071639@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: 1fcbddec14dd - main - Fix GCC build of ptrace_test after 96a9e50e63bfc MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1fcbddec14dd693acf6a4be579f8d9e10b6a06a4 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 11:44:57 -0000 The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=1fcbddec14dd693acf6a4be579f8d9e10b6a06a4 commit 1fcbddec14dd693acf6a4be579f8d9e10b6a06a4 Author: Alex Richardson AuthorDate: 2021-03-03 11:21:04 +0000 Commit: Alex Richardson CommitDate: 2021-03-03 11:22:43 +0000 Fix GCC build of ptrace_test after 96a9e50e63bfc It seems like GCC's -Wsign-compare is stricter and also warns for constants. Appease GCC by adding the required casts. Fixes: 96a9e50e63bfc ("ptrace_test: Add more debug output on test failures") Reported by: Jenkins CI --- tests/sys/kern/ptrace_test.c | 89 +++++++++++++++++++++++++------------------- 1 file changed, 50 insertions(+), 39 deletions(-) diff --git a/tests/sys/kern/ptrace_test.c b/tests/sys/kern/ptrace_test.c index 944be3d31e04..16c047db574a 100644 --- a/tests/sys/kern/ptrace_test.c +++ b/tests/sys/kern/ptrace_test.c @@ -292,7 +292,8 @@ ATF_TC_BODY(ptrace__parent_sees_exit_after_child_debugger, tc) close(cpipe[0]); /* Wait for parent to be ready. */ - CHILD_REQUIRE_EQ(read(cpipe[1], &c, sizeof(c)), sizeof(c)); + CHILD_REQUIRE_EQ(read(cpipe[1], &c, sizeof(c)), + (ssize_t)sizeof(c)); _exit(1); } @@ -315,7 +316,8 @@ ATF_TC_BODY(ptrace__parent_sees_exit_after_child_debugger, tc) CHILD_REQUIRE(ptrace(PT_CONTINUE, child, (caddr_t)1, 0) != -1); /* Signal parent that debugger is attached. */ - CHILD_REQUIRE_EQ(write(dpipe[1], &c, sizeof(c)), sizeof(c)); + CHILD_REQUIRE_EQ(write(dpipe[1], &c, sizeof(c)), + (ssize_t)sizeof(c)); /* Wait for parent's failed wait. */ CHILD_REQUIRE_EQ(read(dpipe[1], &c, sizeof(c)), 0); @@ -332,10 +334,10 @@ ATF_TC_BODY(ptrace__parent_sees_exit_after_child_debugger, tc) /* Parent process. */ /* Wait for the debugger to attach to the child. */ - REQUIRE_EQ(read(dpipe[0], &c, sizeof(c)), sizeof(c)); + REQUIRE_EQ(read(dpipe[0], &c, sizeof(c)), (ssize_t)sizeof(c)); /* Release the child. */ - REQUIRE_EQ(write(cpipe[0], &c, sizeof(c)), sizeof(c)); + REQUIRE_EQ(write(cpipe[0], &c, sizeof(c)), (ssize_t)sizeof(c)); REQUIRE_EQ(read(cpipe[0], &c, sizeof(c)), 0); close(cpipe[0]); @@ -386,7 +388,8 @@ ATF_TC_BODY(ptrace__parent_sees_exit_after_unrelated_debugger, tc) close(cpipe[0]); /* Wait for parent to be ready. */ - CHILD_REQUIRE_EQ(read(cpipe[1], &c, sizeof(c)), sizeof(c)); + CHILD_REQUIRE_EQ(read(cpipe[1], &c, sizeof(c)), + (ssize_t)sizeof(c)); _exit(1); } @@ -419,10 +422,12 @@ ATF_TC_BODY(ptrace__parent_sees_exit_after_unrelated_debugger, tc) CHILD_REQUIRE(ptrace(PT_CONTINUE, child, (caddr_t)1, 0) != -1); /* Signal parent that debugger is attached. */ - CHILD_REQUIRE_EQ(write(dpipe[1], &c, sizeof(c)), sizeof(c)); + CHILD_REQUIRE_EQ(write(dpipe[1], &c, sizeof(c)), + (ssize_t)sizeof(c)); /* Wait for parent's failed wait. */ - CHILD_REQUIRE_EQ(read(dpipe[1], &c, sizeof(c)), sizeof(c)); + CHILD_REQUIRE_EQ(read(dpipe[1], &c, sizeof(c)), + (ssize_t)sizeof(c)); wpid = waitpid(child, &status, 0); CHILD_REQUIRE_EQ(wpid, child); @@ -446,10 +451,10 @@ ATF_TC_BODY(ptrace__parent_sees_exit_after_unrelated_debugger, tc) REQUIRE_EQ(wpid, 0); /* Wait for the debugger to attach to the child. */ - REQUIRE_EQ(read(dpipe[0], &c, sizeof(c)), sizeof(c)); + REQUIRE_EQ(read(dpipe[0], &c, sizeof(c)), (ssize_t)sizeof(c)); /* Release the child. */ - REQUIRE_EQ(write(cpipe[0], &c, sizeof(c)), sizeof(c)); + REQUIRE_EQ(write(cpipe[0], &c, sizeof(c)), (ssize_t)sizeof(c)); REQUIRE_EQ(read(cpipe[0], &c, sizeof(c)), 0); close(cpipe[0]); @@ -464,7 +469,7 @@ ATF_TC_BODY(ptrace__parent_sees_exit_after_unrelated_debugger, tc) REQUIRE_EQ(wpid, 0); /* Signal the debugger to wait for the child. */ - REQUIRE_EQ(write(dpipe[0], &c, sizeof(c)), sizeof(c)); + REQUIRE_EQ(write(dpipe[0], &c, sizeof(c)), (ssize_t)sizeof(c)); /* Wait for the debugger. */ REQUIRE_EQ(read(dpipe[0], &c, sizeof(c)), 0); @@ -504,25 +509,28 @@ ATF_TC_BODY(ptrace__parent_exits_before_child, tc) _exit(status); } - CHILD_REQUIRE(write(cpipe1[1], &gchild, sizeof(gchild)) == - sizeof(gchild)); - CHILD_REQUIRE(read(cpipe2[0], &status, sizeof(status)) == - sizeof(status)); + CHILD_REQUIRE_EQ(write(cpipe1[1], &gchild, sizeof(gchild)), + (ssize_t)sizeof(gchild)); + CHILD_REQUIRE_EQ(read(cpipe2[0], &status, sizeof(status)), + (ssize_t)sizeof(status)); _exit(status); } - REQUIRE_EQ(read(cpipe1[0], &gchild, sizeof(gchild)), sizeof(gchild)); + REQUIRE_EQ(read(cpipe1[0], &gchild, sizeof(gchild)), + (ssize_t)sizeof(gchild)); REQUIRE_EQ(ptrace(PT_ATTACH, gchild, NULL, 0), 0); status = 0; - REQUIRE_EQ(write(cpipe2[1], &status, sizeof(status)), sizeof(status)); + REQUIRE_EQ(write(cpipe2[1], &status, sizeof(status)), + (ssize_t)sizeof(status)); REQUIRE_EQ(waitpid(child, &status, 0), child); ATF_REQUIRE(WIFEXITED(status)); REQUIRE_EQ(WEXITSTATUS(status), 0); status = 0; - REQUIRE_EQ(write(gcpipe[1], &status, sizeof(status)), sizeof(status)); + REQUIRE_EQ(write(gcpipe[1], &status, sizeof(status)), + (ssize_t)sizeof(status)); REQUIRE_EQ(waitpid(gchild, &status, 0), gchild); ATF_REQUIRE(WIFSTOPPED(status)); REQUIRE_EQ(ptrace(PT_DETACH, gchild, (caddr_t)1, 0), 0); @@ -807,7 +815,8 @@ attach_fork_parent(int cpipe[2]) /* Send the pid of the disassociated child to the debugger. */ fpid = getpid(); - CHILD_REQUIRE_EQ(write(cpipe[1], &fpid, sizeof(fpid)), sizeof(fpid)); + CHILD_REQUIRE_EQ(write(cpipe[1], &fpid, sizeof(fpid)), + (ssize_t)sizeof(fpid)); /* Wait for the debugger to attach. */ CHILD_REQUIRE_EQ(read(cpipe[1], &fpid, sizeof(fpid)), 0); @@ -843,7 +852,7 @@ ATF_TC_BODY(ptrace__follow_fork_both_attached_unrelated_debugger, tc) /* Read the pid of the fork parent. */ REQUIRE_EQ(read(cpipe[0], &children[0], sizeof(children[0])), - sizeof(children[0])); + (ssize_t)sizeof(children[0])); /* Attach to the fork parent. */ attach_child(children[0]); @@ -911,7 +920,7 @@ ATF_TC_BODY(ptrace__follow_fork_child_detached_unrelated_debugger, tc) /* Read the pid of the fork parent. */ REQUIRE_EQ(read(cpipe[0], &children[0], sizeof(children[0])), - sizeof(children[0])); + (ssize_t)sizeof(children[0])); /* Attach to the fork parent. */ attach_child(children[0]); @@ -974,7 +983,7 @@ ATF_TC_BODY(ptrace__follow_fork_parent_detached_unrelated_debugger, tc) /* Read the pid of the fork parent. */ REQUIRE_EQ(read(cpipe[0], &children[0], sizeof(children[0])), - sizeof(children[0])); + (ssize_t)sizeof(children[0])); /* Attach to the fork parent. */ attach_child(children[0]); @@ -1026,12 +1035,13 @@ ATF_TC_BODY(ptrace__getppid, tc) close(cpipe[0]); /* Wait for parent to be ready. */ - CHILD_REQUIRE_EQ(read(cpipe[1], &c, sizeof(c)), sizeof(c)); + CHILD_REQUIRE_EQ(read(cpipe[1], &c, sizeof(c)), + (ssize_t)sizeof(c)); /* Report the parent PID to the parent. */ ppid = getppid(); - CHILD_REQUIRE(write(cpipe[1], &ppid, sizeof(ppid)) == - sizeof(ppid)); + CHILD_REQUIRE_EQ(write(cpipe[1], &ppid, sizeof(ppid)), + (ssize_t)sizeof(ppid)); _exit(1); } @@ -1054,7 +1064,8 @@ ATF_TC_BODY(ptrace__getppid, tc) CHILD_REQUIRE(ptrace(PT_CONTINUE, child, (caddr_t)1, 0) != -1); /* Signal parent that debugger is attached. */ - CHILD_REQUIRE_EQ(write(dpipe[1], &c, sizeof(c)), sizeof(c)); + CHILD_REQUIRE_EQ(write(dpipe[1], &c, sizeof(c)), + (ssize_t)sizeof(c)); /* Wait for traced child to exit. */ wpid = waitpid(child, &status, 0); @@ -1069,13 +1080,13 @@ ATF_TC_BODY(ptrace__getppid, tc) /* Parent process. */ /* Wait for the debugger to attach to the child. */ - REQUIRE_EQ(read(dpipe[0], &c, sizeof(c)), sizeof(c)); + REQUIRE_EQ(read(dpipe[0], &c, sizeof(c)), (ssize_t)sizeof(c)); /* Release the child. */ - REQUIRE_EQ(write(cpipe[0], &c, sizeof(c)), sizeof(c)); + REQUIRE_EQ(write(cpipe[0], &c, sizeof(c)), (ssize_t)sizeof(c)); /* Read the parent PID from the child. */ - REQUIRE_EQ(read(cpipe[0], &ppid, sizeof(ppid)), sizeof(ppid)); + REQUIRE_EQ(read(cpipe[0], &ppid, sizeof(ppid)), (ssize_t)sizeof(ppid)); close(cpipe[0]); REQUIRE_EQ(ppid, getpid()); @@ -1130,7 +1141,7 @@ ATF_TC_BODY(ptrace__new_child_pl_syscall_code_fork, tc) ATF_REQUIRE((pl[0].pl_flags & PL_FLAG_SCX) != 0); ATF_REQUIRE((pl[1].pl_flags & PL_FLAG_SCX) != 0); - REQUIRE_EQ(pl[0].pl_syscall_code, SYS_fork); + REQUIRE_EQ(pl[0].pl_syscall_code, (unsigned)SYS_fork); REQUIRE_EQ(pl[0].pl_syscall_code, pl[1].pl_syscall_code); REQUIRE_EQ(pl[0].pl_syscall_narg, pl[1].pl_syscall_narg); @@ -1193,7 +1204,7 @@ ATF_TC_BODY(ptrace__new_child_pl_syscall_code_vfork, tc) ATF_REQUIRE((pl[0].pl_flags & PL_FLAG_SCX) != 0); ATF_REQUIRE((pl[1].pl_flags & PL_FLAG_SCX) != 0); - REQUIRE_EQ(pl[0].pl_syscall_code, SYS_vfork); + REQUIRE_EQ(pl[0].pl_syscall_code, (unsigned)SYS_vfork); REQUIRE_EQ(pl[0].pl_syscall_code, pl[1].pl_syscall_code); REQUIRE_EQ(pl[0].pl_syscall_narg, pl[1].pl_syscall_narg); @@ -2861,7 +2872,7 @@ ATF_TC_BODY(ptrace__PT_CONTINUE_with_signal_kqueue, tc) continue; CHILD_REQUIRE(nevents > 0); CHILD_REQUIRE_EQ(kev.filter, EVFILT_SIGNAL); - CHILD_REQUIRE_EQ(kev.ident, SIGUSR1); + CHILD_REQUIRE_EQ(kev.ident, (uintptr_t)SIGUSR1); break; } @@ -3974,7 +3985,7 @@ ATF_TC_BODY(ptrace__syscall_args, tc) ATF_REQUIRE(ptrace(PT_LWPINFO, wpid, (caddr_t)&pl, sizeof(pl)) != -1); ATF_REQUIRE(pl.pl_flags & PL_FLAG_SCE); - REQUIRE_EQ(pl.pl_syscall_code, SYS_getpid); + REQUIRE_EQ(pl.pl_syscall_code, (unsigned)SYS_getpid); REQUIRE_EQ(ptrace(PT_CONTINUE, fpid, (caddr_t)1, 0), 0); @@ -3988,7 +3999,7 @@ ATF_TC_BODY(ptrace__syscall_args, tc) ATF_REQUIRE(ptrace(PT_LWPINFO, wpid, (caddr_t)&pl, sizeof(pl)) != -1); ATF_REQUIRE(pl.pl_flags & PL_FLAG_SCX); - REQUIRE_EQ(pl.pl_syscall_code, SYS_getpid); + REQUIRE_EQ(pl.pl_syscall_code, (unsigned)SYS_getpid); ATF_REQUIRE(ptrace(PT_GET_SC_RET, wpid, (caddr_t)&psr, sizeof(psr)) != -1); @@ -4007,8 +4018,8 @@ ATF_TC_BODY(ptrace__syscall_args, tc) ATF_REQUIRE(ptrace(PT_LWPINFO, wpid, (caddr_t)&pl, sizeof(pl)) != -1); ATF_REQUIRE(pl.pl_flags & PL_FLAG_SCE); - REQUIRE_EQ(pl.pl_syscall_code, SYS_kill); - REQUIRE_EQ(pl.pl_syscall_narg, 2); + REQUIRE_EQ(pl.pl_syscall_code, (unsigned)SYS_kill); + REQUIRE_EQ(pl.pl_syscall_narg, 2u); ATF_REQUIRE(ptrace(PT_GET_SC_ARGS, wpid, (caddr_t)args, sizeof(args)) != -1); @@ -4027,7 +4038,7 @@ ATF_TC_BODY(ptrace__syscall_args, tc) ATF_REQUIRE(ptrace(PT_LWPINFO, wpid, (caddr_t)&pl, sizeof(pl)) != -1); ATF_REQUIRE(pl.pl_flags & PL_FLAG_SCX); - REQUIRE_EQ(pl.pl_syscall_code, SYS_kill); + REQUIRE_EQ(pl.pl_syscall_code, (unsigned)SYS_kill); ATF_REQUIRE(ptrace(PT_GET_SC_RET, wpid, (caddr_t)&psr, sizeof(psr)) != -1); @@ -4045,8 +4056,8 @@ ATF_TC_BODY(ptrace__syscall_args, tc) ATF_REQUIRE(ptrace(PT_LWPINFO, wpid, (caddr_t)&pl, sizeof(pl)) != -1); ATF_REQUIRE(pl.pl_flags & PL_FLAG_SCE); - REQUIRE_EQ(pl.pl_syscall_code, SYS_close); - REQUIRE_EQ(pl.pl_syscall_narg, 1); + REQUIRE_EQ(pl.pl_syscall_code, (unsigned)SYS_close); + REQUIRE_EQ(pl.pl_syscall_narg, 1u); ATF_REQUIRE(ptrace(PT_GET_SC_ARGS, wpid, (caddr_t)args, sizeof(args)) != -1); @@ -4064,7 +4075,7 @@ ATF_TC_BODY(ptrace__syscall_args, tc) ATF_REQUIRE(ptrace(PT_LWPINFO, wpid, (caddr_t)&pl, sizeof(pl)) != -1); ATF_REQUIRE(pl.pl_flags & PL_FLAG_SCX); - REQUIRE_EQ(pl.pl_syscall_code, SYS_close); + REQUIRE_EQ(pl.pl_syscall_code, (unsigned)SYS_close); ATF_REQUIRE(ptrace(PT_GET_SC_RET, wpid, (caddr_t)&psr, sizeof(psr)) != -1); From owner-dev-commits-src-main@freebsd.org Wed Mar 3 12:42:33 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EC46B5695D5; Wed, 3 Mar 2021 12:42:33 +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 4DrDD94yZ3z3hPm; Wed, 3 Mar 2021 12:42:33 +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 123CgUMT051315; Wed, 3 Mar 2021 04:42:30 -0800 (PST) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 123CgUmk051314; Wed, 3 Mar 2021 04:42:30 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202103031242.123CgUmk051314@gndrsh.dnsmgr.net> Subject: Re: git: 2c26d77d989a - main - Remove /boot/efi from mtree, missed in 0b7472b3d8d2. In-Reply-To: To: Ed Maste Date: Wed, 3 Mar 2021 04:42:30 -0800 (PST) CC: Warner Losh , Nathan Whitehorn , "Rodney W. Grimes" , Brandon Bergren , src-committers , "" , dev-commits-src-main@freebsd.org 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: 4DrDD94yZ3z3hPm X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 12:42:34 -0000 > On Tue, 2 Mar 2021 at 19:30, Warner Losh wrote: > > > > There has been some talk of moving the mount point to /efi, but I think that went nowhere... > > I thought about /efi based on arguments from the Linux world, more > info at https://wiki.archlinux.org/index.php/EFI_system_partition#Typical_mount_points. > I did open https://reviews.freebsd.org/D28814 to move the existing > uses to /efi. That said, I'm much more interested in us picking > something and using it in the installer/other tooling than whether > it's /boot/efi or /efi. > I personally prefer /efi, as I consider /boot to belong to FreeBSD and contain the FreeBSD specific boot code. EFI is a platform specific set of boot code and belongs to the system board, and though it may contain freeBSD specific code it may also contain OTHER code, especially in a multiboot environment. If it happens to align us with Linux, all the more reason to have it at /efi. Regards, -- Rod Grimes rgrimes@freebsd.org From owner-dev-commits-src-main@freebsd.org Wed Mar 3 12:54:01 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 703FE569D6B; Wed, 3 Mar 2021 12:54:01 +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 4DrDTP0ds8z3j4B; Wed, 3 Mar 2021 12:54:00 +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 123Crxav051358; Wed, 3 Mar 2021 04:53:59 -0800 (PST) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 123CrxKG051357; Wed, 3 Mar 2021 04:53:59 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202103031253.123CrxKG051357@gndrsh.dnsmgr.net> Subject: Re: git: 2c26d77d989a - main - Remove /boot/efi from mtree, missed in 0b7472b3d8d2. In-Reply-To: <63ccc815-d23b-44f5-8bf8-d301ce0665f7@www.fastmail.com> To: Brandon Bergren Date: Wed, 3 Mar 2021 04:53:59 -0800 (PST) CC: Ed Maste , Warner Losh , Nathan Whitehorn , "Rodney W. Grimes" , src-committers , "" , dev-commits-src-main@FreeBSD.org 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: 4DrDTP0ds8z3j4B X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 12:54:01 -0000 > OK, how about this as an idea then: > > Parse mount output to see if anything is mounted to /boot/efi directly? > > if mount -p | cut -f 2 | grep '^/boot/efi$'; then > .... > fi What am I missing here? One place I am being told this is run in an environment that may not even be an EFI booted system, and in another place it is being used as a test if something is mounted on it, which should only be true on an EFI booted system. Using the existance of a directory or something mounted on that directory is probably one of the worse ways to make a decsiion about if the system is or is not EFI capable, or if it needs or doesnt need EFI support stuff. I often boot from a MBR sd card or usb memstick and install an EFI system on another type of media. I am sure there is stuff in the release process that has to make EFI related platform issues, and that should probably be controled by a platform specific MK_foo knob, and not by these "exists" tests. > Brandon Bergren > bdragon@FreeBSD.org -- Rod Grimes rgrimes@freebsd.org From owner-dev-commits-src-main@freebsd.org Wed Mar 3 13:54:05 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8144556B41E; Wed, 3 Mar 2021 13:54:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DrFpj3HmMz3mZg; Wed, 3 Mar 2021 13:54:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 63F802B35; Wed, 3 Mar 2021 13:54:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 123Ds5Mb042884; Wed, 3 Mar 2021 13:54:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 123Ds5OK042883; Wed, 3 Mar 2021 13:54:05 GMT (envelope-from git) Date: Wed, 3 Mar 2021 13:54:05 GMT Message-Id: <202103031354.123Ds5OK042883@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: 47ceb65f3c21 - main - Fix capsicum-test build with GCC MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 47ceb65f3c213904642f4859a53a3139e9cb287d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 13:54:05 -0000 The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=47ceb65f3c213904642f4859a53a3139e9cb287d commit 47ceb65f3c213904642f4859a53a3139e9cb287d Author: Alex Richardson AuthorDate: 2021-03-03 13:53:30 +0000 Commit: Alex Richardson CommitDate: 2021-03-03 13:53:45 +0000 Fix capsicum-test build with GCC Apparently GCC defines NULL to 0 in C++11 mode (instead of nullptr), so this causes the following error: ``` In file included from capsicum-test.h:15, from capsicum-test.cc:1: gtest-1.10.0/include/gtest/gtest.h: In instantiation of 'testing::AssertionResult testing::internal::CmpHelperNE(const char*, const char*, const T1&, const T2&) [with T1 = long int; T2 = procstat*]': capsicum-test.cc:75:3: required from here gtest-1.10.0/include/gtest/gtest.h:1621:28: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 1609 | if (val1 op val2) {\ | ~~~~~~~~~~~~ ...... 1621 | GTEST_IMPL_CMP_HELPER_(NE, !=); gtest-1.10.0/include/gtest/gtest.h:1609:12: note: in definition of macro 'GTEST_IMPL_CMP_HELPER_' 1609 | if (val1 op val2) {\ | ^~ ``` Fix this by using nullptr directly. Submitted upstream as https://github.com/google/capsicum-test/pull/56 Reported by: Jenkins CI --- contrib/capsicum-test/capsicum-test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/capsicum-test/capsicum-test.cc b/contrib/capsicum-test/capsicum-test.cc index dedad464a4d9..ba7936c788fc 100644 --- a/contrib/capsicum-test/capsicum-test.cc +++ b/contrib/capsicum-test/capsicum-test.cc @@ -72,7 +72,7 @@ char ProcessState(int pid) { } unsigned int count = 0; struct procstat *prstat = procstat_open_sysctl(); - EXPECT_NE(NULL, prstat) << "procstat_open_sysctl failed."; + EXPECT_NE(nullptr, prstat) << "procstat_open_sysctl failed."; errno = 0; struct kinfo_proc *p = procstat_getprocs(prstat, KERN_PROC_PID, pid, &count); if (p == NULL || count == 0) { From owner-dev-commits-src-main@freebsd.org Wed Mar 3 14:06:17 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0610C56B6C5; Wed, 3 Mar 2021 14:06:17 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DrG4m6YkJz3nHB; Wed, 3 Mar 2021 14:06:16 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com [66.111.4.227]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bdragon/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id CDE8F223BB; Wed, 3 Mar 2021 14:06:16 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailauth.nyi.internal (Postfix) with ESMTP id A1E0527C0054; Wed, 3 Mar 2021 09:06:16 -0500 (EST) Received: from imap38 ([10.202.2.88]) by compute3.internal (MEProxy); Wed, 03 Mar 2021 09:06:16 -0500 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledruddtvddgieduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdluddtmdenucfjughrpefofgggkfgjfhffhffvufgtsehttdertder reejnecuhfhrohhmpedfuehrrghnughonhcuuegvrhhgrhgvnhdfuceosggurhgrghhonh eshfhrvggvuefuffdrohhrgheqnecuggftrfgrthhtvghrnhepjefhfedtuddtleegkeeg tdegjeekffdvjedttdehgffgveeugffgfeelvdeghffgnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepsggurhgrghhonhdomhgvshhmthhprghu thhhphgvrhhsohhnrghlihhthidquddtgedvfeehkeeigedqudekuddtkeehuddqsggurh grghhonheppefhrhgvvgeuufffrdhorhhgsehimhgrphdrtggt X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id F2CEFCA005D; Wed, 3 Mar 2021 09:06:15 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-206-g078a48fda5-fm-20210226.001-g078a48fd Mime-Version: 1.0 Message-Id: <14d09680-1036-4a7e-8a0e-c3063cac8bc9@www.fastmail.com> In-Reply-To: <202103031253.123CrxKG051357@gndrsh.dnsmgr.net> References: <202103031253.123CrxKG051357@gndrsh.dnsmgr.net> Date: Wed, 03 Mar 2021 08:05:56 -0600 From: "Brandon Bergren" To: rgrimes@FreeBSD.org Cc: "Ed Maste" , "Warner Losh" , "Nathan Whitehorn" , src-committers , "" , dev-commits-src-main@FreeBSD.org Subject: =?UTF-8?Q?Re:_git:_2c26d77d989a_-_main_-_Remove_/boot/efi_from_mtree, _mi?= =?UTF-8?Q?ssed_in_0b7472b3d8d2.?= Content-Type: text/plain X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 14:06:17 -0000 On Wed, Mar 3, 2021, at 6:53 AM, Rodney W. Grimes wrote: > What am I missing here? One place I am being told this is run in > an environment that may not even be an EFI booted system, and in > another place it is being used as a test if something is mounted > on it, which should only be true on an EFI booted system. That the script in question is a generic script that runs as part of bsdinstall on every platform and has to be universal. The actual *problem* here is that usr.sbin/bsdinstall/scripts/bootconfig has a default case that is *) die "Unsupported arch $(uname -m) for UEFI install" which then causes the main script to bail out, leaving the system in a half-installed state. If that had just been an exit 0 this would have never been a problem, I suppose. Before the original change that broke this, there was a check that the script was not running on powerpc or mips platforms before running the efi bits, but this got taken out. -- Brandon Bergren bdragon@FreeBSD.org From owner-dev-commits-src-main@freebsd.org Wed Mar 3 14:08:39 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2925656B6E6; Wed, 3 Mar 2021 14:08:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DrG7W0hf5z3nYv; Wed, 3 Mar 2021 14:08:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0699E2F00; Wed, 3 Mar 2021 14:08:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 123E8cIn057272; Wed, 3 Mar 2021 14:08:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 123E8cOE057271; Wed, 3 Mar 2021 14:08:38 GMT (envelope-from git) Date: Wed, 3 Mar 2021 14:08:38 GMT Message-Id: <202103031408.123E8cOE057271@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 3adf72a36b9b - main - qat.4: Fix some firmware module names MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3adf72a36b9b151eef57e3d83f71a3a9fbacb78d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 14:08:39 -0000 The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=3adf72a36b9b151eef57e3d83f71a3a9fbacb78d commit 3adf72a36b9b151eef57e3d83f71a3a9fbacb78d Author: Mark Johnston AuthorDate: 2021-03-03 14:07:53 +0000 Commit: Mark Johnston CommitDate: 2021-03-03 14:07:53 +0000 qat.4: Fix some firmware module names PR: 252984 MFC after: 1 week --- share/man/man4/qat.4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man4/qat.4 b/share/man/man4/qat.4 index 92ee85ac64eb..6aa8343aa309 100644 --- a/share/man/man4/qat.4 +++ b/share/man/man4/qat.4 @@ -47,9 +47,9 @@ module at boot time, place the following lines in qat_load="YES" qat_c2xxxfw_load="YES" qat_c3xxxfw_load="YES" -qat_c63xfw_load="YES" +qat_c62xfw_load="YES" qat_d15xxfw_load="YES" -qat_dh895xcc_load="YES" +qat_dh895xccfw_load="YES" .Ed .Sh DESCRIPTION The From owner-dev-commits-src-main@freebsd.org Wed Mar 3 14:09:13 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 817E756B8D6; Wed, 3 Mar 2021 14:09:13 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DrG893FWxz3nV7; Wed, 3 Mar 2021 14:09:13 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from comporellon.tachypleus.net (unknown [IPv6:2601:405:4a00:acd:cc7b:682b:f804:9afd]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: nwhitehorn/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 1CCEA223BC; Wed, 3 Mar 2021 14:09:13 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) To: Warner Losh , Ed Maste Cc: "Rodney W. Grimes" , Brandon Bergren , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202103021856.122IuYgV048086@gndrsh.dnsmgr.net> <3d947e4c-a529-0b27-a8d7-415600783e53@freebsd.org> From: Nathan Whitehorn Subject: Re: git: 2c26d77d989a - main - Remove /boot/efi from mtree, missed in 0b7472b3d8d2. Message-ID: Date: Wed, 3 Mar 2021 09:09:12 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Content-Language: en-US X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 14:09:13 -0000 On 3/2/21 10:19 PM, Warner Losh wrote: > > > On Tue, Mar 2, 2021, 7:01 PM Ed Maste > wrote: > > On Tue, 2 Mar 2021 at 19:30, Warner Losh > wrote: > > > > There has been some talk of moving the mount point to /efi, but > I think that went nowhere... > > I thought about /efi based on arguments from the Linux world, more > info at > https://wiki.archlinux.org/index.php/EFI_system_partition#Typical_m= ount_points > . > I did open https://reviews.freebsd.org/D28814 > to move the existing > uses to /efi. That said, I'm much more interested in us picking > something and using it in the installer/other tooling than whether > it's /boot/efi or /efi. > > > Me too. I am actually open to either. If I had a do over, I'd pick=20 > /efi honestly. > > But the directory presence or absence shouldn't be used to know if we=20 > have an ESP to deal with or not. > > Warner > It would have been nice to know that when I posted the original patch=20 for review that relied on this mechanism two weeks ago and you and Ed=20 both signed off. Or when we discussed this on Friday and no one knew why = it was in mtree -- I still honestly don't know from this thread -- and=20 then I proposed removing it and everyone said that was fine. There are=20 lots of other directories that we make in the installer that aren't in=20 mtree. What's special about this one? The problem here is that the installer needs to know if an ESP has been=20 made. If /boot/efi is supposed to be the mountpoint for an ESP, its=20 presence seemed like a reasonable way to signal that. Here are some optio= ns: - We could try to see if a partition is actually mounted there. That's=20 mildly annoying -- it involves parsing some shell output -- and results=20 in making a pointless directory on all non-EFI architectures. - We could try to have the installer signal to itself via some temp=20 file. This seems fragile and complicated. - We could duplicate the logic for whether to make an ESP in the first=20 place in several places, which seems like a terrible idea. But this needs to be settled *now*. It's already very, very late to get=20 this into 13.0 and we can't have another cycle of changing our minds=20 about reviewed code. -Nathan From owner-dev-commits-src-main@freebsd.org Wed Mar 3 14:12:04 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E7C8956BC9C; Wed, 3 Mar 2021 14:12:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DrGCS5g9dz3pMb; Wed, 3 Mar 2021 14:12:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B53FB2BCA; Wed, 3 Mar 2021 14:12:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 123EC40K069183; Wed, 3 Mar 2021 14:12:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 123EC3oa069178; Wed, 3 Mar 2021 14:12:03 GMT (envelope-from git) Date: Wed, 3 Mar 2021 14:12:03 GMT Message-Id: <202103031412.123EC3oa069178@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: 8a272653d9fb - main - stress2: Initial import MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8a272653d9fbd9fc37691c9aad6a05089b4ecb4d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 14:12:05 -0000 The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=8a272653d9fbd9fc37691c9aad6a05089b4ecb4d commit 8a272653d9fbd9fc37691c9aad6a05089b4ecb4d Author: Peter Holm AuthorDate: 2021-03-03 12:56:56 +0000 Commit: Peter Holm CommitDate: 2021-03-03 14:11:40 +0000 stress2: Initial import Discussed with: kib --- tools/test/README | 1 + tools/test/stress2/Makefile | 11 + tools/test/stress2/README | 20 + tools/test/stress2/all.cfg | 8 + tools/test/stress2/creat.cfg | 8 + tools/test/stress2/ddb.conf | 6 + tools/test/stress2/default.cfg | 122 ++ tools/test/stress2/df.cfg | 8 + tools/test/stress2/disk.cfg | 8 + tools/test/stress2/doc/README | 3 + tools/test/stress2/doc/linuxforum06.pdf | Bin 0 -> 523790 bytes tools/test/stress2/doc/stress.pdf | Bin 0 -> 39840 bytes tools/test/stress2/include/stress.h | 64 + tools/test/stress2/io.cfg | 9 + tools/test/stress2/jeff.cfg | 8 + tools/test/stress2/lib/Makefile | 9 + tools/test/stress2/lib/main.c | 212 ++++ tools/test/stress2/lib/options.c | 268 +++++ tools/test/stress2/lib/random_int.c | 56 + tools/test/stress2/lib/resources.c | 248 ++++ tools/test/stress2/link.cfg | 9 + tools/test/stress2/load.cfg | 18 + tools/test/stress2/lockf.cfg | 9 + tools/test/stress2/marcus.cfg | 24 + tools/test/stress2/misc/1st.sh | 73 ++ tools/test/stress2/misc/256m.sh | 45 + tools/test/stress2/misc/README | 4 + tools/test/stress2/misc/advlock.sh | 245 ++++ tools/test/stress2/misc/aesni.sh | 38 + tools/test/stress2/misc/all.debug.inc | 95 ++ tools/test/stress2/misc/all.exclude | 111 ++ tools/test/stress2/misc/all.exclude.pae | 11 + tools/test/stress2/misc/all.sh | 255 ++++ tools/test/stress2/misc/altbufferflushes.sh | 98 ++ tools/test/stress2/misc/alternativeFlushPath.sh | 131 ++ tools/test/stress2/misc/arp.sh | 57 + tools/test/stress2/misc/aslr.sh | 46 + tools/test/stress2/misc/audit.sh | 58 + tools/test/stress2/misc/audit2.sh | 59 + tools/test/stress2/misc/backingstore.sh | 81 ++ tools/test/stress2/misc/backingstore2.sh | 72 ++ tools/test/stress2/misc/backingstore3.sh | 73 ++ tools/test/stress2/misc/badcode.sh | 65 + tools/test/stress2/misc/badcode2.sh | 57 + tools/test/stress2/misc/badcode3.sh | 57 + tools/test/stress2/misc/bench.sh | 300 +++++ tools/test/stress2/misc/beneath.sh | 110 ++ tools/test/stress2/misc/beneath2.sh | 101 ++ tools/test/stress2/misc/beneath3.sh | 92 ++ tools/test/stress2/misc/beneath4.sh | 133 ++ tools/test/stress2/misc/bio.sh | 225 ++++ tools/test/stress2/misc/buildkernel.sh | 63 + tools/test/stress2/misc/buildworld.sh | 67 ++ tools/test/stress2/misc/buildworld2.sh | 57 + tools/test/stress2/misc/buildworld3.sh | 95 ++ tools/test/stress2/misc/buildworld4.sh | 74 ++ tools/test/stress2/misc/burnin.sh | 210 ++++ tools/test/stress2/misc/callout_reset_on.sh | 331 +++++ tools/test/stress2/misc/callout_reset_on2.sh | 303 +++++ tools/test/stress2/misc/chain.sh | 77 ++ tools/test/stress2/misc/churn.sh | 211 ++++ tools/test/stress2/misc/cleanup.sh | 105 ++ tools/test/stress2/misc/cluster.sh | 269 +++++ tools/test/stress2/misc/cmp.sh | 187 +++ tools/test/stress2/misc/collapse.sh | 153 +++ tools/test/stress2/misc/compare.sh | 44 + tools/test/stress2/misc/context.sh | 130 ++ tools/test/stress2/misc/context2.sh | 131 ++ tools/test/stress2/misc/contigmalloc.sh | 255 ++++ tools/test/stress2/misc/contigmalloc2.sh | 223 ++++ tools/test/stress2/misc/contigmalloc3.sh | 225 ++++ tools/test/stress2/misc/core.sh | 77 ++ tools/test/stress2/misc/core2.sh | 95 ++ tools/test/stress2/misc/core3.sh | 171 +++ tools/test/stress2/misc/core4.sh | 89 ++ tools/test/stress2/misc/core5.sh | 199 +++ tools/test/stress2/misc/cpuset.sh | 49 + tools/test/stress2/misc/credleak.sh | 162 +++ tools/test/stress2/misc/crossmp.sh | 89 ++ tools/test/stress2/misc/crossmp10.sh | 104 ++ tools/test/stress2/misc/crossmp11.sh | 121 ++ tools/test/stress2/misc/crossmp2.sh | 86 ++ tools/test/stress2/misc/crossmp3.sh | 108 ++ tools/test/stress2/misc/crossmp4.sh | 107 ++ tools/test/stress2/misc/crossmp5.sh | 95 ++ tools/test/stress2/misc/crossmp6.sh | 103 ++ tools/test/stress2/misc/crossmp7.sh | 100 ++ tools/test/stress2/misc/crossmp8.sh | 125 ++ tools/test/stress2/misc/crossmp9.sh | 90 ++ tools/test/stress2/misc/dangling.sh | 87 ++ tools/test/stress2/misc/datagram.sh | 96 ++ tools/test/stress2/misc/datagram2.sh | 104 ++ tools/test/stress2/misc/datagram3.sh | 106 ++ tools/test/stress2/misc/datamove.sh | 230 ++++ tools/test/stress2/misc/datamove2.sh | 244 ++++ tools/test/stress2/misc/datamove3.sh | 241 ++++ tools/test/stress2/misc/datamove4.sh | 251 ++++ tools/test/stress2/misc/datamove5.sh | 262 ++++ tools/test/stress2/misc/db.sh | 178 +++ tools/test/stress2/misc/dd.sh | 64 + tools/test/stress2/misc/dev.sh | 137 +++ tools/test/stress2/misc/dev2.sh | 144 +++ tools/test/stress2/misc/dev3.sh | 160 +++ tools/test/stress2/misc/devfd.sh | 130 ++ tools/test/stress2/misc/devfs.sh | 72 ++ tools/test/stress2/misc/devfs2.sh | 107 ++ tools/test/stress2/misc/devfs3.sh | 45 + tools/test/stress2/misc/devfs4.sh | 35 + tools/test/stress2/misc/devfs5.sh | 68 ++ tools/test/stress2/misc/dfull.sh | 56 + tools/test/stress2/misc/dtrace.sh | 68 ++ tools/test/stress2/misc/dtrace_fault.sh | 65 + tools/test/stress2/misc/dumpfs.sh | 73 ++ tools/test/stress2/misc/dup.sh | 122 ++ tools/test/stress2/misc/dup2.sh | 71 ++ tools/test/stress2/misc/execi386.sh | 86 ++ tools/test/stress2/misc/execve.sh | 130 ++ tools/test/stress2/misc/exlock.sh | 122 ++ tools/test/stress2/misc/exlock2.sh | 210 ++++ tools/test/stress2/misc/ext2fs.sh | 57 + tools/test/stress2/misc/ext2fs2.sh | 55 + tools/test/stress2/misc/ext2fs3.sh | 68 ++ tools/test/stress2/misc/ext3fs.sh | 61 + tools/test/stress2/misc/ext4fs.sh | 64 + tools/test/stress2/misc/extattr.sh | 95 ++ tools/test/stress2/misc/extattr2.sh | 94 ++ tools/test/stress2/misc/extattr3.sh | 62 + tools/test/stress2/misc/extattr_set_fd.sh | 79 ++ tools/test/stress2/misc/extattrctl.sh | 73 ++ tools/test/stress2/misc/f_offset.sh | 160 +++ tools/test/stress2/misc/fcntl.sh | 234 ++++ tools/test/stress2/misc/fcntl2.sh | 188 +++ tools/test/stress2/misc/fcntl3.sh | 56 + tools/test/stress2/misc/fdatasync.sh | 197 +++ tools/test/stress2/misc/fdatasync2.sh | 196 +++ tools/test/stress2/misc/fdescfs.sh | 74 ++ tools/test/stress2/misc/fdgrowtable.sh | 105 ++ tools/test/stress2/misc/fexecve.sh | 94 ++ tools/test/stress2/misc/ffs_blkfree.sh | 76 ++ tools/test/stress2/misc/ffs_sync.sh | 254 ++++ tools/test/stress2/misc/ffs_syncvnode.sh | 59 + tools/test/stress2/misc/ffs_syncvnode2.sh | 63 + tools/test/stress2/misc/fifo.sh | 87 ++ tools/test/stress2/misc/fifo2.sh | 206 ++++ tools/test/stress2/misc/fifo3.sh | 209 ++++ tools/test/stress2/misc/fifo4.sh | 80 ++ tools/test/stress2/misc/flock.sh | 191 +++ tools/test/stress2/misc/flock_open_close.sh | 174 +++ tools/test/stress2/misc/force.sh | 70 ++ tools/test/stress2/misc/force2.sh | 79 ++ tools/test/stress2/misc/force3.sh | 65 + tools/test/stress2/misc/force4.sh | 91 ++ tools/test/stress2/misc/force5.sh | 74 ++ tools/test/stress2/misc/force6.sh | 79 ++ tools/test/stress2/misc/fork.sh | 129 ++ tools/test/stress2/misc/forkbomb.sh | 148 +++ tools/test/stress2/misc/fpclone.sh | 192 +++ tools/test/stress2/misc/fpclone2.sh | 117 ++ tools/test/stress2/misc/fpu.sh | 103 ++ tools/test/stress2/misc/fragments.sh | 275 +++++ tools/test/stress2/misc/freepages.sh | 130 ++ tools/test/stress2/misc/fs.sh | 91 ++ tools/test/stress2/misc/fsck.sh | 149 +++ tools/test/stress2/misc/fsck2.sh | 38 + tools/test/stress2/misc/fsck3.sh | 88 ++ tools/test/stress2/misc/fsck4.sh | 67 ++ tools/test/stress2/misc/fsck5.sh | 72 ++ tools/test/stress2/misc/fsck6.sh | 80 ++ tools/test/stress2/misc/fsgs.sh | 135 +++ tools/test/stress2/misc/fstat.sh | 178 +++ tools/test/stress2/misc/fsync.sh | 91 ++ tools/test/stress2/misc/fsync2.sh | 138 +++ tools/test/stress2/misc/ftruncate.sh | 189 +++ tools/test/stress2/misc/ftruncate2.sh | 205 ++++ tools/test/stress2/misc/fts.sh | 144 +++ tools/test/stress2/misc/fts2.sh | 285 +++++ tools/test/stress2/misc/fts3.sh | 133 ++ tools/test/stress2/misc/full.sh | 67 ++ tools/test/stress2/misc/fullpath.sh | 111 ++ tools/test/stress2/misc/fullpath2.sh | 214 ++++ tools/test/stress2/misc/fuse.sh | 57 + tools/test/stress2/misc/fuse2.sh | 89 ++ tools/test/stress2/misc/fuse3.sh | 42 + tools/test/stress2/misc/fuzz.sh | 180 +++ tools/test/stress2/misc/gbde.sh | 55 + tools/test/stress2/misc/geli.sh | 68 ++ tools/test/stress2/misc/geomleak.sh | 52 + tools/test/stress2/misc/geomleak2.sh | 57 + tools/test/stress2/misc/getrandom.sh | 142 +++ tools/test/stress2/misc/getrandom2.sh | 188 +++ tools/test/stress2/misc/gjournal.sh | 76 ++ tools/test/stress2/misc/gjournal2.sh | 63 + tools/test/stress2/misc/gjournal3.sh | 85 ++ tools/test/stress2/misc/gjournal4.sh | 65 + tools/test/stress2/misc/gnop.sh | 77 ++ tools/test/stress2/misc/gnop10.sh | 139 +++ tools/test/stress2/misc/gnop2.sh | 80 ++ tools/test/stress2/misc/gnop3.sh | 73 ++ tools/test/stress2/misc/gnop4.sh | 79 ++ tools/test/stress2/misc/gnop5.sh | 69 ++ tools/test/stress2/misc/gnop6.sh | 68 ++ tools/test/stress2/misc/gnop7.sh | 80 ++ tools/test/stress2/misc/gnop8.sh | 68 ++ tools/test/stress2/misc/gnop9.sh | 139 +++ tools/test/stress2/misc/gpt.sh | 51 + tools/test/stress2/misc/graid0.sh | 71 ++ tools/test/stress2/misc/graid1.sh | 80 ++ tools/test/stress2/misc/graid1_10.sh | 96 ++ tools/test/stress2/misc/graid1_2.sh | 131 ++ tools/test/stress2/misc/graid1_3.sh | 93 ++ tools/test/stress2/misc/graid1_4.sh | 97 ++ tools/test/stress2/misc/graid1_5.sh | 116 ++ tools/test/stress2/misc/graid1_6.sh | 106 ++ tools/test/stress2/misc/graid1_7.sh | 127 ++ tools/test/stress2/misc/graid1_8.sh | 102 ++ tools/test/stress2/misc/graid1_9.sh | 114 ++ tools/test/stress2/misc/graid3.sh | 71 ++ tools/test/stress2/misc/growfs.sh | 63 + tools/test/stress2/misc/holdcnt0.sh | 261 ++++ tools/test/stress2/misc/holdcnt02.sh | 238 ++++ tools/test/stress2/misc/holdcnt03.sh | 237 ++++ tools/test/stress2/misc/holdcnt04.sh | 248 ++++ tools/test/stress2/misc/holdcnt05.sh | 249 ++++ tools/test/stress2/misc/ifconfig.sh | 60 + tools/test/stress2/misc/ifconfig2.sh | 67 ++ tools/test/stress2/misc/indir.sh | 201 ++++ tools/test/stress2/misc/indir_trunc.sh | 231 ++++ tools/test/stress2/misc/inversion.sh | 97 ++ tools/test/stress2/misc/isofs.sh | 60 + tools/test/stress2/misc/isofs2.sh | 58 + tools/test/stress2/misc/isofs3.sh | 66 + tools/test/stress2/misc/jail.sh | 66 + tools/test/stress2/misc/jail2.sh | 76 ++ tools/test/stress2/misc/jail3.sh | 76 ++ tools/test/stress2/misc/jail4.sh | 78 ++ tools/test/stress2/misc/jexec.sh | 67 ++ tools/test/stress2/misc/jumbo.sh | 221 ++++ tools/test/stress2/misc/kern_umtx_inf_loop.sh | 148 +++ tools/test/stress2/misc/kevent.sh | 174 +++ tools/test/stress2/misc/kevent10.sh | 96 ++ tools/test/stress2/misc/kevent11.sh | 178 +++ tools/test/stress2/misc/kevent12.sh | 233 ++++ tools/test/stress2/misc/kevent13.sh | 141 +++ tools/test/stress2/misc/kevent14.sh | 77 ++ tools/test/stress2/misc/kevent15.sh | 161 +++ tools/test/stress2/misc/kevent2.sh | 170 +++ tools/test/stress2/misc/kevent3.sh | 74 ++ tools/test/stress2/misc/kevent4.sh | 174 +++ tools/test/stress2/misc/kevent5.sh | 183 +++ tools/test/stress2/misc/kevent6.sh | 168 +++ tools/test/stress2/misc/kevent7.sh | 281 +++++ tools/test/stress2/misc/kevent8.sh | 163 +++ tools/test/stress2/misc/kevent9.sh | 206 ++++ tools/test/stress2/misc/killpg.sh | 155 +++ tools/test/stress2/misc/kinfo.sh | 162 +++ tools/test/stress2/misc/kinfo2.sh | 186 +++ tools/test/stress2/misc/kinfo3.sh | 197 +++ tools/test/stress2/misc/kpti.sh | 50 + tools/test/stress2/misc/largepage.sh | 152 +++ tools/test/stress2/misc/laundry.sh | 177 +++ tools/test/stress2/misc/ldt.sh | 370 ++++++ tools/test/stress2/misc/ldt2.sh | 99 ++ tools/test/stress2/misc/libMicro.sh | 53 + tools/test/stress2/misc/linger.sh | 168 +++ tools/test/stress2/misc/linger2.sh | 172 +++ tools/test/stress2/misc/linger3.sh | 134 +++ tools/test/stress2/misc/linger4.sh | 155 +++ tools/test/stress2/misc/link.sh | 193 +++ tools/test/stress2/misc/link2.sh | 78 ++ tools/test/stress2/misc/linux.sh | 55 + tools/test/stress2/misc/lockd.sh | 70 ++ tools/test/stress2/misc/lockf.sh | 73 ++ tools/test/stress2/misc/lockf2.sh | 43 + tools/test/stress2/misc/lockf3.sh | 163 +++ tools/test/stress2/misc/lockf4.sh | 183 +++ tools/test/stress2/misc/lockf5.sh | 61 + tools/test/stress2/misc/lookup_shared.sh | 38 + tools/test/stress2/misc/lstat.sh | 236 ++++ tools/test/stress2/misc/mac.sh | 38 + tools/test/stress2/misc/mac_chkexec.sh | 57 + tools/test/stress2/misc/machipc.sh | 184 +++ tools/test/stress2/misc/machipc2.sh | 292 +++++ tools/test/stress2/misc/marcus.sh | 55 + tools/test/stress2/misc/marcus2.sh | 73 ++ tools/test/stress2/misc/marcus3.sh | 52 + tools/test/stress2/misc/marcus4.sh | 86 ++ tools/test/stress2/misc/marcus5.sh | 85 ++ tools/test/stress2/misc/marcus6.sh | 83 ++ tools/test/stress2/misc/marcus7.sh | 90 ++ tools/test/stress2/misc/maxmemdom.sh | 52 + tools/test/stress2/misc/maxproc.sh | 167 +++ tools/test/stress2/misc/maxvnodes.sh | 70 ++ tools/test/stress2/misc/maxvnodes2.sh | 42 + tools/test/stress2/misc/md.sh | 58 + tools/test/stress2/misc/md2.sh | 57 + tools/test/stress2/misc/md3.sh | 56 + tools/test/stress2/misc/md4.sh | 43 + tools/test/stress2/misc/md5.sh | 48 + tools/test/stress2/misc/md6.sh | 44 + tools/test/stress2/misc/md7.sh | 39 + tools/test/stress2/misc/md8.sh | 121 ++ tools/test/stress2/misc/md9.sh | 59 + tools/test/stress2/misc/mdconfig.sh | 39 + tools/test/stress2/misc/mdconfig2.sh | 53 + tools/test/stress2/misc/mdconfig3.sh | 46 + tools/test/stress2/misc/memguard.sh | 65 + tools/test/stress2/misc/memguard2.sh | 68 ++ tools/test/stress2/misc/memguard3.sh | 63 + tools/test/stress2/misc/memguard4.sh | 61 + tools/test/stress2/misc/midi.sh | 94 ++ tools/test/stress2/misc/midi2.sh | 114 ++ tools/test/stress2/misc/mincore.sh | 157 +++ tools/test/stress2/misc/minherit.sh | 176 +++ tools/test/stress2/misc/mkfifo.sh | 86 ++ tools/test/stress2/misc/mkfifo2c.sh | 89 ++ tools/test/stress2/misc/mkfifo2d.sh | 81 ++ tools/test/stress2/misc/mkfifo3.sh | 139 +++ tools/test/stress2/misc/mkfifo4.sh | 186 +++ tools/test/stress2/misc/mkfifo5.sh | 214 ++++ tools/test/stress2/misc/mkfifo6.sh | 183 +++ tools/test/stress2/misc/mkfifo7.sh | 203 ++++ tools/test/stress2/misc/mkfifo8.sh | 200 +++ tools/test/stress2/misc/mknod.sh | 163 +++ tools/test/stress2/misc/mlockall.sh | 80 ++ tools/test/stress2/misc/mlockall2.sh | 165 +++ tools/test/stress2/misc/mlockall3.sh | 167 +++ tools/test/stress2/misc/mlockall4.sh | 66 + tools/test/stress2/misc/mlockall5.sh | 162 +++ tools/test/stress2/misc/mlockall6.sh | 203 ++++ tools/test/stress2/misc/mlockall7.sh | 262 ++++ tools/test/stress2/misc/mmap.sh | 63 + tools/test/stress2/misc/mmap10.sh | 273 +++++ tools/test/stress2/misc/mmap11.sh | 301 +++++ tools/test/stress2/misc/mmap12.sh | 81 ++ tools/test/stress2/misc/mmap13.sh | 81 ++ tools/test/stress2/misc/mmap14.sh | 252 ++++ tools/test/stress2/misc/mmap15.sh | 223 ++++ tools/test/stress2/misc/mmap16.sh | 145 +++ tools/test/stress2/misc/mmap17.sh | 86 ++ tools/test/stress2/misc/mmap18.sh | 308 +++++ tools/test/stress2/misc/mmap19.sh | 241 ++++ tools/test/stress2/misc/mmap2.sh | 177 +++ tools/test/stress2/misc/mmap20.sh | 83 ++ tools/test/stress2/misc/mmap21.sh | 165 +++ tools/test/stress2/misc/mmap22.sh | 130 ++ tools/test/stress2/misc/mmap23.sh | 108 ++ tools/test/stress2/misc/mmap24.sh | 99 ++ tools/test/stress2/misc/mmap25.sh | 120 ++ tools/test/stress2/misc/mmap26.sh | 123 ++ tools/test/stress2/misc/mmap27.sh | 126 ++ tools/test/stress2/misc/mmap28.sh | 131 ++ tools/test/stress2/misc/mmap29.sh | 71 ++ tools/test/stress2/misc/mmap3.sh | 167 +++ tools/test/stress2/misc/mmap30.sh | 77 ++ tools/test/stress2/misc/mmap31.sh | 174 +++ tools/test/stress2/misc/mmap32.sh | 202 ++++ tools/test/stress2/misc/mmap33.sh | 121 ++ tools/test/stress2/misc/mmap34.sh | 230 ++++ tools/test/stress2/misc/mmap35.sh | 112 ++ tools/test/stress2/misc/mmap36.sh | 80 ++ tools/test/stress2/misc/mmap37.sh | 153 +++ tools/test/stress2/misc/mmap38.sh | 42 + tools/test/stress2/misc/mmap39.sh | 131 ++ tools/test/stress2/misc/mmap4.sh | 116 ++ tools/test/stress2/misc/mmap40.sh | 159 +++ tools/test/stress2/misc/mmap5.sh | 129 ++ tools/test/stress2/misc/mmap6.sh | 179 +++ tools/test/stress2/misc/mmap7.sh | 147 +++ tools/test/stress2/misc/mmap8.sh | 89 ++ tools/test/stress2/misc/mmap9.sh | 95 ++ tools/test/stress2/misc/mount.sh | 82 ++ tools/test/stress2/misc/mount2.sh | 73 ++ tools/test/stress2/misc/mountro.sh | 67 ++ tools/test/stress2/misc/mountro2.sh | 54 + tools/test/stress2/misc/mountro3.sh | 56 + tools/test/stress2/misc/mountro4.sh | 100 ++ tools/test/stress2/misc/mountro5.sh | 63 + tools/test/stress2/misc/mountro6.sh | 57 + tools/test/stress2/misc/mountu.sh | 284 +++++ tools/test/stress2/misc/mprotect.sh | 75 ++ tools/test/stress2/misc/mprotect2.sh | 97 ++ tools/test/stress2/misc/msdos.sh | 60 + tools/test/stress2/misc/msdos10.sh | 89 ++ tools/test/stress2/misc/msdos2.sh | 58 + tools/test/stress2/misc/msdos3.sh | 52 + tools/test/stress2/misc/msdos4.sh | 76 ++ tools/test/stress2/misc/msdos5.sh | 59 + tools/test/stress2/misc/msdos6.sh | 93 ++ tools/test/stress2/misc/msdos7.sh | 57 + tools/test/stress2/misc/msdos8.sh | 157 +++ tools/test/stress2/misc/msdos9.sh | 77 ++ tools/test/stress2/misc/msetdomain.sh | 144 +++ tools/test/stress2/misc/msync.sh | 201 ++++ tools/test/stress2/misc/msync2.sh | 131 ++ tools/test/stress2/misc/multicast.sh | 118 ++ tools/test/stress2/misc/multicast2.sh | 26 + tools/test/stress2/misc/namecache.sh | 214 ++++ tools/test/stress2/misc/namecache2.sh | 192 +++ tools/test/stress2/misc/nanosleep.sh | 87 ++ tools/test/stress2/misc/nbufkv.sh | 156 +++ tools/test/stress2/misc/newfs.sh | 94 ++ tools/test/stress2/misc/newfs2.sh | 69 ++ tools/test/stress2/misc/newfs3.sh | 81 ++ tools/test/stress2/misc/newfs4.sh | 128 ++ tools/test/stress2/misc/newfs5.sh | 116 ++ tools/test/stress2/misc/nfs.sh | 55 + tools/test/stress2/misc/nfs10.sh | 73 ++ tools/test/stress2/misc/nfs11.sh | 67 ++ tools/test/stress2/misc/nfs12.sh | 160 +++ tools/test/stress2/misc/nfs13.sh | 66 + tools/test/stress2/misc/nfs14.sh | 74 ++ tools/test/stress2/misc/nfs15.sh | 212 ++++ tools/test/stress2/misc/nfs15lockd.sh | 240 ++++ tools/test/stress2/misc/nfs15lockd2.sh | 41 + tools/test/stress2/misc/nfs15lockd3.sh | 250 ++++ tools/test/stress2/misc/nfs16.sh | 196 +++ tools/test/stress2/misc/nfs17.sh | 76 ++ tools/test/stress2/misc/nfs2.sh | 69 ++ tools/test/stress2/misc/nfs3.sh | 60 + tools/test/stress2/misc/nfs4.sh | 70 ++ tools/test/stress2/misc/nfs5.sh | 68 ++ tools/test/stress2/misc/nfs6.sh | 81 ++ tools/test/stress2/misc/nfs7.sh | 68 ++ tools/test/stress2/misc/nfs8.sh | 66 + tools/test/stress2/misc/nfs9.sh | 88 ++ tools/test/stress2/misc/nfs_halfpage.sh | 99 ++ tools/test/stress2/misc/nfs_halfpage2.sh | 103 ++ tools/test/stress2/misc/nfsdelegation.sh | 169 +++ tools/test/stress2/misc/nfsdepth.sh | 239 ++++ tools/test/stress2/misc/nfsrename.sh | 224 ++++ tools/test/stress2/misc/nfssillyrename.sh | 67 ++ tools/test/stress2/misc/nullfs.sh | 72 ++ tools/test/stress2/misc/nullfs10.sh | 71 ++ tools/test/stress2/misc/nullfs11.sh | 89 ++ tools/test/stress2/misc/nullfs12.sh | 64 + tools/test/stress2/misc/nullfs13.sh | 77 ++ tools/test/stress2/misc/nullfs14.sh | 58 + tools/test/stress2/misc/nullfs15.sh | 64 + tools/test/stress2/misc/nullfs16.sh | 61 + tools/test/stress2/misc/nullfs17.sh | 84 ++ tools/test/stress2/misc/nullfs18.sh | 133 ++ tools/test/stress2/misc/nullfs19.sh | 90 ++ tools/test/stress2/misc/nullfs2.sh | 54 + tools/test/stress2/misc/nullfs20.sh | 74 ++ tools/test/stress2/misc/nullfs21.sh | 71 ++ tools/test/stress2/misc/nullfs22.sh | 247 ++++ tools/test/stress2/misc/nullfs23.sh | 50 + tools/test/stress2/misc/nullfs24.sh | 69 ++ tools/test/stress2/misc/nullfs25.sh | 90 ++ tools/test/stress2/misc/nullfs26.sh | 47 + tools/test/stress2/misc/nullfs27.sh | 91 ++ tools/test/stress2/misc/nullfs3.sh | 56 + tools/test/stress2/misc/nullfs4.sh | 50 + tools/test/stress2/misc/nullfs5.sh | 79 ++ tools/test/stress2/misc/nullfs6.sh | 50 + tools/test/stress2/misc/nullfs7.sh | 63 + tools/test/stress2/misc/nullfs8.sh | 67 ++ tools/test/stress2/misc/nullfs9.sh | 82 ++ tools/test/stress2/misc/numa.sh | 46 + tools/test/stress2/misc/oom.sh | 47 + tools/test/stress2/misc/oom2.sh | 49 + tools/test/stress2/misc/oovm.sh | 134 +++ tools/test/stress2/misc/oovm2.sh | 136 +++ tools/test/stress2/misc/open.sh | 84 ++ tools/test/stress2/misc/openlock.sh | 94 ++ tools/test/stress2/misc/overcommit.sh | 62 + tools/test/stress2/misc/overcommit2.sh | 65 + tools/test/stress2/misc/overflow3.sh | 96 ++ tools/test/stress2/misc/overlap.sh | 160 +++ tools/test/stress2/misc/pageout.sh | 144 +++ tools/test/stress2/misc/parallelmount.sh | 68 ++ tools/test/stress2/misc/parallelmount2.sh | 84 ++ tools/test/stress2/misc/pathconf.sh | 56 + tools/test/stress2/misc/pathconf2.sh | 37 + tools/test/stress2/misc/pause.sh | 159 +++ tools/test/stress2/misc/pcatch.sh | 154 +++ tools/test/stress2/misc/pcatch2.sh | 44 + tools/test/stress2/misc/pdfork.sh | 58 + tools/test/stress2/misc/perf.sh | 151 +++ tools/test/stress2/misc/pfl.sh | 188 +++ tools/test/stress2/misc/pfl2.sh | 104 ++ tools/test/stress2/misc/pfl3.sh | 47 + tools/test/stress2/misc/pfl4.sh | 95 ++ tools/test/stress2/misc/ping.sh | 53 + tools/test/stress2/misc/pipe.sh | 132 ++ tools/test/stress2/misc/pipe2.sh | 163 +++ tools/test/stress2/misc/pipe3.sh | 148 +++ tools/test/stress2/misc/pipe_enomem.sh | 102 ++ tools/test/stress2/misc/pkru.sh | 512 ++++++++ tools/test/stress2/misc/pkru2.sh | 108 ++ tools/test/stress2/misc/pmc.sh | 55 + tools/test/stress2/misc/pmc2.sh | 51 + tools/test/stress2/misc/pmc3.sh | 44 + tools/test/stress2/misc/pmc4.sh | 124 ++ tools/test/stress2/misc/pmc5.sh | 138 +++ tools/test/stress2/misc/pmc6.sh | 41 + tools/test/stress2/misc/pmc7.sh | 12 + tools/test/stress2/misc/poll.sh | 57 + tools/test/stress2/misc/poll2.sh | 212 ++++ tools/test/stress2/misc/posix_fadvise.sh | 72 ++ tools/test/stress2/misc/posix_fadvise2.sh | 78 ++ tools/test/stress2/misc/posix_fadvise3.sh | 120 ++ tools/test/stress2/misc/posix_openpt.sh | 79 ++ tools/test/stress2/misc/posix_openpt2.sh | 152 +++ tools/test/stress2/misc/pread.sh | 190 +++ tools/test/stress2/misc/proccontrol.sh | 54 + tools/test/stress2/misc/procfs.sh | 69 ++ tools/test/stress2/misc/procfs2.sh | 37 + tools/test/stress2/misc/procfs3.sh | 154 +++ tools/test/stress2/misc/procfs4.sh | 156 +++ tools/test/stress2/misc/procfs5.sh | 84 ++ tools/test/stress2/misc/procfs6.sh | 42 + tools/test/stress2/misc/procstat.sh | 44 + tools/test/stress2/misc/procstat2.sh | 44 + tools/test/stress2/misc/pthread.sh | 137 +++ tools/test/stress2/misc/pthread2.sh | 296 +++++ tools/test/stress2/misc/pthread3.sh | 304 +++++ tools/test/stress2/misc/pthread4.sh | 296 +++++ tools/test/stress2/misc/pthread5.sh | 121 ++ tools/test/stress2/misc/pthread6.sh | 308 +++++ tools/test/stress2/misc/pthread7.sh | 285 +++++ tools/test/stress2/misc/pthread8.sh | 137 +++ tools/test/stress2/misc/pthread9.sh | 185 +++ tools/test/stress2/misc/ptrace.sh | 106 ++ tools/test/stress2/misc/ptrace10.sh | 161 +++ tools/test/stress2/misc/ptrace11.sh | 124 ++ tools/test/stress2/misc/ptrace2.sh | 143 +++ tools/test/stress2/misc/ptrace3.sh | 130 ++ tools/test/stress2/misc/ptrace4.sh | 58 + tools/test/stress2/misc/ptrace5.sh | 200 +++ tools/test/stress2/misc/ptrace6.sh | 204 ++++ tools/test/stress2/misc/ptrace7.sh | 238 ++++ tools/test/stress2/misc/ptrace8.sh | 122 ++ tools/test/stress2/misc/ptrace9.sh | 133 ++ tools/test/stress2/misc/pts.sh | 154 +++ tools/test/stress2/misc/pts2.sh | 79 ++ tools/test/stress2/misc/pts3.sh | 102 ++ tools/test/stress2/misc/pty.sh | 161 +++ tools/test/stress2/misc/pty2.sh | 101 ++ tools/test/stress2/misc/quota1.sh | 57 + tools/test/stress2/misc/quota10.sh | 105 ++ tools/test/stress2/misc/quota11.sh | 67 ++ tools/test/stress2/misc/quota12.sh | 80 ++ tools/test/stress2/misc/quota2.sh | 57 + tools/test/stress2/misc/quota3.sh | 57 + tools/test/stress2/misc/quota4.sh | 65 + tools/test/stress2/misc/quota5.sh | 44 + tools/test/stress2/misc/quota6.sh | 69 ++ tools/test/stress2/misc/quota7.sh | 79 ++ tools/test/stress2/misc/quota8.sh | 89 ++ tools/test/stress2/misc/quota9.sh | 93 ++ tools/test/stress2/misc/r335171.sh | 158 +++ tools/test/stress2/misc/racct.sh | 57 + tools/test/stress2/misc/radix.sh | 271 +++++ tools/test/stress2/misc/random.sh | 37 + tools/test/stress2/misc/rdgsbase.sh | 182 +++ tools/test/stress2/misc/rdwr.sh | 118 ++ tools/test/stress2/misc/readdir.sh | 179 +++ tools/test/stress2/misc/recursiveflushes.sh | 75 ++ tools/test/stress2/misc/rename.sh | 130 ++ tools/test/stress2/misc/rename10.sh | 184 +++ tools/test/stress2/misc/rename11.sh | 139 +++ tools/test/stress2/misc/rename12.sh | 192 +++ tools/test/stress2/misc/rename13.sh | 60 + tools/test/stress2/misc/rename14.sh | 198 +++ tools/test/stress2/misc/rename15.sh | 82 ++ tools/test/stress2/misc/rename2.sh | 103 ++ tools/test/stress2/misc/rename3.sh | 51 + tools/test/stress2/misc/rename4.sh | 62 + tools/test/stress2/misc/rename5.sh | 137 +++ tools/test/stress2/misc/rename6.sh | 149 +++ tools/test/stress2/misc/rename7.sh | 150 +++ tools/test/stress2/misc/rename8.sh | 173 +++ tools/test/stress2/misc/rename9.sh | 169 +++ tools/test/stress2/misc/revoke.sh | 116 ++ tools/test/stress2/misc/rot.sh | 142 +++ tools/test/stress2/misc/routetbl.sh | 61 + tools/test/stress2/misc/ruby.sh | 38 + tools/test/stress2/misc/rw.sh | 65 + tools/test/stress2/misc/rwlock_ronly.sh | 82 ++ tools/test/stress2/misc/sched.sh | 161 +++ tools/test/stress2/misc/schedfuzz.sh | 79 ++ tools/test/stress2/misc/sctp.sh | 158 +++ tools/test/stress2/misc/sctp2.sh | 169 +++ tools/test/stress2/misc/sctp3.sh | 172 +++ tools/test/stress2/misc/seekdir.sh | 157 +++ tools/test/stress2/misc/segnp.sh | 57 + tools/test/stress2/misc/segregs.sh | 144 +++ tools/test/stress2/misc/select.sh | 168 +++ tools/test/stress2/misc/select3.sh | 39 + tools/test/stress2/misc/selfd.sh | 152 +++ tools/test/stress2/misc/sem.sh | 142 +++ tools/test/stress2/misc/sem_post.sh | 107 ++ tools/test/stress2/misc/sem_timedwait.sh | 161 +++ tools/test/stress2/misc/sem_wait.sh | 109 ++ tools/test/stress2/misc/sendfile.sh | 213 ++++ tools/test/stress2/misc/sendfile10.sh | 313 +++++ tools/test/stress2/misc/sendfile11.sh | 235 ++++ tools/test/stress2/misc/sendfile12.sh | 241 ++++ tools/test/stress2/misc/sendfile13.sh | 371 ++++++ tools/test/stress2/misc/sendfile14.sh | 382 ++++++ tools/test/stress2/misc/sendfile15.sh | 218 ++++ tools/test/stress2/misc/sendfile16.sh | 224 ++++ tools/test/stress2/misc/sendfile17.sh | 225 ++++ tools/test/stress2/misc/sendfile18.sh | 125 ++ tools/test/stress2/misc/sendfile19.sh | 246 ++++ tools/test/stress2/misc/sendfile2.sh | 142 +++ tools/test/stress2/misc/sendfile20.sh | 247 ++++ tools/test/stress2/misc/sendfile21.sh | 243 ++++ tools/test/stress2/misc/sendfile22.sh | 282 +++++ tools/test/stress2/misc/sendfile23.sh | 207 ++++ tools/test/stress2/misc/sendfile24.sh | 235 ++++ tools/test/stress2/misc/sendfile25.sh | 237 ++++ tools/test/stress2/misc/sendfile26.sh | 308 +++++ tools/test/stress2/misc/sendfile3.sh | 210 ++++ tools/test/stress2/misc/sendfile4.sh | 141 +++ tools/test/stress2/misc/sendfile5.sh | 165 +++ tools/test/stress2/misc/sendfile6.sh | 255 ++++ tools/test/stress2/misc/sendfile7.sh | 42 + tools/test/stress2/misc/sendfile8.sh | 267 ++++ tools/test/stress2/misc/sendfile9.sh | 266 ++++ tools/test/stress2/misc/sendfile_shm.sh | 200 +++ tools/test/stress2/misc/sendmsg.sh | 224 ++++ tools/test/stress2/misc/sendmsg2.sh | 142 +++ tools/test/stress2/misc/sethostname.sh | 36 + tools/test/stress2/misc/setsockopt.sh | 152 +++ tools/test/stress2/misc/setsockopt2.sh | 208 ++++ tools/test/stress2/misc/setuid.sh | 122 ++ tools/test/stress2/misc/shm.sh | 201 ++++ tools/test/stress2/misc/shm2.sh | 167 +++ tools/test/stress2/misc/shm_open.sh | 85 ++ tools/test/stress2/misc/shm_super.sh | 87 ++ tools/test/stress2/misc/sigaltstack.sh | 128 ++ tools/test/stress2/misc/sigfastblock.sh | 141 +++ tools/test/stress2/misc/sigfastblock2.sh | 132 ++ tools/test/stress2/misc/signal.sh | 247 ++++ tools/test/stress2/misc/signal0.sh | 102 ++ tools/test/stress2/misc/sigreturn.sh | 121 ++ tools/test/stress2/misc/sigstop.sh | 98 ++ tools/test/stress2/misc/sigstop2.sh | 144 +++ tools/test/stress2/misc/sigxcpu.sh | 155 +++ tools/test/stress2/misc/smrstress.sh | 56 + tools/test/stress2/misc/smrstress2.sh | 80 ++ tools/test/stress2/misc/snap.sh | 55 + tools/test/stress2/misc/snap10.sh | 68 ++ tools/test/stress2/misc/snap11.sh | 87 ++ tools/test/stress2/misc/snap12.sh | 72 ++ tools/test/stress2/misc/snap2-1.sh | 60 + tools/test/stress2/misc/snap2.sh | 60 + tools/test/stress2/misc/snap3.sh | 64 + tools/test/stress2/misc/snap4.sh | 57 + tools/test/stress2/misc/snap5-1.sh | 61 + tools/test/stress2/misc/snap5.sh | 55 + tools/test/stress2/misc/snap6.sh | 48 + tools/test/stress2/misc/snap7.sh | 59 + tools/test/stress2/misc/snap8.sh | 92 ++ tools/test/stress2/misc/snap9.sh | 62 + tools/test/stress2/misc/sndstat.sh | 138 +++ tools/test/stress2/misc/socketpair.sh | 104 ++ tools/test/stress2/misc/socketpair2.sh | 273 +++++ tools/test/stress2/misc/socketpair3.sh | 144 +++ tools/test/stress2/misc/socketpair4.sh | 207 ++++ tools/test/stress2/misc/softupdate.sh | 58 + tools/test/stress2/misc/sort.sh | 50 + tools/test/stress2/misc/sort2.sh | 52 + tools/test/stress2/misc/sparse.sh | 74 ++ tools/test/stress2/misc/spin.sh | 124 ++ tools/test/stress2/misc/split.sh | 99 ++ tools/test/stress2/misc/stack_guard_page.sh | 50 + tools/test/stress2/misc/statfs.sh | 126 ++ tools/test/stress2/misc/stealer.sh | 133 ++ tools/test/stress2/misc/su.sh | 54 + tools/test/stress2/misc/suj.sh | 52 + tools/test/stress2/misc/suj10.sh | 180 +++ tools/test/stress2/misc/suj11.sh | 58 + tools/test/stress2/misc/suj12.sh | 60 + tools/test/stress2/misc/suj13.sh | 60 + tools/test/stress2/misc/suj14.sh | 56 + tools/test/stress2/misc/suj15.sh | 66 + tools/test/stress2/misc/suj16.sh | 82 ++ tools/test/stress2/misc/suj17.sh | 136 +++ tools/test/stress2/misc/suj18.sh | 68 ++ tools/test/stress2/misc/suj19.sh | 77 ++ tools/test/stress2/misc/suj2.sh | 78 ++ tools/test/stress2/misc/suj20.sh | 177 +++ tools/test/stress2/misc/suj21.sh | 178 +++ tools/test/stress2/misc/suj22.sh | 195 +++ tools/test/stress2/misc/suj23.sh | 440 +++++++ tools/test/stress2/misc/suj24.sh | 52 + tools/test/stress2/misc/suj25.sh | 67 ++ tools/test/stress2/misc/suj26.sh | 85 ++ tools/test/stress2/misc/suj27.sh | 84 ++ tools/test/stress2/misc/suj28.sh | 87 ++ tools/test/stress2/misc/suj29.sh | 74 ++ tools/test/stress2/misc/suj3.sh | 64 + tools/test/stress2/misc/suj30.sh | 278 +++++ tools/test/stress2/misc/suj31.sh | 65 + tools/test/stress2/misc/suj32.sh | 92 ++ tools/test/stress2/misc/suj33.sh | 66 + tools/test/stress2/misc/suj34.sh | 61 + tools/test/stress2/misc/suj35.sh | 61 + tools/test/stress2/misc/suj4.sh | 56 + tools/test/stress2/misc/suj5.sh | 180 +++ tools/test/stress2/misc/suj6.sh | 183 +++ tools/test/stress2/misc/suj7.sh | 60 + tools/test/stress2/misc/suj8.sh | 61 + tools/test/stress2/misc/suj9.sh | 64 + tools/test/stress2/misc/swap.sh | 157 +++ tools/test/stress2/misc/swap2.sh | 176 +++ tools/test/stress2/misc/swap3.sh | 38 + tools/test/stress2/misc/swap4.sh | 152 +++ tools/test/stress2/misc/swap5.sh | 50 + tools/test/stress2/misc/swap6.sh | 52 + tools/test/stress2/misc/swapoff.sh | 69 ++ tools/test/stress2/misc/swapoff2.sh | 76 ++ tools/test/stress2/misc/swapoff3.sh | 144 +++ tools/test/stress2/misc/swapoff4.sh | 82 ++ tools/test/stress2/misc/swapoff5.sh | 182 +++ tools/test/stress2/misc/swappedout.sh | 52 + tools/test/stress2/misc/symlink.sh | 128 ++ tools/test/stress2/misc/symlink2.sh | 121 ++ tools/test/stress2/misc/symlink3.sh | 69 ++ tools/test/stress2/misc/symlink4.sh | 125 ++ tools/test/stress2/misc/symlink5.sh | 137 +++ tools/test/stress2/misc/syscall4.sh | 386 ++++++ tools/test/stress2/misc/syscall5.sh | 99 ++ tools/test/stress2/misc/syscall6.sh | 46 + tools/test/stress2/misc/sysctl.sh | 44 + tools/test/stress2/misc/sysctl2.sh | 43 + tools/test/stress2/misc/sysctl3.sh | 56 + tools/test/stress2/misc/sysctl4.sh | 54 + tools/test/stress2/misc/systrace.sh | 62 + tools/test/stress2/misc/systrace2.sh | 48 + tools/test/stress2/misc/syzkaller1.sh | 246 ++++ tools/test/stress2/misc/syzkaller10.sh | 93 ++ tools/test/stress2/misc/syzkaller11.sh | 299 +++++ tools/test/stress2/misc/syzkaller12.sh | 176 +++ tools/test/stress2/misc/syzkaller13.sh | 249 ++++ tools/test/stress2/misc/syzkaller14.sh | 295 +++++ tools/test/stress2/misc/syzkaller15.sh | 190 +++ tools/test/stress2/misc/syzkaller16.sh | 417 +++++++ tools/test/stress2/misc/syzkaller17.sh | 131 ++ tools/test/stress2/misc/syzkaller18.sh | 128 ++ tools/test/stress2/misc/syzkaller19.sh | 171 +++ tools/test/stress2/misc/syzkaller2.sh | 89 ++ tools/test/stress2/misc/syzkaller20.sh | 108 ++ tools/test/stress2/misc/syzkaller21.sh | 403 +++++++ tools/test/stress2/misc/syzkaller22.sh | 69 ++ tools/test/stress2/misc/syzkaller23.sh | 400 ++++++ tools/test/stress2/misc/syzkaller24.sh | 133 ++ tools/test/stress2/misc/syzkaller25.sh | 476 ++++++++ tools/test/stress2/misc/syzkaller26.sh | 166 +++ tools/test/stress2/misc/syzkaller27.sh | 150 +++ tools/test/stress2/misc/syzkaller28.sh | 356 ++++++ tools/test/stress2/misc/syzkaller29.sh | 128 ++ tools/test/stress2/misc/syzkaller3.sh | 49 + tools/test/stress2/misc/syzkaller30.sh | 67 ++ tools/test/stress2/misc/syzkaller4.sh | 382 ++++++ tools/test/stress2/misc/syzkaller5.sh | 83 ++ tools/test/stress2/misc/syzkaller6.sh | 84 ++ tools/test/stress2/misc/syzkaller7.sh | 161 +++ tools/test/stress2/misc/syzkaller8.sh | 111 ++ tools/test/stress2/misc/syzkaller9.sh | 102 ++ tools/test/stress2/misc/tar.sh | 132 ++ tools/test/stress2/misc/tcp.sh | 59 + tools/test/stress2/misc/tcp2.sh | 62 + tools/test/stress2/misc/tcp3.sh | 288 +++++ tools/test/stress2/misc/tcp4.sh | 249 ++++ tools/test/stress2/misc/temp.sh | 167 +++ tools/test/stress2/misc/thr.sh | 99 ++ tools/test/stress2/misc/thr2.sh | 42 + tools/test/stress2/misc/thr3.sh | 104 ++ tools/test/stress2/misc/timeout.sh | 51 + tools/test/stress2/misc/tmpfs.sh | 48 + tools/test/stress2/misc/tmpfs10.sh | 155 +++ tools/test/stress2/misc/tmpfs11.sh | 81 ++ tools/test/stress2/misc/tmpfs12.sh | 95 ++ tools/test/stress2/misc/tmpfs13.sh | 95 ++ tools/test/stress2/misc/tmpfs14.sh | 112 ++ tools/test/stress2/misc/tmpfs15.sh | 48 + tools/test/stress2/misc/tmpfs16.sh | 200 +++ tools/test/stress2/misc/tmpfs17.sh | 144 +++ tools/test/stress2/misc/tmpfs18.sh | 58 + tools/test/stress2/misc/tmpfs19.sh | 56 + tools/test/stress2/misc/tmpfs2.sh | 64 + tools/test/stress2/misc/tmpfs20.sh | 60 + tools/test/stress2/misc/tmpfs21.sh | 59 + tools/test/stress2/misc/tmpfs22.sh | 117 ++ tools/test/stress2/misc/tmpfs23.sh | 52 + tools/test/stress2/misc/tmpfs3.sh | 45 + tools/test/stress2/misc/tmpfs4.sh | 46 + tools/test/stress2/misc/tmpfs5.sh | 53 + tools/test/stress2/misc/tmpfs6.sh | 110 ++ tools/test/stress2/misc/tmpfs7.sh | 249 ++++ tools/test/stress2/misc/tmpfs8.sh | 178 +++ tools/test/stress2/misc/tmpfs9.sh | 110 ++ tools/test/stress2/misc/trim.sh | 72 ++ tools/test/stress2/misc/trim2.sh | 59 + tools/test/stress2/misc/trim3.sh | 71 ++ tools/test/stress2/misc/trim4.sh | 68 ++ tools/test/stress2/misc/trim5.sh | 49 + tools/test/stress2/misc/trim6.sh | 57 + tools/test/stress2/misc/trim7.sh | 62 + tools/test/stress2/misc/trim8.sh | 62 + tools/test/stress2/misc/truncate.sh | 99 ++ tools/test/stress2/misc/truncate2.sh | 99 ++ tools/test/stress2/misc/truncate3.sh | 119 ++ tools/test/stress2/misc/truncate4.sh | 54 + tools/test/stress2/misc/truncate5.sh | 105 ++ tools/test/stress2/misc/truncate6.sh | 122 ++ tools/test/stress2/misc/truncate7.sh | 124 ++ tools/test/stress2/misc/truncate8.sh | 212 ++++ tools/test/stress2/misc/truncate9.sh | 119 ++ tools/test/stress2/misc/truss.sh | 129 ++ tools/test/stress2/misc/truss3.sh | 36 + tools/test/stress2/misc/tvnlru.sh | 251 ++++ tools/test/stress2/misc/udp.sh | 48 + tools/test/stress2/misc/udp2.sh | 57 + tools/test/stress2/misc/ufsbench.sh | 58 + tools/test/stress2/misc/ufssuspend.sh | 131 ++ tools/test/stress2/misc/uma_zalloc_arg.sh | 302 +++++ tools/test/stress2/misc/umount.sh | 50 + tools/test/stress2/misc/umount2.sh | 90 ++ tools/test/stress2/misc/umount3.sh | 66 + tools/test/stress2/misc/umount4.sh | 71 ++ tools/test/stress2/misc/umountf.sh | 69 ++ tools/test/stress2/misc/umountf10.sh | 133 ++ tools/test/stress2/misc/umountf11.sh | 50 + tools/test/stress2/misc/umountf12.sh | 68 ++ tools/test/stress2/misc/umountf2.sh | 1273 ++++++++++++++++++++ tools/test/stress2/misc/umountf3.sh | 118 ++ tools/test/stress2/misc/umountf4.sh | 85 ++ tools/test/stress2/misc/umountf5.sh | 69 ++ tools/test/stress2/misc/umountf6.sh | 85 ++ tools/test/stress2/misc/umountf7.sh | 168 +++ tools/test/stress2/misc/umountf8.sh | 42 + tools/test/stress2/misc/umountf9.sh | 45 + tools/test/stress2/misc/umtx_suspend.sh | 88 ++ tools/test/stress2/misc/union.sh | 65 + tools/test/stress2/misc/unionfs.sh | 52 + tools/test/stress2/misc/unionfs2.sh | 46 + tools/test/stress2/misc/unionfs3.sh | 52 + tools/test/stress2/misc/unix_socket.sh | 161 +++ tools/test/stress2/misc/unix_socket_detach.sh | 124 ++ tools/test/stress2/misc/unix_socket_detach2.sh | 157 +++ tools/test/stress2/misc/unlink.sh | 69 ++ tools/test/stress2/misc/vfork.sh | 131 ++ tools/test/stress2/misc/vm_fault_dontneed.sh | 99 ++ tools/test/stress2/misc/vm_map.sh | 117 ++ tools/test/stress2/misc/vm_reserv_populate.sh | 278 +++++ tools/test/stress2/misc/vmio.sh | 56 + tools/test/stress2/misc/vmstat.sh | 47 + tools/test/stress2/misc/vmstat2.sh | 41 + tools/test/stress2/misc/vmtotal.sh | 42 + tools/test/stress2/misc/vnodes.sh | 87 ++ tools/test/stress2/misc/vunref.sh | 212 ++++ tools/test/stress2/misc/vunref2.sh | 72 ++ tools/test/stress2/misc/watchman.sh | 43 + tools/test/stress2/misc/wire_no_page.sh | 104 ++ tools/test/stress2/misc/write.sh | 231 ++++ tools/test/stress2/misc/zfs.sh | 68 ++ tools/test/stress2/misc/zfs10.sh | 142 +++ tools/test/stress2/misc/zfs11.sh | 77 ++ tools/test/stress2/misc/zfs2.sh | 71 ++ tools/test/stress2/misc/zfs3.sh | 83 ++ tools/test/stress2/misc/zfs4.sh | 91 ++ tools/test/stress2/misc/zfs5.sh | 71 ++ tools/test/stress2/misc/zfs6.sh | 80 ++ tools/test/stress2/misc/zfs7.sh | 72 ++ tools/test/stress2/misc/zfs8.sh | 73 ++ tools/test/stress2/misc/zfs9.sh | 73 ++ tools/test/stress2/misc/zz-combo01.sh | 44 + tools/test/stress2/misc/zz-combo02.sh | 34 + tools/test/stress2/misc/zz-combo03.sh | 39 + tools/test/stress2/misc/zz-combo04.sh | 37 + tools/test/stress2/misc/zzbuildworld.sh | 54 + tools/test/stress2/mkdir.cfg | 9 + tools/test/stress2/mkfifo.cfg | 8 + tools/test/stress2/norw.cfg | 6 + tools/test/stress2/noswap.cfg | 6 + tools/test/stress2/pty.cfg | 8 + tools/test/stress2/run.sh | 84 ++ tools/test/stress2/rw.cfg | 8 + tools/test/stress2/syscall.cfg | 11 + tools/test/stress2/sysctl.cfg | 12 + tools/test/stress2/testcases/Makefile | 28 + tools/test/stress2/testcases/Makefile.inc | 6 + tools/test/stress2/testcases/README | 9 + tools/test/stress2/testcases/badcode/Makefile | 3 + tools/test/stress2/testcases/badcode/badcode.c | 133 ++ tools/test/stress2/testcases/creat/Makefile | 3 + tools/test/stress2/testcases/creat/creat.c | 136 +++ tools/test/stress2/testcases/dirnprename/Makefile | 3 + .../stress2/testcases/dirnprename/dirnprename.c | 172 +++ tools/test/stress2/testcases/dirrename/Makefile | 3 + tools/test/stress2/testcases/dirrename/dirrename.c | 144 +++ tools/test/stress2/testcases/fts/Makefile | 3 + tools/test/stress2/testcases/fts/fts.c | 102 ++ tools/test/stress2/testcases/link/Makefile | 3 + tools/test/stress2/testcases/link/link.c | 144 +++ tools/test/stress2/testcases/lockf/Makefile | 3 + tools/test/stress2/testcases/lockf/lockf.c | 184 +++ tools/test/stress2/testcases/lockf2/Makefile | 3 + tools/test/stress2/testcases/lockf2/lockf2.c | 130 ++ tools/test/stress2/testcases/mkdir/Makefile | 3 + tools/test/stress2/testcases/mkdir/mkdir.c | 135 +++ tools/test/stress2/testcases/mkfifo/Makefile | 4 + tools/test/stress2/testcases/mkfifo/mkfifo.c | 183 +++ tools/test/stress2/testcases/mmap/Makefile | 3 + tools/test/stress2/testcases/mmap/mmap.c | 148 +++ tools/test/stress2/testcases/openat/Makefile | 3 + tools/test/stress2/testcases/openat/doat.c | 688 +++++++++++ tools/test/stress2/testcases/openat/openat.c | 187 +++ tools/test/stress2/testcases/pty/Makefile | 4 + tools/test/stress2/testcases/pty/pty.c | 111 ++ tools/test/stress2/testcases/rename/Makefile | 3 + tools/test/stress2/testcases/rename/rename.c | 134 +++ tools/test/stress2/testcases/run/Makefile | 3 + tools/test/stress2/testcases/run/run.c | 117 ++ tools/test/stress2/testcases/rw/Makefile | 3 + tools/test/stress2/testcases/rw/rw.c | 180 +++ tools/test/stress2/testcases/shm/Makefile | 4 + tools/test/stress2/testcases/shm/shm.c | 182 +++ tools/test/stress2/testcases/socket/Makefile | 3 + tools/test/stress2/testcases/socket/socket.c | 118 ++ tools/test/stress2/testcases/swap/Makefile | 3 + tools/test/stress2/testcases/swap/swap.c | 166 +++ tools/test/stress2/testcases/symlink/Makefile | 3 + tools/test/stress2/testcases/symlink/symlink.c | 138 +++ tools/test/stress2/testcases/sysctl/Makefile | 3 + tools/test/stress2/testcases/sysctl/sysctl.c | 63 + tools/test/stress2/testcases/tcp/Makefile | 3 + tools/test/stress2/testcases/tcp/tcp.c | 188 +++ tools/test/stress2/testcases/thr1/Makefile | 5 + tools/test/stress2/testcases/thr1/thr1.c | 75 ++ tools/test/stress2/testcases/thr2/Makefile | 5 + tools/test/stress2/testcases/thr2/thr2.c | 93 ++ tools/test/stress2/testcases/udp/Makefile | 3 + tools/test/stress2/testcases/udp/udp.c | 112 ++ tools/test/stress2/tools/bench.c | 356 ++++++ tools/test/stress2/tools/calc_mem_use.pl | 61 + tools/test/stress2/tools/df.sh | 42 + tools/test/stress2/tools/fail.sh | 74 ++ tools/test/stress2/tools/fast.sh | 59 + tools/test/stress2/tools/flip.c | 121 ++ tools/test/stress2/tools/freeze.sh | 42 + tools/test/stress2/tools/freeze2.sh | 43 + tools/test/stress2/tools/fstool.c | 236 ++++ tools/test/stress2/tools/iwatch.sh | 47 + tools/test/stress2/tools/killall.sh | 50 + tools/test/stress2/tools/kldload.sh | 71 ++ tools/test/stress2/tools/leaks.sh | 112 ++ tools/test/stress2/tools/leaks2.sh | 113 ++ tools/test/stress2/tools/maxvnodes.sh | 43 + tools/test/stress2/tools/ministat.sh | 52 + tools/test/stress2/tools/monitor.sh | 40 + tools/test/stress2/tools/ps.sh | 50 + tools/test/stress2/tools/ptsleak.sh | 39 + tools/test/stress2/tools/ptyleak.sh | 40 + tools/test/stress2/tools/rwatch.sh | 57 + tools/test/stress2/tools/setup.sh | 45 + tools/test/stress2/tools/shuffle | 47 + tools/test/stress2/tools/splitall.sh | 60 + tools/test/stress2/tools/swap.c | 225 ++++ tools/test/stress2/tools/uleak.sh | 71 ++ tools/test/stress2/tools/vmstat.sh | 113 ++ tools/test/stress2/udp.cfg | 9 + tools/test/stress2/vfs.cfg | 8 + 968 files changed, 111344 insertions(+) diff --git a/tools/test/README b/tools/test/README index 2bafa48a9764..5512fd5203ba 100644 --- a/tools/test/README *** 117149 LINES SKIPPED *** From owner-dev-commits-src-main@freebsd.org Wed Mar 3 14:13:30 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5D13456BB66; Wed, 3 Mar 2021 14:13:30 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DrGF40bKHz3pFk; Wed, 3 Mar 2021 14:13:28 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from comporellon.tachypleus.net (unknown [IPv6:2601:405:4a00:acd:cc7b:682b:f804:9afd]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: nwhitehorn/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 83FF2217FA; Wed, 3 Mar 2021 14:13:26 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Subject: Re: git: 2c26d77d989a - main - Remove /boot/efi from mtree, missed in 0b7472b3d8d2. To: Brandon Bergren , rgrimes@FreeBSD.org Cc: Ed Maste , Warner Losh , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@FreeBSD.org References: <202103031253.123CrxKG051357@gndrsh.dnsmgr.net> <14d09680-1036-4a7e-8a0e-c3063cac8bc9@www.fastmail.com> From: Nathan Whitehorn Message-ID: Date: Wed, 3 Mar 2021 09:13:25 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: <14d09680-1036-4a7e-8a0e-c3063cac8bc9@www.fastmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 14:13:30 -0000 On 3/3/21 9:05 AM, Brandon Bergren wrote: > On Wed, Mar 3, 2021, at 6:53 AM, Rodney W. Grimes wrote: >> What am I missing here? One place I am being told this is run in >> an environment that may not even be an EFI booted system, and in >> another place it is being used as a test if something is mounted >> on it, which should only be true on an EFI booted system. > That the script in question is a generic script that runs as part of bsdinstall on every platform and has to be universal. > > The actual *problem* here is that usr.sbin/bsdinstall/scripts/bootconfig has a default case that is > *) die "Unsupported arch $(uname -m) for UEFI install" > > which then causes the main script to bail out, leaving the system in a half-installed state. > > If that had just been an exit 0 this would have never been a problem, I suppose. > > Before the original change that broke this, there was a check that the script was not running on powerpc or mips platforms before running the efi bits, but this got taken out. > Well, incidentally. The bootconfig script needs to know if there is an ESP it should configure, but the signalling mechanism (the presence of the ESP mount point) was being broken by mtree making that directory unconditionally even on systems that don't use EFI. So then bootconfig tried to set it up, but failed later on, because there was no EFI loader to set up. The mtree change makes the ESP mount point only exist on systems with an ESP. -Nathan From owner-dev-commits-src-main@freebsd.org Wed Mar 3 14:26:48 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D219656C27A; Wed, 3 Mar 2021 14:26:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DrGXS5c8Xz3q8m; Wed, 3 Mar 2021 14:26:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B32763301; Wed, 3 Mar 2021 14:26:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 123EQmvH082876; Wed, 3 Mar 2021 14:26:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 123EQmU4082875; Wed, 3 Mar 2021 14:26:48 GMT (envelope-from git) Date: Wed, 3 Mar 2021 14:26:48 GMT Message-Id: <202103031426.123EQmU4082875@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: c8db60c0673d - main - Split out the loader efifb setup to a new function MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c8db60c0673d4bb7a3a3e2c043804e1ed1108c2f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 14:26:48 -0000 The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=c8db60c0673d4bb7a3a3e2c043804e1ed1108c2f commit c8db60c0673d4bb7a3a3e2c043804e1ed1108c2f Author: Andrew Turner AuthorDate: 2021-02-26 11:47:34 +0000 Commit: Andrew Turner CommitDate: 2021-03-03 14:18:02 +0000 Split out the loader efifb setup to a new function This makes bi_load_efi_data cleaner to add common acpi setup code. Reviewed by: imp, tsoome Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D28936 --- stand/efi/loader/bootinfo.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/stand/efi/loader/bootinfo.c b/stand/efi/loader/bootinfo.c index 9924901d29e6..327751e32f0b 100644 --- a/stand/efi/loader/bootinfo.c +++ b/stand/efi/loader/bootinfo.c @@ -299,6 +299,9 @@ bi_load_efi_data(struct preloaded_file *kfp, bool exit_bs) bool do_vmap; #if defined(__amd64__) || defined(__aarch64__) +static void +bi_load_efifb(struct preloaded_file *kfp) +{ struct efi_fb efifb; efifb.fb_addr = gfx_state.tg_fb.fb_addr; @@ -321,6 +324,25 @@ bi_load_efi_data(struct preloaded_file *kfp, bool exit_bs) if (efifb.fb_addr != 0) file_addmetadata(kfp, MODINFOMD_EFI_FB, sizeof(efifb), &efifb); +} +#endif + +static int +bi_load_efi_data(struct preloaded_file *kfp, bool exit_bs) +{ + EFI_MEMORY_DESCRIPTOR *mm; + EFI_PHYSICAL_ADDRESS addr = 0; + EFI_STATUS status; + const char *efi_novmap; + size_t efisz; + UINTN efi_mapkey; + UINTN dsz, pages, retry, sz; + UINT32 mmver; + struct efi_map_header *efihdr; + bool do_vmap; + +#if defined(__amd64__) || defined(__aarch64__) + bi_load_efifb(kfp); #endif do_vmap = true; From owner-dev-commits-src-main@freebsd.org Wed Mar 3 14:26:50 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 081E356BEF5; Wed, 3 Mar 2021 14:26:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DrGXT6rhKz3qHg; Wed, 3 Mar 2021 14:26:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DE86D324D; Wed, 3 Mar 2021 14:26:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 123EQnLc082899; Wed, 3 Mar 2021 14:26:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 123EQnRg082898; Wed, 3 Mar 2021 14:26:49 GMT (envelope-from git) Date: Wed, 3 Mar 2021 14:26:49 GMT Message-Id: <202103031426.123EQnRg082898@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 48ba9b2669e6 - main - Use L2 blocks when in the identity map MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 48ba9b2669e6a92a3254ec34461d0d86fb20b9f4 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 14:26:50 -0000 The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=48ba9b2669e6a92a3254ec34461d0d86fb20b9f4 commit 48ba9b2669e6a92a3254ec34461d0d86fb20b9f4 Author: Andrew Turner AuthorDate: 2020-12-24 11:02:34 +0000 Commit: Andrew Turner CommitDate: 2021-03-03 14:18:03 +0000 Use L2 blocks when in the identity map This reduces the memory mapped to be closer to the minimal memory needed to enable the MMU. Reviewed by: mmel Sponsored by: Innovate UK Differential Revision:://reviews.freebsd.org/D27765 --- sys/arm64/arm64/locore.S | 101 ++++++++++++++++++-------------------------- sys/arm64/include/machdep.h | 8 ++++ sys/conf/options.arm64 | 1 - 3 files changed, 49 insertions(+), 61 deletions(-) diff --git a/sys/arm64/arm64/locore.S b/sys/arm64/arm64/locore.S index b340041eb163..4d356e8897f0 100644 --- a/sys/arm64/arm64/locore.S +++ b/sys/arm64/arm64/locore.S @@ -466,35 +466,58 @@ common: add x27, x24, #PAGE_SIZE mov x6, x27 /* The initial page table */ -#if defined(SOCDEV_PA) && defined(SOCDEV_VA) + + /* Create the VA = PA map */ + mov x7, #(ATTR_S1_nG | ATTR_S1_IDX(VM_MEMATTR_WRITE_BACK)) + adrp x16, _start + and x16, x16, #(~L2_OFFSET) + mov x9, x16 /* PA start */ + mov x8, x16 /* VA start (== PA start) */ + mov x10, #1 + bl build_l2_block_pagetable + +#if defined(SOCDEV_PA) /* Create a table for the UART */ mov x7, #(ATTR_S1_nG | ATTR_S1_IDX(VM_MEMATTR_DEVICE)) - mov x8, #(SOCDEV_VA) /* VA start */ - mov x9, #(SOCDEV_PA) /* PA start */ + add x16, x16, #(L2_SIZE) /* VA start */ + mov x8, x16 + + /* Store the socdev virtual address */ + add x17, x8, #(SOCDEV_PA & L2_OFFSET) + adrp x9, socdev_va + str x17, [x9, :lo12:socdev_va] + + mov x9, #(SOCDEV_PA & ~L2_OFFSET) /* PA start */ mov x10, #1 - bl build_l1_block_pagetable + bl build_l2_block_pagetable #endif #if defined(LINUX_BOOT_ABI) /* Map FDT data ? */ cbz x19, 1f - /* Create the identity mapping for FDT data (2 MiB max) */ + /* Create the mapping for FDT data (2 MiB max) */ mov x7, #(ATTR_S1_nG | ATTR_S1_IDX(VM_MEMATTR_WRITE_BACK)) - mov x9, x0 - mov x8, x0 /* VA start (== PA start) */ + add x16, x16, #(L2_SIZE) /* VA start */ + mov x8, x16 + mov x9, x0 /* PA start */ + /* Update the module pointer to point at the allocated memory */ + and x0, x0, #(L2_OFFSET) /* Keep the lower bits */ + add x0, x0, x8 /* Add the aligned virtual address */ + mov x10, #1 - bl build_l1_block_pagetable + bl build_l2_block_pagetable 1: #endif - /* Create the VA = PA map */ - mov x7, #(ATTR_S1_nG | ATTR_S1_IDX(VM_MEMATTR_WRITE_BACK)) - mov x9, x28 - mov x8, x9 /* VA start (== PA start) */ - mov x10, #1 - bl build_l1_block_pagetable + /* Move to the l1 table */ + add x27, x27, #PAGE_SIZE + + /* Link the l1 -> l2 table */ + mov x9, x6 + mov x6, x27 + bl link_l1_pagetable /* Move to the l0 table */ add x27, x27, #PAGE_SIZE @@ -513,13 +536,10 @@ LEND(create_pagetables) /* * Builds an L0 -> L1 table descriptor * - * This is a link for a 512GiB block of memory with up to 1GiB regions mapped - * within it by build_l1_block_pagetable. - * * x6 = L0 table * x8 = Virtual Address * x9 = L1 PA (trashed) - * x10 = Entry count + * x10 = Entry count (trashed) * x11, x12 and x13 are trashed */ LENTRY(link_l0_pagetable) @@ -551,9 +571,6 @@ LEND(link_l0_pagetable) /* * Builds an L1 -> L2 table descriptor * - * This is a link for a 1GiB block of memory with up to 2MiB regions mapped - * within it by build_l2_block_pagetable. - * * x6 = L1 table * x8 = Virtual Address * x9 = L2 PA (trashed) @@ -580,51 +597,13 @@ LENTRY(link_l1_pagetable) ret LEND(link_l1_pagetable) -/* - * Builds count 1 GiB page table entry - * x6 = L1 table - * x7 = Variable lower block attributes - * x8 = VA start - * x9 = PA start (trashed) - * x10 = Entry count - * x11, x12 and x13 are trashed - */ -LENTRY(build_l1_block_pagetable) - /* - * Build the L1 table entry. - */ - /* Find the table index */ - lsr x11, x8, #L1_SHIFT - and x11, x11, #Ln_ADDR_MASK - - /* Build the L1 block entry */ - orr x12, x7, #L1_BLOCK - orr x12, x12, #(ATTR_DEFAULT) - - /* Only use the output address bits */ - lsr x9, x9, #L1_SHIFT - - /* Set the physical address for this virtual address */ -1: orr x13, x12, x9, lsl #L1_SHIFT - - /* Store the entry */ - str x13, [x6, x11, lsl #3] - - sub x10, x10, #1 - add x11, x11, #1 - add x9, x9, #1 - cbnz x10, 1b - - ret -LEND(build_l1_block_pagetable) - /* * Builds count 2 MiB page table entry * x6 = L2 table * x7 = Type (0 = Device, 1 = Normal) * x8 = VA start * x9 = PA start (trashed) - * x10 = Entry count + * x10 = Entry count (trashed) * x11, x12 and x13 are trashed */ LENTRY(build_l2_block_pagetable) @@ -778,6 +757,8 @@ pagetable_l1_ttbr1: .space PAGE_SIZE pagetable_l0_ttbr1: .space PAGE_SIZE +pagetable_l2_ttbr0_bootstrap: + .space PAGE_SIZE pagetable_l1_ttbr0_bootstrap: .space PAGE_SIZE pagetable_l0_ttbr0_boostrap: diff --git a/sys/arm64/include/machdep.h b/sys/arm64/include/machdep.h index 54ffcbd46c81..45ff0065930a 100644 --- a/sys/arm64/include/machdep.h +++ b/sys/arm64/include/machdep.h @@ -60,6 +60,14 @@ void parse_fdt_bootargs(void); int memory_mapping_mode(vm_paddr_t pa); extern void (*pagezero)(void *); +#ifdef SOCDEV_PA +/* + * The virtual address SOCDEV_PA is mapped at. + * Only valid while the early pagetables are valid. + */ +extern uintptr_t socdev_va; +#endif + #endif /* _KERNEL */ #endif /* _MACHINE_MACHDEP_H_ */ diff --git a/sys/conf/options.arm64 b/sys/conf/options.arm64 index 5a97fd6b3ef6..5185a301e55e 100644 --- a/sys/conf/options.arm64 +++ b/sys/conf/options.arm64 @@ -3,7 +3,6 @@ ARM64 opt_global.h INTRNG opt_global.h SOCDEV_PA opt_global.h -SOCDEV_VA opt_global.h THUNDERX_PASS_1_1_ERRATA opt_global.h VFP opt_global.h LINUX_BOOT_ABI opt_global.h From owner-dev-commits-src-main@freebsd.org Wed Mar 3 14:26:52 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6602856C1CD; Wed, 3 Mar 2021 14:26:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DrGXW4GVkz3qFS; Wed, 3 Mar 2021 14:26:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 140582EED; Wed, 3 Mar 2021 14:26:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 123EQo5J082921; Wed, 3 Mar 2021 14:26:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 123EQoM5082920; Wed, 3 Mar 2021 14:26:50 GMT (envelope-from git) Date: Wed, 3 Mar 2021 14:26:50 GMT Message-Id: <202103031426.123EQoM5082920@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 28d945204ea1 - main - Handle functions that use a nop in the arm64 fbt MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 28d945204ea1014d7de6906af8470ed8b3311335 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 14:26:52 -0000 The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=28d945204ea1014d7de6906af8470ed8b3311335 commit 28d945204ea1014d7de6906af8470ed8b3311335 Author: Andrew Turner AuthorDate: 2021-01-13 11:08:19 +0000 Commit: Andrew Turner CommitDate: 2021-03-03 14:18:03 +0000 Handle functions that use a nop in the arm64 fbt To trace leaf asm functions we can insert a single nop instruction as the first instruction in a function and trigger off this. Reviewed by: gnn Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D28132 --- sys/arm64/include/asm.h | 8 +++- .../contrib/opensolaris/uts/common/sys/dtrace.h | 2 + sys/cddl/dev/dtrace/aarch64/dtrace_subr.c | 5 +++ sys/cddl/dev/fbt/aarch64/fbt_isa.c | 51 ++++++++++++++-------- 4 files changed, 46 insertions(+), 20 deletions(-) diff --git a/sys/arm64/include/asm.h b/sys/arm64/include/asm.h index 05e618500e59..32b79d256e80 100644 --- a/sys/arm64/include/asm.h +++ b/sys/arm64/include/asm.h @@ -38,9 +38,15 @@ #define _C_LABEL(x) x +#ifdef KDTRACE_HOOKS +#define DTRACE_NOP nop +#else +#define DTRACE_NOP +#endif + #define LENTRY(sym) \ .text; .align 2; .type sym,#function; sym: \ - .cfi_startproc + .cfi_startproc; DTRACE_NOP #define ENTRY(sym) \ .globl sym; LENTRY(sym) #define EENTRY(sym) \ diff --git a/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h b/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h index 2bedd01cf3e7..f15a971f12be 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h +++ b/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h @@ -2466,6 +2466,8 @@ extern void dtrace_helpers_destroy(proc_t *); #define B_DATA_MASK 0x00ffffff #define B_INSTR 0x14000000 +#define NOP_INSTR 0xd503201f + #define RET_INSTR 0xd65f03c0 #define SUB_MASK 0xffc00000 diff --git a/sys/cddl/dev/dtrace/aarch64/dtrace_subr.c b/sys/cddl/dev/dtrace/aarch64/dtrace_subr.c index 9bf9f0798bb5..58d33511560b 100644 --- a/sys/cddl/dev/dtrace/aarch64/dtrace_subr.c +++ b/sys/cddl/dev/dtrace/aarch64/dtrace_subr.c @@ -314,6 +314,11 @@ dtrace_invop_start(struct trapframe *frame) return (0); } + if (invop == NOP_INSTR) { + frame->tf_elr += INSN_SIZE; + return (0); + } + if ((invop & B_MASK) == B_INSTR) { data = (invop & B_DATA_MASK); /* The data is the number of 4-byte words to change the pc */ diff --git a/sys/cddl/dev/fbt/aarch64/fbt_isa.c b/sys/cddl/dev/fbt/aarch64/fbt_isa.c index f15bc12291d3..12be95ea2217 100644 --- a/sys/cddl/dev/fbt/aarch64/fbt_isa.c +++ b/sys/cddl/dev/fbt/aarch64/fbt_isa.c @@ -110,28 +110,41 @@ fbt_provide_module_function(linker_file_t lf, int symindx, /* Look for stp (pre-indexed) operation */ found = false; - for (; instr < limit; instr++) { - /* Some functions start with "stp xt1, xt2, [xn, ]!" */ - if ((*instr & LDP_STP_MASK) == STP_64) { + /* + * If the first instruction is a nop it's a specially marked + * asm function. We only support a nop first as it's not a normal + * part of the function prologue. + */ + if (*instr == NOP_INSTR) + found = true; + if (!found) { + for (; instr < limit; instr++) { /* - * Assume any other store of this type means we - * are past the function prolog. + * Some functions start with + * "stp xt1, xt2, [xn, ]!" */ - if (((*instr >> ADDR_SHIFT) & ADDR_MASK) == 31) - found = true; - break; - } + if ((*instr & LDP_STP_MASK) == STP_64) { + /* + * Assume any other store of this type means we + * are past the function prolog. + */ + if (((*instr >> ADDR_SHIFT) & ADDR_MASK) == 31) + found = true; + break; + } - /* - * Some functions start with a "sub sp, sp, " - * Sometimes the compiler will have a sub instruction that - * is not of the above type so don't stop if we see one. - */ - if ((*instr & SUB_MASK) == SUB_INSTR && - ((*instr >> SUB_RD_SHIFT) & SUB_R_MASK) == 31 && - ((*instr >> SUB_RN_SHIFT) & SUB_R_MASK) == 31) { - found = true; - break; + /* + * Some functions start with a "sub sp, sp, " + * Sometimes the compiler will have a sub instruction + * that is not of the above type so don't stop if we + * see one. + */ + if ((*instr & SUB_MASK) == SUB_INSTR && + ((*instr >> SUB_RD_SHIFT) & SUB_R_MASK) == 31 && + ((*instr >> SUB_RN_SHIFT) & SUB_R_MASK) == 31) { + found = true; + break; + } } } From owner-dev-commits-src-main@freebsd.org Wed Mar 3 14:29:03 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D0D6056C350 for ; Wed, 3 Mar 2021 14:29:03 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DrGb343Vvz3qdr for ; Wed, 3 Mar 2021 14:29:03 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: by mail-wm1-f47.google.com with SMTP id e23so5343164wmh.3 for ; Wed, 03 Mar 2021 06:29:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=KfoTTHpSVeH7z+JopN9RXRL/LV5G+X6GVJMXIzgSJls=; b=oX2vl1d1OaCZTGPGC2NQK6xX+W+c4adeb6EYO/qy/rbDUkUI8B+ufubVXeQwQ+ZBuu d7fITF5SM/dNHTqBbrUf9NV426LFaQYLm5ZEQNsK8yXCj+/XkFk8sLlm8NrE+kS6WgPb Or3YA80y/zifIW1df3IgTKpIrVB7fuowHz/WWyFSd2L2ts9gp1ckd2nAM1So1uEgld0C nitYF3UipnTZVCIPIuh8nlLbMOy9eHdBfyiv+BvbdazPKJRsvwvOlZ3M5Q6n2VcXEHuR njWLRp2+LLFH5SIkoYaCOd40l+CZ5EXJ+kWn5Wk5TN+eQ+2lvY9nExwLcz0upCkhbI4J jjcg== X-Gm-Message-State: AOAM532wXNM0psxUcHXIsj3vzR0lIEKJECXOhQlVlN0OwILJF8f/sZL8 snpJqADgeMflksZHW8DskrD4JUsSujTXVw== X-Google-Smtp-Source: ABdhPJyguqmVXW5KwRZvV4KsuWf7Q9PkApi8Gb+F6GwFa8i95eLbsdPbvgmTJp7+eaoutNvX6+1aYQ== X-Received: by 2002:a1c:448a:: with SMTP id r132mr3138593wma.157.1614781742098; Wed, 03 Mar 2021 06:29:02 -0800 (PST) Received: from [192.168.149.251] (trinity-students-nat.trin.cam.ac.uk. [131.111.193.104]) by smtp.gmail.com with ESMTPSA id h62sm6862614wmf.37.2021.03.03.06.29.01 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Mar 2021 06:29:01 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: git: 28d945204ea1 - main - Handle functions that use a nop in the arm64 fbt From: Jessica Clarke In-Reply-To: <202103031426.123EQoM5082920@gitrepo.freebsd.org> Date: Wed, 3 Mar 2021 14:29:00 +0000 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <202103031426.123EQoM5082920@gitrepo.freebsd.org> To: Andrew Turner X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Rspamd-Queue-Id: 4DrGb343Vvz3qdr X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 14:29:03 -0000 On 3 Mar 2021, at 14:26, Andrew Turner wrote: >=20 > The branch main has been updated by andrew: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D28d945204ea1014d7de6906af8470ed8= b3311335 >=20 > commit 28d945204ea1014d7de6906af8470ed8b3311335 > Author: Andrew Turner > AuthorDate: 2021-01-13 11:08:19 +0000 > Commit: Andrew Turner > CommitDate: 2021-03-03 14:18:03 +0000 >=20 > Handle functions that use a nop in the arm64 fbt >=20 > To trace leaf asm functions we can insert a single nop instruction = as > the first instruction in a function and trigger off this. >=20 > Reviewed by: gnn > Sponsored by: Innovate UK > Differential Revision: https://reviews.freebsd.org/D28132 > --- > sys/arm64/include/asm.h | 8 +++- > .../contrib/opensolaris/uts/common/sys/dtrace.h | 2 + > sys/cddl/dev/dtrace/aarch64/dtrace_subr.c | 5 +++ > sys/cddl/dev/fbt/aarch64/fbt_isa.c | 51 = ++++++++++++++-------- > 4 files changed, 46 insertions(+), 20 deletions(-) >=20 > diff --git a/sys/arm64/include/asm.h b/sys/arm64/include/asm.h > index 05e618500e59..32b79d256e80 100644 > --- a/sys/arm64/include/asm.h > +++ b/sys/arm64/include/asm.h > @@ -38,9 +38,15 @@ >=20 > #define _C_LABEL(x) x >=20 > +#ifdef KDTRACE_HOOKS > +#define DTRACE_NOP nop > +#else > +#define DTRACE_NOP > +#endif > + > #define LENTRY(sym) = \ > .text; .align 2; .type sym,#function; sym: \ > - .cfi_startproc > + .cfi_startproc; DTRACE_NOP > #define ENTRY(sym) = \ > .globl sym; LENTRY(sym) Doesn't this mean ENTRY incorrectly also has the nop? Jess From owner-dev-commits-src-main@freebsd.org Wed Mar 3 14:37:04 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E624A56C787 for ; Wed, 3 Mar 2021 14:37:04 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DrGmJ2D2Gz3rKn for ; Wed, 3 Mar 2021 14:37:04 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: by mail-wr1-f41.google.com with SMTP id d15so8697587wrv.5 for ; Wed, 03 Mar 2021 06:37:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=Id9pCmCMHJWrTFKmTl/PJsb404xFqRp4IlA8syhA+84=; b=dK0qtj5yjmuUsWcAbMOSYUPE373PAYVkI0RR+6+AkY1VL+9sXaTEPEOEPib7JlhLLH yQuKEik8UaTB/8PFygADimY2mGdCKuazqM3HTT3ar04D/c1crRUCM3g4CNRw6IGUjP4O zCnTYMGXBbV3HdfgYiWxuB6VvlkfTt/Ol1HibdO0U9UIj5MRAJDYkcI1dTjb9DhmGwEe Bf5qBC/HzCvAshZz1qdJdLyIQQp7MLHjNteDSYGIhfeNJEZZFr4/INtij4Dzo3yg/Rtq bKVDEjfSzLtZ3ikb9kvbYUTFAHdiqd2ZObhLqNbI8hrBh3vzQHkB8Z9TKFwBtp9Ox3wt dADQ== X-Gm-Message-State: AOAM533NdgNMJGvbjst4v0J7hAITzn3wXDQQRHpRKPX1mmbvAIMEhgHD gEWc0+NJwiG2RVhzLRWatlkSrg== X-Google-Smtp-Source: ABdhPJxI0IEse/bqzqQFxDaI7mR5892YT3IpyHxRo6Ihz5wXRExwoPx3MxZiFHy7TS8w1fg/sxirvg== X-Received: by 2002:adf:e485:: with SMTP id i5mr3626325wrm.26.1614782222840; Wed, 03 Mar 2021 06:37:02 -0800 (PST) Received: from [192.168.149.251] (trinity-students-nat.trin.cam.ac.uk. [131.111.193.104]) by smtp.gmail.com with ESMTPSA id q25sm5978816wmq.15.2021.03.03.06.37.02 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Mar 2021 06:37:02 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: git: 28d945204ea1 - main - Handle functions that use a nop in the arm64 fbt From: Jessica Clarke In-Reply-To: Date: Wed, 3 Mar 2021 14:37:01 +0000 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <202103031426.123EQoM5082920@gitrepo.freebsd.org> To: Andrew Turner X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Rspamd-Queue-Id: 4DrGmJ2D2Gz3rKn X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of jrtc27@jrtc27.com designates 209.85.221.41 as permitted sender) smtp.mailfrom=jrtc27@jrtc27.com X-Spamd-Result: default: False [-2.50 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; RCVD_COUNT_THREE(0.00)[3]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FORGED_SENDER(0.30)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; MID_RHS_MATCH_FROM(0.00)[]; FROM_NEQ_ENVFROM(0.00)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; ARC_NA(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[209.85.221.41:from]; FREEFALL_USER(0.00)[jrtc27]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; SPAMHAUS_ZRD(0.00)[209.85.221.41:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.221.41:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.221.41:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[dev-commits-src-main] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 14:37:05 -0000 On 3 Mar 2021, at 14:29, Jessica Clarke wrote: > On 3 Mar 2021, at 14:26, Andrew Turner wrote: >>=20 >> The branch main has been updated by andrew: >>=20 >> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D28d945204ea1014d7de6906af8470ed8= b3311335 >>=20 >> commit 28d945204ea1014d7de6906af8470ed8b3311335 >> Author: Andrew Turner >> AuthorDate: 2021-01-13 11:08:19 +0000 >> Commit: Andrew Turner >> CommitDate: 2021-03-03 14:18:03 +0000 >>=20 >> Handle functions that use a nop in the arm64 fbt >>=20 >> To trace leaf asm functions we can insert a single nop instruction = as >> the first instruction in a function and trigger off this. >>=20 >> Reviewed by: gnn >> Sponsored by: Innovate UK >> Differential Revision: https://reviews.freebsd.org/D28132 >> --- >> sys/arm64/include/asm.h | 8 +++- >> .../contrib/opensolaris/uts/common/sys/dtrace.h | 2 + >> sys/cddl/dev/dtrace/aarch64/dtrace_subr.c | 5 +++ >> sys/cddl/dev/fbt/aarch64/fbt_isa.c | 51 = ++++++++++++++-------- >> 4 files changed, 46 insertions(+), 20 deletions(-) >>=20 >> diff --git a/sys/arm64/include/asm.h b/sys/arm64/include/asm.h >> index 05e618500e59..32b79d256e80 100644 >> --- a/sys/arm64/include/asm.h >> +++ b/sys/arm64/include/asm.h >> @@ -38,9 +38,15 @@ >>=20 >> #define _C_LABEL(x) x >>=20 >> +#ifdef KDTRACE_HOOKS >> +#define DTRACE_NOP nop >> +#else >> +#define DTRACE_NOP >> +#endif >> + >> #define LENTRY(sym) = \ >> .text; .align 2; .type sym,#function; sym: \ >> - .cfi_startproc >> + .cfi_startproc; DTRACE_NOP >> #define ENTRY(sym) = \ >> .globl sym; LENTRY(sym) >=20 > Doesn't this mean ENTRY incorrectly also has the nop? Hm, right, the L in LENTRY means local not leaf. Isn't this a problem though? (L)ENTRY are perfectly legal to use for non-leaf assembly functions today. Shouldn't there be separate ones specifically for leaf functions if you want to treat them differently? Jess From owner-dev-commits-src-main@freebsd.org Wed Mar 3 14:55:42 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0813E56CB4A; Wed, 3 Mar 2021 14:55:42 +0000 (UTC) (envelope-from andrew@freebsd.org) Received: from fry.fubar.geek.nz (fry.fubar.geek.nz [139.59.165.16]) by mx1.freebsd.org (Postfix) with ESMTP id 4DrH9n4tGTz3s4w; Wed, 3 Mar 2021 14:55:41 +0000 (UTC) (envelope-from andrew@freebsd.org) Received: from [192.168.42.21] (cpc91232-cmbg18-2-0-cust554.5-4.cable.virginm.net [82.2.126.43]) by fry.fubar.geek.nz (Postfix) with ESMTPSA id 9326D4E71F; Wed, 3 Mar 2021 14:55:34 +0000 (UTC) From: Andrew Turner Message-Id: Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.17\)) Subject: Re: git: 28d945204ea1 - main - Handle functions that use a nop in the arm64 fbt Date: Wed, 3 Mar 2021 14:55:33 +0000 In-Reply-To: Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" To: Jessica Clarke References: <202103031426.123EQoM5082920@gitrepo.freebsd.org> X-Mailer: Apple Mail (2.3445.104.17) X-Rspamd-Queue-Id: 4DrH9n4tGTz3s4w X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 14:55:42 -0000 > On 3 Mar 2021, at 14:37, Jessica Clarke wrote: >=20 > On 3 Mar 2021, at 14:29, Jessica Clarke > wrote: >> On 3 Mar 2021, at 14:26, Andrew Turner wrote: >>>=20 >>> The branch main has been updated by andrew: >>>=20 >>> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D28d945204ea1014d7de6906af8470ed8= b3311335 >>>=20 >>> commit 28d945204ea1014d7de6906af8470ed8b3311335 >>> Author: Andrew Turner >>> AuthorDate: 2021-01-13 11:08:19 +0000 >>> Commit: Andrew Turner >>> CommitDate: 2021-03-03 14:18:03 +0000 >>>=20 >>> Handle functions that use a nop in the arm64 fbt >>>=20 >>> To trace leaf asm functions we can insert a single nop instruction = as >>> the first instruction in a function and trigger off this. >>>=20 >>> Reviewed by: gnn >>> Sponsored by: Innovate UK >>> Differential Revision: https://reviews.freebsd.org/D28132 >>> --- >>> sys/arm64/include/asm.h | 8 +++- >>> .../contrib/opensolaris/uts/common/sys/dtrace.h | 2 + >>> sys/cddl/dev/dtrace/aarch64/dtrace_subr.c | 5 +++ >>> sys/cddl/dev/fbt/aarch64/fbt_isa.c | 51 = ++++++++++++++-------- >>> 4 files changed, 46 insertions(+), 20 deletions(-) >>>=20 >>> diff --git a/sys/arm64/include/asm.h b/sys/arm64/include/asm.h >>> index 05e618500e59..32b79d256e80 100644 >>> --- a/sys/arm64/include/asm.h >>> +++ b/sys/arm64/include/asm.h >>> @@ -38,9 +38,15 @@ >>>=20 >>> #define _C_LABEL(x) x >>>=20 >>> +#ifdef KDTRACE_HOOKS >>> +#define DTRACE_NOP nop >>> +#else >>> +#define DTRACE_NOP >>> +#endif >>> + >>> #define LENTRY(sym) = \ >>> .text; .align 2; .type sym,#function; sym: \ >>> - .cfi_startproc >>> + .cfi_startproc; DTRACE_NOP >>> #define ENTRY(sym) = \ >>> .globl sym; LENTRY(sym) >>=20 >> Doesn't this mean ENTRY incorrectly also has the nop? >=20 > Hm, right, the L in LENTRY means local not leaf. Isn't this a problem > though? (L)ENTRY are perfectly legal to use for non-leaf assembly > functions today. Shouldn't there be separate ones specifically for = leaf > functions if you want to treat them differently? Other than early boot handling, pmap_switch, and the exception handlers = I think we only have a few non-leaf asm functions on arm64. The only = ones I can think of use tail recursion, e.g. memmove -> memcpy when = possible. Other than exception handlers these functions don=E2=80=99t = have the needed instructions to manage the stack frame as they don=E2=80=99= t use any stack space. I decided it was easier to add the nop = instruction to the start of function than try to create an unneeded = stack frame. Andrew= From owner-dev-commits-src-main@freebsd.org Wed Mar 3 14:59:47 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A49CD56CB76 for ; Wed, 3 Mar 2021 14:59:47 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DrHGW3xbJz3s0y for ; Wed, 3 Mar 2021 14:59:47 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: by mail-wr1-f43.google.com with SMTP id l12so24016442wry.2 for ; Wed, 03 Mar 2021 06:59:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=F6BwBxdydg6SxdsmiSKVRFrNAamwVtDvqyJ/8EbbW8k=; b=OXQ5+mjJLYghgkEq2ZD8YRmPFJ7YduIyx/wl3MomzOJmx/YTausIGtW8eR1nvMEh0A E1Zfc6R+DduIWFnaCRQVoORbI4mWbjOK66TEul6ClK5U79usMQc0XxVIc2S5KzAq/6xf ShzJ6rQdo7M/V6t8nzaC6aQm33Fz58vjfvr9SUpbyGY58+5rpTVplFSyN3ahMuOEbLuc W3Jxop6Akdy2HfgsUkvIa7hLFHVV7Y6xD8wBgvsnZ/KnYN/sO/cGkjidc2FJywQbCuZ3 YhMZrvp8ibbWm6ttnTIQCeGBpSXdyxFyHfIpTKVqY2DHKNSwxc58gSlolqsv5JE2hgax fGUg== X-Gm-Message-State: AOAM531rEOqis+3PMD0iug0TcJiCxABvkRVUGSVuW5wILvdno0vGbzZc cWHx1b/0326ykYsBM+AZym8YFw== X-Google-Smtp-Source: ABdhPJzHRYQULiboNtwIr+2lGKml0NCoOQ6FbEwG/z7PMg3r7I5HeUsBK5/P110tgmYZcHv6VQjqRA== X-Received: by 2002:adf:d1ce:: with SMTP id b14mr27663507wrd.126.1614783584845; Wed, 03 Mar 2021 06:59:44 -0800 (PST) Received: from [192.168.149.251] (trinity-students-nat.trin.cam.ac.uk. [131.111.193.104]) by smtp.gmail.com with ESMTPSA id k4sm42280022wrd.9.2021.03.03.06.59.44 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Mar 2021 06:59:44 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: git: 28d945204ea1 - main - Handle functions that use a nop in the arm64 fbt From: Jessica Clarke In-Reply-To: Date: Wed, 3 Mar 2021 14:59:43 +0000 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <8B945F5B-AC79-47E6-98D9-16762D3DBBF5@freebsd.org> References: <202103031426.123EQoM5082920@gitrepo.freebsd.org> To: Andrew Turner X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Rspamd-Queue-Id: 4DrHGW3xbJz3s0y X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 14:59:47 -0000 On 3 Mar 2021, at 14:55, Andrew Turner wrote: >=20 >> On 3 Mar 2021, at 14:37, Jessica Clarke wrote: >>=20 >> On 3 Mar 2021, at 14:29, Jessica Clarke wrote: >>> On 3 Mar 2021, at 14:26, Andrew Turner wrote: >>>>=20 >>>> The branch main has been updated by andrew: >>>>=20 >>>> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D28d945204ea1014d7de6906af8470ed8= b3311335 >>>>=20 >>>> commit 28d945204ea1014d7de6906af8470ed8b3311335 >>>> Author: Andrew Turner >>>> AuthorDate: 2021-01-13 11:08:19 +0000 >>>> Commit: Andrew Turner >>>> CommitDate: 2021-03-03 14:18:03 +0000 >>>>=20 >>>> Handle functions that use a nop in the arm64 fbt >>>>=20 >>>> To trace leaf asm functions we can insert a single nop instruction = as >>>> the first instruction in a function and trigger off this. >>>>=20 >>>> Reviewed by: gnn >>>> Sponsored by: Innovate UK >>>> Differential Revision: https://reviews.freebsd.org/D28132 >>>> --- >>>> sys/arm64/include/asm.h | 8 +++- >>>> .../contrib/opensolaris/uts/common/sys/dtrace.h | 2 + >>>> sys/cddl/dev/dtrace/aarch64/dtrace_subr.c | 5 +++ >>>> sys/cddl/dev/fbt/aarch64/fbt_isa.c | 51 = ++++++++++++++-------- >>>> 4 files changed, 46 insertions(+), 20 deletions(-) >>>>=20 >>>> diff --git a/sys/arm64/include/asm.h b/sys/arm64/include/asm.h >>>> index 05e618500e59..32b79d256e80 100644 >>>> --- a/sys/arm64/include/asm.h >>>> +++ b/sys/arm64/include/asm.h >>>> @@ -38,9 +38,15 @@ >>>>=20 >>>> #define _C_LABEL(x) x >>>>=20 >>>> +#ifdef KDTRACE_HOOKS >>>> +#define DTRACE_NOP nop >>>> +#else >>>> +#define DTRACE_NOP >>>> +#endif >>>> + >>>> #define LENTRY(sym) = \ >>>> .text; .align 2; .type sym,#function; sym: \ >>>> - .cfi_startproc >>>> + .cfi_startproc; DTRACE_NOP >>>> #define ENTRY(sym) = \ >>>> .globl sym; LENTRY(sym) >>>=20 >>> Doesn't this mean ENTRY incorrectly also has the nop? >>=20 >> Hm, right, the L in LENTRY means local not leaf. Isn't this a problem >> though? (L)ENTRY are perfectly legal to use for non-leaf assembly >> functions today. Shouldn't there be separate ones specifically for = leaf >> functions if you want to treat them differently? >=20 > Other than early boot handling, pmap_switch, and the exception = handlers I think we only have a few non-leaf asm functions on arm64. The = only ones I can think of use tail recursion, e.g. memmove -> memcpy when = possible. Other than exception handlers these functions don=E2=80=99t = have the needed instructions to manage the stack frame as they don=E2=80=99= t use any stack space. I decided it was easier to add the nop = instruction to the start of function than try to create an unneeded = stack frame. I don't contest that. My problem is that there is now a hidden requirement that (L)ENTRY only be used for leaf functions lest you get broken FBT for them. That is a surprising restriction, which to me should be indicated by having a different macro name from the generic (L)ENTRY shared across most (all?) ports. Despite its flaws, MIPS does have special LEAF macros that are distinct from the others. Jess From owner-dev-commits-src-main@freebsd.org Wed Mar 3 15:09:11 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B556756D3AB; Wed, 3 Mar 2021 15:09:11 +0000 (UTC) (envelope-from andrew@freebsd.org) Received: from fry.fubar.geek.nz (fry.fubar.geek.nz [139.59.165.16]) by mx1.freebsd.org (Postfix) with ESMTP id 4DrHTM47jfz3t2y; Wed, 3 Mar 2021 15:09:11 +0000 (UTC) (envelope-from andrew@freebsd.org) Received: from [192.168.42.21] (cpc91232-cmbg18-2-0-cust554.5-4.cable.virginm.net [82.2.126.43]) by fry.fubar.geek.nz (Postfix) with ESMTPSA id 7A8BC4E716; Wed, 3 Mar 2021 15:09:10 +0000 (UTC) From: Andrew Turner Message-Id: <9D7C6FED-2B65-4219-9B1E-4BAF5AC5CEC8@freebsd.org> Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.17\)) Subject: Re: git: 28d945204ea1 - main - Handle functions that use a nop in the arm64 fbt Date: Wed, 3 Mar 2021 15:09:09 +0000 In-Reply-To: <8B945F5B-AC79-47E6-98D9-16762D3DBBF5@freebsd.org> Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" To: Jessica Clarke References: <202103031426.123EQoM5082920@gitrepo.freebsd.org> <8B945F5B-AC79-47E6-98D9-16762D3DBBF5@freebsd.org> X-Mailer: Apple Mail (2.3445.104.17) X-Rspamd-Queue-Id: 4DrHTM47jfz3t2y X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 15:09:11 -0000 > On 3 Mar 2021, at 14:59, Jessica Clarke wrote: >=20 > On 3 Mar 2021, at 14:55, Andrew Turner > wrote: >>=20 >>> On 3 Mar 2021, at 14:37, Jessica Clarke wrote: >>>=20 >>> On 3 Mar 2021, at 14:29, Jessica Clarke wrote: >>>> On 3 Mar 2021, at 14:26, Andrew Turner wrote: >>>>>=20 >>>>> The branch main has been updated by andrew: >>>>>=20 >>>>> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D28d945204ea1014d7de6906af8470ed8= b3311335 >>>>>=20 >>>>> commit 28d945204ea1014d7de6906af8470ed8b3311335 >>>>> Author: Andrew Turner >>>>> AuthorDate: 2021-01-13 11:08:19 +0000 >>>>> Commit: Andrew Turner >>>>> CommitDate: 2021-03-03 14:18:03 +0000 >>>>>=20 >>>>> Handle functions that use a nop in the arm64 fbt >>>>>=20 >>>>> To trace leaf asm functions we can insert a single nop instruction = as >>>>> the first instruction in a function and trigger off this. >>>>>=20 >>>>> Reviewed by: gnn >>>>> Sponsored by: Innovate UK >>>>> Differential Revision: https://reviews.freebsd.org/D28132 >>>>> --- >>>>> sys/arm64/include/asm.h | 8 +++- >>>>> .../contrib/opensolaris/uts/common/sys/dtrace.h | 2 + >>>>> sys/cddl/dev/dtrace/aarch64/dtrace_subr.c | 5 +++ >>>>> sys/cddl/dev/fbt/aarch64/fbt_isa.c | 51 = ++++++++++++++-------- >>>>> 4 files changed, 46 insertions(+), 20 deletions(-) >>>>>=20 >>>>> diff --git a/sys/arm64/include/asm.h b/sys/arm64/include/asm.h >>>>> index 05e618500e59..32b79d256e80 100644 >>>>> --- a/sys/arm64/include/asm.h >>>>> +++ b/sys/arm64/include/asm.h >>>>> @@ -38,9 +38,15 @@ >>>>>=20 >>>>> #define _C_LABEL(x) x >>>>>=20 >>>>> +#ifdef KDTRACE_HOOKS >>>>> +#define DTRACE_NOP nop >>>>> +#else >>>>> +#define DTRACE_NOP >>>>> +#endif >>>>> + >>>>> #define LENTRY(sym) = \ >>>>> .text; .align 2; .type sym,#function; sym: \ >>>>> - .cfi_startproc >>>>> + .cfi_startproc; DTRACE_NOP >>>>> #define ENTRY(sym) = \ >>>>> .globl sym; LENTRY(sym) >>>>=20 >>>> Doesn't this mean ENTRY incorrectly also has the nop? >>>=20 >>> Hm, right, the L in LENTRY means local not leaf. Isn't this a = problem >>> though? (L)ENTRY are perfectly legal to use for non-leaf assembly >>> functions today. Shouldn't there be separate ones specifically for = leaf >>> functions if you want to treat them differently? >>=20 >> Other than early boot handling, pmap_switch, and the exception = handlers I think we only have a few non-leaf asm functions on arm64. The = only ones I can think of use tail recursion, e.g. memmove -> memcpy when = possible. Other than exception handlers these functions don=E2=80=99t = have the needed instructions to manage the stack frame as they don=E2=80=99= t use any stack space. I decided it was easier to add the nop = instruction to the start of function than try to create an unneeded = stack frame. >=20 > I don't contest that. My problem is that there is now a hidden > requirement that (L)ENTRY only be used for leaf functions lest you get > broken FBT for them. That is a surprising restriction, which to me > should be indicated by having a different macro name from the generic > (L)ENTRY shared across most (all?) ports. Despite its flaws, MIPS does > have special LEAF macros that are distinct from the others. Why would you get broken FBT? All it cares about is finding an = instruction it can emulate and replace it with a specific breakpoint. In = a non-leaf asm function we will place a nop as the first instruction = followed by the standard stack frame manipulation instructions. In this = case the nop is unneeded, but should add minimal overhead if such a = function is added. I only mentioned leaf functions in the commit message as an example of = something that we may not have previously been able to trace due to a = lack of stack usage. Andrew= From owner-dev-commits-src-main@freebsd.org Wed Mar 3 15:14:57 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5573556D8BA for ; Wed, 3 Mar 2021 15:14:57 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DrHc11hBBz3v03 for ; Wed, 3 Mar 2021 15:14:57 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: by mail-wm1-f44.google.com with SMTP id w7so5472731wmb.5 for ; Wed, 03 Mar 2021 07:14:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=KH7n4N8muXRs0tUlMFGUIz8Sm7UFW84+7FRVgfV/rd4=; b=eRYbR0RxqwClhB9r/5aAGiLmcPEm3Cbtnrm6Q5ZL/R0FiAyvsjyLEVv0zRxNJAxTQK AxUfD2z5zD/oXxt2ND0Kz5I70dD7Jsvg5eZCliugMwqwPiFslrviq8ffW3aM4ZF8NdgH 7M0JSfae52shrj0ButvYyqsRm7z+3JC8Tu+hTOGz9ST0AbApzfkSNzzJrzQKohNrEnCs Lig35ylNDJOnPK1PUyErldE2QY1MBAC3JfslrdJjiSEtmlQk8HwlRUBAtZ/6jAHXbnqr 3QHAW/BRcuRgEHKiGl8H0jWZN2FYmDrPJYEm6xx35FZ3rJ2ErJ4p/HcuE1dbqolZiUHp nOnQ== X-Gm-Message-State: AOAM530Y9k9OodNSeEKGasHTYNYGdSrxNfI2GV7GcUhvjrzeLNHORDM0 nkO2uh+/08mL0v5P/a9wxz1jQA== X-Google-Smtp-Source: ABdhPJxFXLyAiBPWIAUEY3AFgasjt7a09GCtbX4hD466mnrk/m9RlOvWpx68sDMEycb+exgOcQoQdg== X-Received: by 2002:a1c:a543:: with SMTP id o64mr9564706wme.107.1614784495597; Wed, 03 Mar 2021 07:14:55 -0800 (PST) Received: from [192.168.149.251] (trinity-students-nat.trin.cam.ac.uk. [131.111.193.104]) by smtp.gmail.com with ESMTPSA id b186sm4707048wmc.44.2021.03.03.07.14.55 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Mar 2021 07:14:55 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: git: 28d945204ea1 - main - Handle functions that use a nop in the arm64 fbt From: Jessica Clarke In-Reply-To: <9D7C6FED-2B65-4219-9B1E-4BAF5AC5CEC8@freebsd.org> Date: Wed, 3 Mar 2021 15:14:54 +0000 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <202103031426.123EQoM5082920@gitrepo.freebsd.org> <8B945F5B-AC79-47E6-98D9-16762D3DBBF5@freebsd.org> <9D7C6FED-2B65-4219-9B1E-4BAF5AC5CEC8@freebsd.org> To: Andrew Turner X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Rspamd-Queue-Id: 4DrHc11hBBz3v03 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 15:14:57 -0000 > On 3 Mar 2021, at 15:09, Andrew Turner wrote: >=20 >>=20 >> On 3 Mar 2021, at 14:59, Jessica Clarke wrote: >>=20 >> On 3 Mar 2021, at 14:55, Andrew Turner wrote: >>>=20 >>>> On 3 Mar 2021, at 14:37, Jessica Clarke wrote: >>>>=20 >>>> On 3 Mar 2021, at 14:29, Jessica Clarke wrote: >>>>> On 3 Mar 2021, at 14:26, Andrew Turner wrote: >>>>>>=20 >>>>>> The branch main has been updated by andrew: >>>>>>=20 >>>>>> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D28d945204ea1014d7de6906af8470ed8= b3311335 >>>>>>=20 >>>>>> commit 28d945204ea1014d7de6906af8470ed8b3311335 >>>>>> Author: Andrew Turner >>>>>> AuthorDate: 2021-01-13 11:08:19 +0000 >>>>>> Commit: Andrew Turner >>>>>> CommitDate: 2021-03-03 14:18:03 +0000 >>>>>>=20 >>>>>> Handle functions that use a nop in the arm64 fbt >>>>>>=20 >>>>>> To trace leaf asm functions we can insert a single nop = instruction as >>>>>> the first instruction in a function and trigger off this. >>>>>>=20 >>>>>> Reviewed by: gnn >>>>>> Sponsored by: Innovate UK >>>>>> Differential Revision: https://reviews.freebsd.org/D28132 >>>>>> --- >>>>>> sys/arm64/include/asm.h | 8 +++- >>>>>> .../contrib/opensolaris/uts/common/sys/dtrace.h | 2 + >>>>>> sys/cddl/dev/dtrace/aarch64/dtrace_subr.c | 5 +++ >>>>>> sys/cddl/dev/fbt/aarch64/fbt_isa.c | 51 = ++++++++++++++-------- >>>>>> 4 files changed, 46 insertions(+), 20 deletions(-) >>>>>>=20 >>>>>> diff --git a/sys/arm64/include/asm.h b/sys/arm64/include/asm.h >>>>>> index 05e618500e59..32b79d256e80 100644 >>>>>> --- a/sys/arm64/include/asm.h >>>>>> +++ b/sys/arm64/include/asm.h >>>>>> @@ -38,9 +38,15 @@ >>>>>>=20 >>>>>> #define _C_LABEL(x) x >>>>>>=20 >>>>>> +#ifdef KDTRACE_HOOKS >>>>>> +#define DTRACE_NOP nop >>>>>> +#else >>>>>> +#define DTRACE_NOP >>>>>> +#endif >>>>>> + >>>>>> #define LENTRY(sym) = \ >>>>>> .text; .align 2; .type sym,#function; sym: \ >>>>>> - .cfi_startproc >>>>>> + .cfi_startproc; DTRACE_NOP >>>>>> #define ENTRY(sym) = \ >>>>>> .globl sym; LENTRY(sym) >>>>>=20 >>>>> Doesn't this mean ENTRY incorrectly also has the nop? >>>>=20 >>>> Hm, right, the L in LENTRY means local not leaf. Isn't this a = problem >>>> though? (L)ENTRY are perfectly legal to use for non-leaf assembly >>>> functions today. Shouldn't there be separate ones specifically for = leaf >>>> functions if you want to treat them differently? >>>=20 >>> Other than early boot handling, pmap_switch, and the exception = handlers I think we only have a few non-leaf asm functions on arm64. The = only ones I can think of use tail recursion, e.g. memmove -> memcpy when = possible. Other than exception handlers these functions don=E2=80=99t = have the needed instructions to manage the stack frame as they don=E2=80=99= t use any stack space. I decided it was easier to add the nop = instruction to the start of function than try to create an unneeded = stack frame. >>=20 >> I don't contest that. My problem is that there is now a hidden >> requirement that (L)ENTRY only be used for leaf functions lest you = get >> broken FBT for them. That is a surprising restriction, which to me >> should be indicated by having a different macro name from the generic >> (L)ENTRY shared across most (all?) ports. Despite its flaws, MIPS = does >> have special LEAF macros that are distinct from the others. >=20 > Why would you get broken FBT? All it cares about is finding an = instruction it can emulate and replace it with a specific breakpoint. In = a non-leaf asm function we will place a nop as the first instruction = followed by the standard stack frame manipulation instructions. In this = case the nop is unneeded, but should add minimal overhead if such a = function is added. >=20 > I only mentioned leaf functions in the commit message as an example of = something that we may not have previously been able to trace due to a = lack of stack usage. Oh I see, I didn't read the commit properly, I assumed it was to watermark leaf functions for better stack traces. My bad. Jess From owner-dev-commits-src-main@freebsd.org Wed Mar 3 15:24:17 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 04E9356D9BE for ; Wed, 3 Mar 2021 15:24:17 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x82d.google.com (mail-qt1-x82d.google.com [IPv6:2607:f8b0:4864:20::82d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DrHpm69TRz3vLh for ; Wed, 3 Mar 2021 15:24:16 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x82d.google.com with SMTP id s15so17790404qtq.0 for ; Wed, 03 Mar 2021 07:24:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Cp6u1g/nLZnivDUEe9PnRNT2IAoeKZ87PnauSyvVsng=; b=RYRVb8VQY3czDV/bT0DJD8of44JyPSzg7JOtTrrqC8cLGaSXWx4322BgcUrdRoO9OL S4yL5ZbsrT3RkBLm+ICWrTPlQ+K+2SBv7NnklxClCGHKzdCh0UMlaPgohFBcn0mF6ITp yq2XTdFEk/gGfD+/HdfSUg3M6GHLfZHlB6OvcAgFCXf9i0MQOBKy9LAK8+Ofmku5lHp0 cQFly6AMtgnpTuI3Lu7q8QvhFdqjHIu6JUxe4/sRsvE12cLkUDhMG2Yg0auDkS/naZIE z/nveMVhL+e9aQxAQhCViWv5i/1hBAym0GrIbz5zf9mWyvf5M62rchiFUD/XWxvun+n1 s24g== 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=Cp6u1g/nLZnivDUEe9PnRNT2IAoeKZ87PnauSyvVsng=; b=BBXn3arnmURTvop8S1tvbrUn4yPMolfAdbjVsBtKNIgYxA2v201BLE0vqFXaEp/KIs Y8zQcFFB2uJXmUdt36HOeUvkxFDcEERcqezSggBBbCgq5W+Yg99lMllJY/6wfTGuQCJN jZo1fwBbkJMwo6/qGJOtlF2y9uchLUHeSi+nVnDwHA7i9gGuPpwZbwxiJlH+gcd27vg/ qkjGT1N92tvRXuO531OpgRObZH8S8kjf/Ybao41yxWuuRAxPRBGq7aPNuw98d/cr35fH bsKeF1kGBSCtFBYztYVI1VtEHSolbj27vv0KzAtbaraUW8Q7JkND0pSl04WbX3AL1fcP d1eQ== X-Gm-Message-State: AOAM532ELyQeuys+BxWURnQqZp3KEdMSsqE0QJqDohxxisGAv4qpYgWo kZKJxKmTuTiFeaUx7Eqq/2Q8b1Z6OVoRMGhBB0t1/w== X-Google-Smtp-Source: ABdhPJw1AFTZKO0Bg36ErqZIBU+byon/yDHvXKlqhgqth2PtJNGl+KlLz/u9iG0wB5P4EpdmFtCNmNpYxFYC/oD7zlQ= X-Received: by 2002:a05:622a:303:: with SMTP id q3mr22377222qtw.235.1614785055948; Wed, 03 Mar 2021 07:24:15 -0800 (PST) MIME-Version: 1.0 References: <202103021856.122IuYgV048086@gndrsh.dnsmgr.net> <3d947e4c-a529-0b27-a8d7-415600783e53@freebsd.org> In-Reply-To: From: Warner Losh Date: Wed, 3 Mar 2021 08:24:05 -0700 Message-ID: Subject: Re: git: 2c26d77d989a - main - Remove /boot/efi from mtree, missed in 0b7472b3d8d2. To: Nathan Whitehorn Cc: Ed Maste , "Rodney W. Grimes" , Brandon Bergren , src-committers , "" , dev-commits-src-main@freebsd.org X-Rspamd-Queue-Id: 4DrHpm69TRz3vLh X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 15:24:17 -0000 On Wed, Mar 3, 2021 at 7:09 AM Nathan Whitehorn wrote: > > > On 3/2/21 10:19 PM, Warner Losh wrote: > > > > > > On Tue, Mar 2, 2021, 7:01 PM Ed Maste > > wrote: > > > > On Tue, 2 Mar 2021 at 19:30, Warner Losh > > wrote: > > > > > > There has been some talk of moving the mount point to /efi, but > > I think that went nowhere... > > > > I thought about /efi based on arguments from the Linux world, more > > info at > > > https://wiki.archlinux.org/index.php/EFI_system_partition#Typical_mount_points > > < > https://wiki.archlinux.org/index.php/EFI_system_partition#Typical_mount_points > >. > > I did open https://reviews.freebsd.org/D28814 > > to move the existing > > uses to /efi. That said, I'm much more interested in us picking > > something and using it in the installer/other tooling than whether > > it's /boot/efi or /efi. > > > > > > Me too. I am actually open to either. If I had a do over, I'd pick > > /efi honestly. > > > > But the directory presence or absence shouldn't be used to know if we > > have an ESP to deal with or not. > > > > Warner > > > > It would have been nice to know that when I posted the original patch > for review that relied on this mechanism two weeks ago and you and Ed > both signed off. Or when we discussed this on Friday and no one knew why > it was in mtree -- I still honestly don't know from this thread -- and > then I proposed removing it and everyone said that was fine. There are > lots of other directories that we make in the installer that aren't in > mtree. What's special about this one? > You could have asked me directly rather than rely on an IRC conversation I wasn't part of. You didn't post the review widely enough, nor did you wait for my comments or seek them out despite knowing I was deeply involved in this. To get maximal reuse out of things, we need it in mtree. It's part of the base system, part of the updates, etc. Arbitrarily removing it without even asking me for input is what I'm upset about. The problem here is that the installer needs to know if an ESP has been > made. If /boot/efi is supposed to be the mountpoint for an ESP, its > presence seemed like a reasonable way to signal that. Here are some > options: > - We could try to see if a partition is actually mounted there. That's > mildly annoying -- it involves parsing some shell output -- and results > in making a pointless directory on all non-EFI architectures. > - We could try to have the installer signal to itself via some temp > file. This seems fragile and complicated. > - We could duplicate the logic for whether to make an ESP in the first > place in several places, which seems like a terrible idea. > The installer should just mount it early, then it will know. This will make the install script reusable on all architectures which will know if it is mounted to update it. There's no need for anything else to happen and you don't need to change the wider system. > But this needs to be settled *now*. It's already very, very late to get > this into 13.0 and we can't have another cycle of changing our minds > about reviewed code. > No. This was not reviewed code. It was hastily tossed together without proper follow up. You knew of my interest. You could have seen who committed the change to mtree in the first place and added them to a reviewboard review, but you didn't do that. I've hardly been absent, but I'm not on IRC 24/7. You could have at least asked. But you didn't and now want to use that fact to prevent me from objecting. That's not a functional way to run a project. I'm happy to settle it now and put this aside and get this settled... Warner From owner-dev-commits-src-main@freebsd.org Wed Mar 3 15:38:17 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9D64256DFB1 for ; Wed, 3 Mar 2021 15:38:17 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x72a.google.com (mail-qk1-x72a.google.com [IPv6:2607:f8b0:4864:20::72a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DrJ6x3rzsz3wFN for ; Wed, 3 Mar 2021 15:38:17 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x72a.google.com with SMTP id t4so6246868qkp.1 for ; Wed, 03 Mar 2021 07:38:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=OfxdMQ9K83s8cNZVwv5YEIuT/l5+sxRoQu4abRvbDN8=; b=VVzxaJrpqYwD7a1PZv8Y5OD/cdteNwhGhn9qoxj4Mbzmi8MP9mI3n5KCfmiFw9PnXO 9YSA8vlt7ZUb6314JAMYmD32rnn1YhOo+IDb5AyxXIIiAiDmvrtPoeAsum0yuy0z6Wh8 uh3pJ8bZhtGd2qLomuQNocWToH3tRhcZftnGsiXtrdcnRBhveZvsUKfOh8SJP7rGy0MX 8lCACyXIJTwmpFLs0y9gu20c93Ty58tUVvzJmptInu6tZBzdZ5yIVSO3Ibil4YnmytCv ZUav1mSVP6mLkkx+RG/HId0FQfodreFPVQI2LAvRD5XXUX/P1qpq115wI5OT1hoSZM7t YNoA== 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=OfxdMQ9K83s8cNZVwv5YEIuT/l5+sxRoQu4abRvbDN8=; b=RbpYhE3QMuhJikt2O6FCSHhqSrQXjdD98CzR5mTgOXAVqJ/Ebfef+VW9TxfHwAxeUS /zibull6w1lNsRH0H6X94lotq3C0yfmXOLfnRJFLDQ53TvIpNKreyPQdvstkU7EkaJoP sWG59RgOaX5/5zBHvqiNNXdDzI+0weRX/23Th4P+pzaNgjhbC2rd00Mx+3ffixwL4+Wp q+BygEwoq/XFeZfc+vNwEDg9/WSWLtowWWLXyvpms5UQaF+E61mRJD5Zlb6LuTaiQIbm v401mJTUYZWT2twfbAPX6yAMuFUx/7k2MGnsfRmrsYls3XxuEy34E8oQ9ljm2fVEkw4u mfFQ== X-Gm-Message-State: AOAM5302Ioxd7gZynWk/NlBU6k4SW9/wSF44tOS9JQRP2EfjqqIsj7qd lodUBj1QdDv69QiO5Op0o6JhMWXukKYEZg0H/SV3NrfW/lDUlQ== X-Google-Smtp-Source: ABdhPJzD1lSds62JoJ+5+KMA+f2UsILHA7iEIVuSx72dqWsdzrJfZvsgxO7gBcqOO1AFhSzJPhfuATTepPSs2KwqVrg= X-Received: by 2002:a37:6cc6:: with SMTP id h189mr25891589qkc.195.1614785896534; Wed, 03 Mar 2021 07:38:16 -0800 (PST) MIME-Version: 1.0 References: <202103031253.123CrxKG051357@gndrsh.dnsmgr.net> <14d09680-1036-4a7e-8a0e-c3063cac8bc9@www.fastmail.com> In-Reply-To: From: Warner Losh Date: Wed, 3 Mar 2021 08:38:05 -0700 Message-ID: Subject: Re: git: 2c26d77d989a - main - Remove /boot/efi from mtree, missed in 0b7472b3d8d2. To: Nathan Whitehorn Cc: Brandon Bergren , "Rodney W. Grimes" , Ed Maste , src-committers , "" , dev-commits-src-main@freebsd.org X-Rspamd-Queue-Id: 4DrJ6x3rzsz3wFN X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 15:38:17 -0000 On Wed, Mar 3, 2021 at 7:13 AM Nathan Whitehorn wrote: > > > On 3/3/21 9:05 AM, Brandon Bergren wrote: > > On Wed, Mar 3, 2021, at 6:53 AM, Rodney W. Grimes wrote: > >> What am I missing here? One place I am being told this is run in > >> an environment that may not even be an EFI booted system, and in > >> another place it is being used as a test if something is mounted > >> on it, which should only be true on an EFI booted system. > > That the script in question is a generic script that runs as part of > bsdinstall on every platform and has to be universal. > > > > The actual *problem* here is that usr.sbin/bsdinstall/scripts/bootconfig > has a default case that is > > *) die "Unsupported arch $(uname -m) for UEFI > install" > > > > which then causes the main script to bail out, leaving the system in a > half-installed state. > > > > If that had just been an exit 0 this would have never been a problem, I > suppose. > > > > Before the original change that broke this, there was a check that the > script was not running on powerpc or mips platforms before running the efi > bits, but this got taken out. > > > > Well, incidentally. The bootconfig script needs to know if there is an > ESP it should configure, but the signalling mechanism (the presence of > the ESP mount point) was being broken by mtree making that directory > unconditionally even on systems that don't use EFI. So then bootconfig > tried to set it up, but failed later on, because there was no EFI loader > to set up. The mtree change makes the ESP mount point only exist on > systems with an ESP. > So you made a unilateral change, without discussion of the bigger design, to something without even asking the original person who made the change to mtree about it for what sounds like an obscure case in the installer that could be solved in a different way? It's trivial enough to look at the boot method sysctl and skip the EFI update if we didn't boot EFI (and if by change that's not on all systems, it's easy enough to add it on all systems). I have no notion about why that wasn't considered, at least, before jumping in and taking people by surprise. Next time, talk to people first. That's the whole point of having review tools, mailing list and git blame. Warner From owner-dev-commits-src-main@freebsd.org Wed Mar 3 15:49:22 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 10EDC56E6E7; Wed, 3 Mar 2021 15:49:22 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DrJMj5RQYz4R0g; Wed, 3 Mar 2021 15:49:21 +0000 (UTC) (envelope-from ohartmann@walstatt.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1614786559; bh=lzx5PnigGPPv45IYz6TZqodKZiy9l3w6Tr5zgyJutsg=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:In-Reply-To:References; b=fn/6422pvOsll4jVNDqNwbO2R/t2hj7dVNO0HQkID5AueKukBt9dKpsk/PtVdRzgD 0LhVaNEkDSMVJM/GYC2puH+2I5Bl8XPtv/Ls5DDz0oaqPMda2aDGxBSGHjzlWaVmJp SMAQDopvWWkxBNrw1wPBn/m0lXFp/AxmVE3jfmL4= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from thor.intern.walstatt.dynvpn.de ([89.14.166.244]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1Mf0BG-1ljOZZ1Z0M-00gUAn; Wed, 03 Mar 2021 16:49:19 +0100 Date: Wed, 3 Mar 2021 16:48:46 +0100 From: "O. Hartmann" To: Andrew Turner Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: c8db60c0673d - main - Split out the loader efifb setup to a new function Message-ID: <20210303164913.010b2f03@thor.intern.walstatt.dynvpn.de> In-Reply-To: <202103031426.123EQmU4082875@gitrepo.freebsd.org> References: <202103031426.123EQmU4082875@gitrepo.freebsd.org> Organization: WALSTATT User-Agent: OutScare 3.1415926 X-Operating-System: ImNotAnOperatingSystem 3.141592527 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: base64 X-Provags-ID: V03:K1:BOf+zj3iuRQVsrrUL4MVf4RzBMNFgGD3Oj/QtVl5muUOlFkZ9oj z/xT8A06hvQR32hduh1kiB9FAryUK7JsMzVM0kYOgGMbjYCvjf1rxIe8wDRfgorrCOUSEk0 ZM/c8LuAS2biFDoVxVlw5Az2TP7L/Y9eIx2AgN1vxP0zTRj0qdaLKmd0Ms6+1poIQNKgGo9 bQRYzEu+lHWwfn/IuQaiQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:LNH2+Ne5JJU=:9IuhWkT/GFsZg584JupNXt P8V2pkI93uGE3pxpoGJjQQWI6WR024QE4PzI8yQ7AeSdcUaz7W0HAAJIndafoTsNr4ng3vMNS PqvlU58cooQKhfw1nwqOGGgRT/o0sH/hsK9FvRzzjerVbRLUO/i+NvBq3gRoCFRAnWnj55UOg DJKgJwZhJIJ5EINxGdoot5rPrWNIInA01UcfGJHX93ZWImrqWyEC9Yjtb78POCT6pGtVbTNhj opneB6xxxqqZO194mfmq0PWpU4DzAoQpgzZHvYNAkweeGS/vYLfSTwt8XZtSFoG7VRHyI/sP/ QuAogmc7RbdIAic9F30rBwvxOl/YH4S75ncqaZwGz2WU7TpXne+9LQtblonSGOAU8GNu8q+Tq +iqpiWD4UN4Xoua2IqnIwL4CEwyEbDCW69o8H4W91YStzFtPTvEms9mQg0NIrZfDYzmQpp/aQ CmcBiNo4YowEiYfMikejZ33cUtkKQfT10euO4k7rWLytuzP1UqSJUWe3q47V45e3vz1VGAN8v OOY52kYcyFNur/CpUn43kOckslj2PD5bpCG67zx34vkWQ7SnQ3ziwSztQj0nySBj+40vd/kb2 VV4tpBkD7BHwQcJqTW8h1WLnWoNqnyiaYrX1nUi0h89iaw12RjLLH7RrLbGaiaWVa20zs1pOt UNcgqBZ7haxZZL+5IQe3ZKrmDzK+lcC3KZM2E4ILgyZEn/ehlja9MFx8XGHvRnmK90u+8aK2R AhvT+gxUG2O4I8x+tMrT7jKnO3cUuszONUmFMoyjew54aDlQiKxZeMjm09wccb/pNN8Nb611j MAzAZzTx1wKnfx+A1hmPbgMYWnZKeiJPqMo2SOEXzcToQL3qkwuMHYqo9BtAwPpmqC5HjV2nr O0IApnZ+hgrroastqMCw== X-Rspamd-Queue-Id: 4DrJMj5RQYz4R0g X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 15:49:22 -0000 LS0tLS1CRUdJTiBQR1AgU0lHTkVEIE1FU1NBR0UtLS0tLQ0KSGFzaDogU0hBMjU2DQoNCkFtIFdl ZCwgMyBNYXIgMjAyMSAxNDoyNjo0OCBHTVQNCkFuZHJldyBUdXJuZXIgPGFuZHJld0BGcmVlQlNE Lm9yZz4gc2NocmllYjoNCg0KPiBUaGUgYnJhbmNoIG1haW4gaGFzIGJlZW4gdXBkYXRlZCBieSBh bmRyZXc6DQo+IA0KPiBVUkw6IGh0dHBzOi8vY2dpdC5GcmVlQlNELm9yZy9zcmMvY29tbWl0Lz9p ZD1jOGRiNjBjMDY3M2Q0YmI3YTNhM2UyYzA0MzgwNGUxZWQxMTA4YzJmDQo+IA0KPiBjb21taXQg YzhkYjYwYzA2NzNkNGJiN2EzYTNlMmMwNDM4MDRlMWVkMTEwOGMyZg0KPiBBdXRob3I6ICAgICBB bmRyZXcgVHVybmVyIDxhbmRyZXdARnJlZUJTRC5vcmc+DQo+IEF1dGhvckRhdGU6IDIwMjEtMDIt MjYgMTE6NDc6MzQgKzAwMDANCj4gQ29tbWl0OiAgICAgQW5kcmV3IFR1cm5lciA8YW5kcmV3QEZy ZWVCU0Qub3JnPg0KPiBDb21taXREYXRlOiAyMDIxLTAzLTAzIDE0OjE4OjAyICswMDAwDQo+IA0K PiAgICAgU3BsaXQgb3V0IHRoZSBsb2FkZXIgZWZpZmIgc2V0dXAgdG8gYSBuZXcgZnVuY3Rpb24N Cj4gICAgIA0KPiAgICAgVGhpcyBtYWtlcyBiaV9sb2FkX2VmaV9kYXRhIGNsZWFuZXIgdG8gYWRk IGNvbW1vbiBhY3BpIHNldHVwIGNvZGUuDQo+ICAgICANCj4gICAgIFJldmlld2VkIGJ5OiAgICBp bXAsIHRzb29tZQ0KPiAgICAgU3BvbnNvcmVkIGJ5OiAgIElubm92YXRlIFVLDQo+ICAgICBEaWZm ZXJlbnRpYWwgUmV2aXNpb246ICBodHRwczovL3Jldmlld3MuZnJlZWJzZC5vcmcvRDI4OTM2DQo+ IC0tLQ0KPiAgc3RhbmQvZWZpL2xvYWRlci9ib290aW5mby5jIHwgMjIgKysrKysrKysrKysrKysr KysrKysrKw0KPiAgMSBmaWxlIGNoYW5nZWQsIDIyIGluc2VydGlvbnMoKykNCj4gDQo+IGRpZmYg LS1naXQgYS9zdGFuZC9lZmkvbG9hZGVyL2Jvb3RpbmZvLmMgYi9zdGFuZC9lZmkvbG9hZGVyL2Jv b3RpbmZvLmMNCj4gaW5kZXggOTkyNDkwMWQyOWU2Li4zMjc3NTFlMzJmMGIgMTAwNjQ0DQo+IC0t LSBhL3N0YW5kL2VmaS9sb2FkZXIvYm9vdGluZm8uYw0KPiArKysgYi9zdGFuZC9lZmkvbG9hZGVy L2Jvb3RpbmZvLmMNCj4gQEAgLTI5OSw2ICsyOTksOSBAQCBiaV9sb2FkX2VmaV9kYXRhKHN0cnVj dCBwcmVsb2FkZWRfZmlsZSAqa2ZwLCBib29sIGV4aXRfYnMpDQo+ICAJYm9vbCBkb192bWFwOw0K PiAgDQo+ICAjaWYgZGVmaW5lZChfX2FtZDY0X18pIHx8IGRlZmluZWQoX19hYXJjaDY0X18pDQo+ ICtzdGF0aWMgdm9pZA0KPiArYmlfbG9hZF9lZmlmYihzdHJ1Y3QgcHJlbG9hZGVkX2ZpbGUgKmtm cCkNCj4gK3sNCj4gIAlzdHJ1Y3QgZWZpX2ZiIGVmaWZiOw0KPiAgDQo+ICAJZWZpZmIuZmJfYWRk ciA9IGdmeF9zdGF0ZS50Z19mYi5mYl9hZGRyOw0KPiBAQCAtMzIxLDYgKzMyNCwyNSBAQCBiaV9s b2FkX2VmaV9kYXRhKHN0cnVjdCBwcmVsb2FkZWRfZmlsZSAqa2ZwLCBib29sIGV4aXRfYnMpDQo+ ICANCj4gIAlpZiAoZWZpZmIuZmJfYWRkciAhPSAwKQ0KPiAgCQlmaWxlX2FkZG1ldGFkYXRhKGtm cCwgTU9ESU5GT01EX0VGSV9GQiwgc2l6ZW9mKGVmaWZiKSwgJmVmaWZiKTsNCj4gK30NCj4gKyNl bmRpZg0KPiArDQo+ICtzdGF0aWMgaW50DQo+ICtiaV9sb2FkX2VmaV9kYXRhKHN0cnVjdCBwcmVs b2FkZWRfZmlsZSAqa2ZwLCBib29sIGV4aXRfYnMpDQo+ICt7DQo+ICsJRUZJX01FTU9SWV9ERVND UklQVE9SICptbTsNCj4gKwlFRklfUEhZU0lDQUxfQUREUkVTUyBhZGRyID0gMDsNCj4gKwlFRklf U1RBVFVTIHN0YXR1czsNCj4gKwljb25zdCBjaGFyICplZmlfbm92bWFwOw0KPiArCXNpemVfdCBl ZmlzejsNCj4gKwlVSU5UTiBlZmlfbWFwa2V5Ow0KPiArCVVJTlROIGRzeiwgcGFnZXMsIHJldHJ5 LCBzejsNCj4gKwlVSU5UMzIgbW12ZXI7DQo+ICsJc3RydWN0IGVmaV9tYXBfaGVhZGVyICplZmlo ZHI7DQo+ICsJYm9vbCBkb192bWFwOw0KPiArDQo+ICsjaWYgZGVmaW5lZChfX2FtZDY0X18pIHx8 IGRlZmluZWQoX19hYXJjaDY0X18pDQo+ICsJYmlfbG9hZF9lZmlmYihrZnApOw0KPiAgI2VuZGlm DQo+ICANCj4gIAlkb192bWFwID0gdHJ1ZTsNCj4gX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX18NCj4gZGV2LWNvbW1pdHMtc3JjLW1haW5AZnJlZWJzZC5vcmcg bWFpbGluZyBsaXN0DQo+IGh0dHBzOi8vbGlzdHMuZnJlZWJzZC5vcmcvbWFpbG1hbi9saXN0aW5m by9kZXYtY29tbWl0cy1zcmMtbWFpbg0KPiBUbyB1bnN1YnNjcmliZSwgc2VuZCBhbnkgbWFpbCB0 byAiZGV2LWNvbW1pdHMtc3JjLW1haW4tdW5zdWJzY3JpYmVAZnJlZWJzZC5vcmciDQoNClRoZSBj b21taXQgc2VlbXMgdG8gcmVuZGVyICJtYWtlIGJ1aWxkd29ybGQiIGZhaWxpbmcgd2l0aCB0aGUg ZXJyb3Igc2hvd24gYmVsb3c6DQoNClsuLi5dDQotIC0tLSBhbGxfc3ViZGlyX3N0YW5kIC0tLQ0K LSAtLS0gYm9vdGluZm8ubyAtLS0NCmNjIC10YXJnZXQgeDg2XzY0LXVua25vd24tZnJlZWJzZDE0 LjAgLS1zeXNyb290PS91c3Ivb2JqL3Vzci9zcmMvYW1kNjQuYW1kNjQvdG1wDQotIC1CL3Vzci9v YmovdXNyL3NyYy9hbWQ2NC5hbWQ2NC90bXAvdXNyL2JpbiAgLU8yIC1waXBlIC1PMyAtZm5vLWNv bW1vbiAtbWFyY2g9bmF0aXZlICAtV2Zvcm1hdA0KLSAtZnNob3J0LXdjaGFyIC1tbm8tcmVkLXpv bmUgLW5vc3RkaW5jICAgIC1JL3Vzci9vYmovdXNyL3NyYy9hbWQ2NC5hbWQ2NC9zdGFuZC9saWJz YQ0KLSAtSS91c3Ivc3JjL3N0YW5kL2xpYnNhIC1EX1NUQU5EQUxPTkUgLUkvdXNyL3NyYy9zeXMg LURkb3VibGU9amFnZ2VkLWxpdHRsZS1waWxsDQotIC1EZmxvYXQ9ZmxvYXR5LW1jZmxvYXRmYWNl IC1mZnVuY3Rpb24tc2VjdGlvbnMgLWZkYXRhLXNlY3Rpb25zIC1ETE9BREVSX0dFTElfU1VQUE9S VA0KLSAtSS91c3Ivc3JjL3N0YW5kL2xpYnNhL2dlbGkgLURMT0FERVJfRElTS19TVVBQT1JUIC1m ZnJlZXN0YW5kaW5nIC1tbm8tbW14IC1tbm8tc3NlIC1tbm8tYXZ4DQotIC1tbm8tYXZ4MiAtbXNv ZnQtZmxvYXQgLWZQSUMgLW1uby1yZWQtem9uZSAtbW5vLXJlbGF4IC1JLiAtSWluY2x1ZGUNCi0g LUkvdXNyL3NyYy9zdGFuZC9lZmkvbG9hZGVyXzR0aC8uLi9sb2FkZXIgLUkvdXNyL3NyYy9zdGFu ZC9saWJzYS96ZnMNCi0gLUkvdXNyL3NyYy9zeXMvY29udHJpYi9vcGVuemZzL2luY2x1ZGUgLUkv dXNyL3NyYy9zeXMvY29udHJpYi9vcGVuemZzL2luY2x1ZGUvb3MvZnJlZWJzZC96ZnMNCi0gLURF RklfWkZTX0JPT1QgLWZQSUMgLUkvdXNyL3NyYy9zdGFuZC9lZmkvbG9hZGVyXzR0aA0KLSAtSS91 c3Ivc3JjL3N0YW5kL2VmaS9sb2FkZXJfNHRoL2FyY2gvYW1kNjQgLUkvdXNyL3NyYy9zdGFuZC9l ZmkvaW5jbHVkZQ0KLSAtSS91c3Ivc3JjL3N0YW5kL2VmaS9pbmNsdWRlL2FtZDY0IC1JL3Vzci9z cmMvc3lzL2NvbnRyaWIvZGV2L2FjcGljYS9pbmNsdWRlDQotIC1JL3Vzci9zcmMvc3RhbmQvaTM4 Ni9saWJpMzg2IC1ERUZJIC1ERUZJX1NFQ1VSRUJPT1QgLUkvdXNyL3NyYy9zdGFuZC9jb21tb24g LWZQSUMNCi0gLUkvdXNyL3NyYy9zdGFuZC9maWNsIC1JL3Vzci9zcmMvc3RhbmQvZmljbC9hbWQ2 NCAtSS91c3Ivc3JjL3N0YW5kL2NvbW1vbiAtREJGX0RJQ1RTSVpFPTMwMDAwDQotIC1ETE9BREVS X1ZFUklFWEVDIC1JL3Vzci9zcmMvbGliL2xpYnNlY3VyZWJvb3QvaCAtRExPQURFUl9WRVJJRVhF Qw0KLSAtSS91c3Ivc3JjL2xpYi9saWJzZWN1cmVib290L2ggLURMT0FERVJfVkVSSUVYRUNfVkVD VFggLURMT0FERVJfTVNET1NfU1VQUE9SVA0KLSAtRExPQURFUl9VRlNfU1VQUE9SVCAtRExPQURF Ul9ORVRfU1VQUE9SVCAtRExPQURFUl9HUFRfU1VQUE9SVCAtRExPQURFUl9NQlJfU1VQUE9SVA0K LSAtRExPQURFUl9aRlNfU1VQUE9SVCAtSS91c3Ivc3JjL3N0YW5kL2xpYnNhL3pmcyAtSS91c3Iv c3JjL3N5cy9jZGRsL2Jvb3QvemZzDQotIC1JL3Vzci9zcmMvc3lzL2NkZGwvY29udHJpYi9vcGVu c29sYXJpcy91dHMvY29tbW9uIC1ETkRFQlVHIC1mUElFIC1NRCAgLU1GLmRlcGVuZC5ib290aW5m by5vDQotIC1NVGJvb3RpbmZvLm8gLXN0ZD1nbnU5OSAtV25vLWZvcm1hdC16ZXJvLWxlbmd0aCAt V3N5c3RlbS1oZWFkZXJzIC1Xbm8tcG9pbnRlci1zaWduDQotIC1Xbm8tZW1wdHktYm9keSAtV25v LXN0cmluZy1wbHVzLWludCAtV25vLXVudXNlZC1jb25zdC12YXJpYWJsZSAtV25vLXRhdXRvbG9n aWNhbC1jb21wYXJlDQotIC1Xbm8tdW51c2VkLXZhbHVlIC1Xbm8tcGFyZW50aGVzZXMtZXF1YWxp dHkgLVduby11bnVzZWQtZnVuY3Rpb24gLVduby1lbnVtLWNvbnZlcnNpb24NCi0gLVduby11bnVz ZWQtbG9jYWwtdHlwZWRlZiAtV25vLWFkZHJlc3Mtb2YtcGFja2VkLW1lbWJlciAtV25vLXN3aXRj aCAtV25vLXN3aXRjaC1lbnVtDQotIC1Xbm8ta25yLXByb21vdGVkLXBhcmFtZXRlciAtV25vLXBh cmVudGhlc2VzICAtT3ogLVF1bnVzZWQtYXJndW1lbnRzIC1JL3Vzci9zcmMvc3lzL3Rla2VuDQot IC1JL3Vzci9zcmMvY29udHJpYi9wbmdsaXRlICAgLWMgL3Vzci9zcmMvc3RhbmQvZWZpL2xvYWRl cl80dGgvLi4vbG9hZGVyL2Jvb3RpbmZvLmMgLW8NCmJvb3RpbmZvLm8gLS0tIGFsbF9zdWJkaXJf c2hhcmUgLS0tIC0tLSBhbGxfc3ViZGlyX3NoYXJlL2kxOG4vY3NtYXBwZXIvQklHNSAtLS0gPT09 Pg0Kc2hhcmUvaTE4bi9jc21hcHBlci9CSUc1IChhbGwpIC0tLSBhbGxfc3ViZGlyX3NoYXJlL2kx OG4vY3NtYXBwZXIvQ05TIC0tLSA9PT0+DQpzaGFyZS9pMThuL2NzbWFwcGVyL0NOUyAoYWxsKSAt LS0gYWxsX3N1YmRpcl9zaGFyZS9pMThuL2NzbWFwcGVyL0NQIC0tLSA9PT0+DQpzaGFyZS9pMThu L2NzbWFwcGVyL0NQIChhbGwpIC0tLSBhbGxfc3ViZGlyX3N0YW5kIC0tLQ0KL3Vzci9zcmMvc3Rh bmQvZWZpL2xvYWRlcl80dGgvLi4vbG9hZGVyL2Jvb3RpbmZvLmM6MzA0OjE6IGVycm9yOiBmdW5j dGlvbiBkZWZpbml0aW9uIGlzIG5vdA0KYWxsb3dlZCBoZXJlIC0tLSBhbGxfc3ViZGlyX3NoYXJl IC0tLSAtLS0gYWxsX3N1YmRpcl9zaGFyZS9leGFtcGxlcyAtLS0gLS0tDQphbGxfc3ViZGlyX3No YXJlL2V4YW1wbGVzL2lwZmlsdGVyIC0tLSA9PT0+IHNoYXJlL2V4YW1wbGVzL2lwZmlsdGVyIChh bGwpDQoNCm1ha2VbMV06IHN0b3BwZWQgaW4gL3Vzci9zcmMNCg0KDQotIC0tIA0KTy4gSGFydG1h bm4NCg0KSWNoIHdpZGVyc3ByZWNoZSBkZXIgTnV0enVuZyBvZGVyIMOcYmVybWl0dGx1bmcgbWVp bmVyIERhdGVuIGbDvHINCldlcmJlendlY2tlIG9kZXIgZsO8ciBkaWUgTWFya3QtIG9kZXIgTWVp bnVuZ3Nmb3JzY2h1bmcgKMKnIDI4IEFicy4gNCBCRFNHKS4NCi0tLS0tQkVHSU4gUEdQIFNJR05B VFVSRS0tLS0tDQoNCmlIVUVBUllJQUIwV0lRU3k4SUJ4QVBEa3FWQmFUSjQ0TjFaWlBiYTVSd1VD WUQrditRQUtDUkE0TjFaWlBiYTUNClJ5eVlBUDBmanhjVVRsV3M4dmNUZExYNUZCcFljd1Z2SDN0 Zzd4OThpNEZ5ekJMdExnRDdCbG0wb1hYWkJKTnANCjZnOTZwUWVxVi85VUVDQTZrRStyZEF1N2Vz UkROQWc9DQo9ZXkwOA0KLS0tLS1FTkQgUEdQIFNJR05BVFVSRS0tLS0tDQo= From owner-dev-commits-src-main@freebsd.org Wed Mar 3 15:55:18 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2C77256E7FD; Wed, 3 Mar 2021 15:55:18 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DrJVZ0p1kz4Rqx; Wed, 3 Mar 2021 15:55:18 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from comporellon.tachypleus.net (unknown [IPv6:2601:405:4a00:acd:cc7b:682b:f804:9afd]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: nwhitehorn/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id BA41522D98; Wed, 3 Mar 2021 15:55:17 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) To: Warner Losh Cc: Brandon Bergren , "Rodney W. Grimes" , Ed Maste , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202103031253.123CrxKG051357@gndrsh.dnsmgr.net> <14d09680-1036-4a7e-8a0e-c3063cac8bc9@www.fastmail.com> From: Nathan Whitehorn Subject: Re: git: 2c26d77d989a - main - Remove /boot/efi from mtree, missed in 0b7472b3d8d2. Message-ID: <6e52fee6-a2fd-584f-757e-e77a8f8ea8eb@freebsd.org> Date: Wed, 3 Mar 2021 10:55:17 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Content-Language: en-US X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 15:55:18 -0000 On 3/3/21 10:38 AM, Warner Losh wrote: > > > On Wed, Mar 3, 2021 at 7:13 AM Nathan Whitehorn=20 > > wrote: > > > > On 3/3/21 9:05 AM, Brandon Bergren wrote: > > On Wed, Mar 3, 2021, at 6:53 AM, Rodney W. Grimes wrote: > >> What am I missing here?=C2=A0 One place I am being told this is = run in > >> an environment that may not even be an EFI booted system, and in= > >> another place it is being used as a test if something is mounted= > >> on it, which should only be true on an EFI booted system. > > That the script in question is a generic script that runs as > part of bsdinstall on every platform and has to be universal. > > > > The actual *problem* here is that > usr.sbin/bsdinstall/scripts/bootconfig has a default case that is > >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 *)=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 die "Unsupported arch $(uname -m) for > UEFI install" > > > > which then causes the main script to bail out, leaving the > system in a half-installed state. > > > > If that had just been an exit 0 this would have never been a > problem, I suppose. > > > > Before the original change that broke this, there was a check > that the script was not running on powerpc or mips platforms > before running the efi bits, but this got taken out. > > > > Well, incidentally. The bootconfig script needs to know if there > is an > ESP it should configure, but the signalling mechanism (the > presence of > the ESP mount point) was being broken by mtree making that director= y > unconditionally even on systems that don't use EFI. So then > bootconfig > tried to set it up, but failed later on, because there was no EFI > loader > to set up. The mtree change makes the ESP mount point only exist on= > systems with an ESP. > > > So you made a unilateral change, without discussion of the bigger=20 > design, to something without even asking the original person who made=20 > the change to mtree about it for what sounds like an obscure case in=20 > the installer that could be solved in a different way? It's trivial=20 > enough to look at the boot method sysctl and skip the EFI update if we = > didn't boot EFI (and if by change that's not on all systems, it's easy = > enough to add it on all systems). I have no notion about why that=20 > wasn't considered, at least, before jumping in and taking people by=20 > surprise. > > Next time, talk to people first. That's the whole point of having=20 > review tools, mailing list and git blame. > > Warner This method of testing was in the original review here posted on Feb.=20 23: https://reviews.freebsd.org/D28897 The description of the test procedure you're objecting to was even in=20 the summary! Then we had a discussion by email about the change to mtree = on the committers list on Feb. 28 to resolve a bug affecting PowerPC in=20 the patch reviewed and approved by you. I then waited several days and=20 had a long thread for several days on the mailing list about the=20 approach. coming up with this short patch -- again, as a bug fix to a=20 reviewed approach. We can change the logic -- that's fine! But, to paraphrase, the reason=20 we have reviews is so people like you can look at the review and note=20 these kinds of problems when they are reviewed, not after the commit=20 goes in. There's a significant amount of whiplash when you do get=20 patches reviewed, approved, and then the person who reviewed and=20 approved them accuses you of "taking people by surprise". The installer *does* mount the partition in advance, so checking whether = there is a mounted file system is a perfectly reasonable test to do. We=20 could also check fstab. I would like to understand what is actually=20 wrong here first, though. Especially after this misfire -- which is=20 problematic for reasons that are still not clear to me, since there are=20 a number of standard directories in hier(7) not in mtree -- I want to=20 make sure we actually do have consensus about what is changing and why. -Nathan From owner-dev-commits-src-main@freebsd.org Wed Mar 3 16:11:08 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C323856F085; Wed, 3 Mar 2021 16:11:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DrJrr5DYXz4Str; Wed, 3 Mar 2021 16:11:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A4F054945; Wed, 3 Mar 2021 16:11:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 123GB8Rk024815; Wed, 3 Mar 2021 16:11:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 123GB8xe024814; Wed, 3 Mar 2021 16:11:08 GMT (envelope-from git) Date: Wed, 3 Mar 2021 16:11:08 GMT Message-Id: <202103031611.123GB8xe024814@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marcin Wojtas Subject: git: 622d17da46eb - main - arm64: mv_ap806_gicp: Fix spi_ranges_cnt MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mw X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 622d17da46eb360c3d6847e4da8dbb166b775d14 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 16:11:08 -0000 The branch main has been updated by mw: URL: https://cgit.FreeBSD.org/src/commit/?id=622d17da46eb360c3d6847e4da8dbb166b775d14 commit 622d17da46eb360c3d6847e4da8dbb166b775d14 Author: Zyta Szpak AuthorDate: 2021-02-19 14:31:45 +0000 Commit: Marcin Wojtas CommitDate: 2021-03-03 16:08:12 +0000 arm64: mv_ap806_gicp: Fix spi_ranges_cnt Previously the spi_ranges_cnt stored the table size in bytes instead of the number of elements. Fix that. Reviewed by: mmel Submitted by: Zyta Szpak Obtained from: Semihalf Sponsored by: Marvell --- sys/arm/mv/mv_ap806_gicp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/arm/mv/mv_ap806_gicp.c b/sys/arm/mv/mv_ap806_gicp.c index da93a32f2b23..0a1a69707956 100644 --- a/sys/arm/mv/mv_ap806_gicp.c +++ b/sys/arm/mv/mv_ap806_gicp.c @@ -107,8 +107,8 @@ mv_ap806_gicp_attach(device_t dev) return (ENXIO); } - sc->spi_ranges_cnt = OF_getencprop_alloc(node, "marvell,spi-ranges", - (void **)&sc->spi_ranges); + sc->spi_ranges_cnt = OF_getencprop_alloc_multi(node, "marvell,spi-ranges", + sizeof(*sc->spi_ranges), (void **)&sc->spi_ranges); xref = OF_xref_from_node(node); if (intr_pic_register(dev, xref) == NULL) { @@ -153,7 +153,7 @@ mv_ap806_gicp_convert_map_data(struct mv_ap806_gicp_softc *sc, sc->parent_map_data->cells[2] = irq_type; /* Map the interrupt number to SPI number */ - for (i = 0; i < sc->spi_ranges_cnt / 2; i += 2) { + for (i = 0; i < sc->spi_ranges_cnt; i += 2) { if (irq_num < sc->spi_ranges[i + 1]) { irq_num += sc->spi_ranges[i]; break; From owner-dev-commits-src-main@freebsd.org Wed Mar 3 16:19:33 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 68A6D56F4E4; Wed, 3 Mar 2021 16:19:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DrK2Y2Z7Lz4V0d; Wed, 3 Mar 2021 16:19:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4B0294C9D; Wed, 3 Mar 2021 16:19:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 123GJXaF029578; Wed, 3 Mar 2021 16:19:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 123GJXKW029577; Wed, 3 Mar 2021 16:19:33 GMT (envelope-from git) Date: Wed, 3 Mar 2021 16:19:33 GMT Message-Id: <202103031619.123GJXKW029577@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 773fc43fb060 - main - Revert "Split out the loader efifb setup to a new function" MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 773fc43fb060149f8e59c183e5da79feaf118c8c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 16:19:33 -0000 The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=773fc43fb060149f8e59c183e5da79feaf118c8c commit 773fc43fb060149f8e59c183e5da79feaf118c8c Author: Andrew Turner AuthorDate: 2021-03-03 16:09:00 +0000 Commit: Andrew Turner CommitDate: 2021-03-03 16:10:12 +0000 Revert "Split out the loader efifb setup to a new function" It was broken by a rebase. Revert until it can be fixed. This reverts commit c8db60c0673d4bb7a3a3e2c043804e1ed1108c2f. --- stand/efi/loader/bootinfo.c | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/stand/efi/loader/bootinfo.c b/stand/efi/loader/bootinfo.c index 327751e32f0b..9924901d29e6 100644 --- a/stand/efi/loader/bootinfo.c +++ b/stand/efi/loader/bootinfo.c @@ -299,9 +299,6 @@ bi_load_efi_data(struct preloaded_file *kfp, bool exit_bs) bool do_vmap; #if defined(__amd64__) || defined(__aarch64__) -static void -bi_load_efifb(struct preloaded_file *kfp) -{ struct efi_fb efifb; efifb.fb_addr = gfx_state.tg_fb.fb_addr; @@ -324,25 +321,6 @@ bi_load_efifb(struct preloaded_file *kfp) if (efifb.fb_addr != 0) file_addmetadata(kfp, MODINFOMD_EFI_FB, sizeof(efifb), &efifb); -} -#endif - -static int -bi_load_efi_data(struct preloaded_file *kfp, bool exit_bs) -{ - EFI_MEMORY_DESCRIPTOR *mm; - EFI_PHYSICAL_ADDRESS addr = 0; - EFI_STATUS status; - const char *efi_novmap; - size_t efisz; - UINTN efi_mapkey; - UINTN dsz, pages, retry, sz; - UINT32 mmver; - struct efi_map_header *efihdr; - bool do_vmap; - -#if defined(__amd64__) || defined(__aarch64__) - bi_load_efifb(kfp); #endif do_vmap = true; From owner-dev-commits-src-main@freebsd.org Wed Mar 3 16:20:34 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CC58C56F926; Wed, 3 Mar 2021 16:20:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DrK3k5V8Sz4VLl; Wed, 3 Mar 2021 16:20:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AF14F47FB; Wed, 3 Mar 2021 16:20:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 123GKYRr037218; Wed, 3 Mar 2021 16:20:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 123GKYCs037217; Wed, 3 Mar 2021 16:20:34 GMT (envelope-from git) Date: Wed, 3 Mar 2021 16:20:34 GMT Message-Id: <202103031620.123GKYCs037217@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Chris Rees Subject: git: 25352f9fda43 - main - Minor grammar nit MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: crees X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 25352f9fda43f6ad112d78a8a6e00b77259802d7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 16:20:34 -0000 The branch main has been updated by crees (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=25352f9fda43f6ad112d78a8a6e00b77259802d7 commit 25352f9fda43f6ad112d78a8a6e00b77259802d7 Author: Andreas Bjornestad AuthorDate: 2021-03-03 16:17:26 +0000 Commit: Chris Rees CommitDate: 2021-03-03 16:20:29 +0000 Minor grammar nit PR: docs/253975 --- lib/geom/part/gpart.8 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/geom/part/gpart.8 b/lib/geom/part/gpart.8 index 378971cbd773..d27844f709e9 100644 --- a/lib/geom/part/gpart.8 +++ b/lib/geom/part/gpart.8 @@ -169,7 +169,7 @@ to be multiple of value. .It Fl b Ar start The logical block address where the partition will begin. -A SI unit suffix is allowed. +An SI unit suffix is allowed. .It Fl f Ar flags Additional operational flags. See the section entitled @@ -188,7 +188,7 @@ partition labels. .It Fl s Ar size Create a partition of size .Ar size . -A SI unit suffix is allowed. +An SI unit suffix is allowed. .It Fl t Ar type Create a partition of type .Ar type . @@ -424,7 +424,7 @@ about its use. Specifies the index of the partition to be resized. .It Fl s Ar size Specifies the new size of the partition, in logical blocks. -A SI unit suffix is allowed. +An SI unit suffix is allowed. .El .\" ==== RESTORE ==== .It Cm restore From owner-dev-commits-src-main@freebsd.org Wed Mar 3 16:21:58 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1CC6656FA3D; Wed, 3 Mar 2021 16:21:58 +0000 (UTC) (envelope-from andrew@freebsd.org) Received: from fry.fubar.geek.nz (fry.fubar.geek.nz [139.59.165.16]) by mx1.freebsd.org (Postfix) with ESMTP id 4DrK5K6r7Kz4VNk; Wed, 3 Mar 2021 16:21:57 +0000 (UTC) (envelope-from andrew@freebsd.org) Received: from [192.168.42.21] (cpc91232-cmbg18-2-0-cust554.5-4.cable.virginm.net [82.2.126.43]) by fry.fubar.geek.nz (Postfix) with ESMTPSA id 75F054E716; Wed, 3 Mar 2021 16:21:24 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.17\)) Subject: Re: git: c8db60c0673d - main - Split out the loader efifb setup to a new function From: Andrew Turner In-Reply-To: <20210303164913.010b2f03@thor.intern.walstatt.dynvpn.de> Date: Wed, 3 Mar 2021 16:21:19 +0000 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <6989F292-2908-4E97-A50E-19C80648A6F8@freebsd.org> References: <202103031426.123EQmU4082875@gitrepo.freebsd.org> <20210303164913.010b2f03@thor.intern.walstatt.dynvpn.de> To: "O. Hartmann" X-Mailer: Apple Mail (2.3445.104.17) X-Rspamd-Queue-Id: 4DrK5K6r7Kz4VNk X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 16:21:58 -0000 > On 3 Mar 2021, at 15:48, O. Hartmann wrote: >=20 > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 >=20 > Am Wed, 3 Mar 2021 14:26:48 GMT > Andrew Turner schrieb: >=20 >> The branch main has been updated by andrew: >>=20 >> URL: = https://cgit.FreeBSD.org/src/commit/?id=3Dc8db60c0673d4bb7a3a3e2c043804e1e= d1108c2f >>=20 >> commit c8db60c0673d4bb7a3a3e2c043804e1ed1108c2f >> Author: Andrew Turner >> AuthorDate: 2021-02-26 11:47:34 +0000 >> Commit: Andrew Turner >> CommitDate: 2021-03-03 14:18:02 +0000 >>=20 >> Split out the loader efifb setup to a new function >>=20 >> This makes bi_load_efi_data cleaner to add common acpi setup code. >>=20 >> Reviewed by: imp, tsoome >> Sponsored by: Innovate UK >> Differential Revision: https://reviews.freebsd.org/D28936 >> --- >> stand/efi/loader/bootinfo.c | 22 ++++++++++++++++++++++ >> 1 file changed, 22 insertions(+) >>=20 >> diff --git a/stand/efi/loader/bootinfo.c = b/stand/efi/loader/bootinfo.c >> index 9924901d29e6..327751e32f0b 100644 >> --- a/stand/efi/loader/bootinfo.c >> +++ b/stand/efi/loader/bootinfo.c >> @@ -299,6 +299,9 @@ bi_load_efi_data(struct preloaded_file *kfp, bool = exit_bs) >> bool do_vmap; >>=20 >> #if defined(__amd64__) || defined(__aarch64__) >> +static void >> +bi_load_efifb(struct preloaded_file *kfp) >> +{ >> struct efi_fb efifb; >>=20 >> efifb.fb_addr =3D gfx_state.tg_fb.fb_addr; >> @@ -321,6 +324,25 @@ bi_load_efi_data(struct preloaded_file *kfp, = bool exit_bs) >>=20 >> if (efifb.fb_addr !=3D 0) >> file_addmetadata(kfp, MODINFOMD_EFI_FB, sizeof(efifb), = &efifb); >> +} >> +#endif >> + >> +static int >> +bi_load_efi_data(struct preloaded_file *kfp, bool exit_bs) >> +{ >> + EFI_MEMORY_DESCRIPTOR *mm; >> + EFI_PHYSICAL_ADDRESS addr =3D 0; >> + EFI_STATUS status; >> + const char *efi_novmap; >> + size_t efisz; >> + UINTN efi_mapkey; >> + UINTN dsz, pages, retry, sz; >> + UINT32 mmver; >> + struct efi_map_header *efihdr; >> + bool do_vmap; >> + >> +#if defined(__amd64__) || defined(__aarch64__) >> + bi_load_efifb(kfp); >> #endif >>=20 >> do_vmap =3D true; >> _______________________________________________ >> dev-commits-src-main@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main >> To unsubscribe, send any mail to = "dev-commits-src-main-unsubscribe@freebsd.org" >=20 > The commit seems to render "make buildworld" failing with the error = shown below: >=20 > [...] > - --- all_subdir_stand --- > - --- bootinfo.o --- > cc -target x86_64-unknown-freebsd14.0 = --sysroot=3D/usr/obj/usr/src/amd64.amd64/tmp > - -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin -O2 -pipe -O3 = -fno-common -march=3Dnative -Wformat > - -fshort-wchar -mno-red-zone -nostdinc = -I/usr/obj/usr/src/amd64.amd64/stand/libsa > - -I/usr/src/stand/libsa -D_STANDALONE -I/usr/src/sys = -Ddouble=3Djagged-little-pill > - -Dfloat=3Dfloaty-mcfloatface -ffunction-sections -fdata-sections = -DLOADER_GELI_SUPPORT > - -I/usr/src/stand/libsa/geli -DLOADER_DISK_SUPPORT -ffreestanding = -mno-mmx -mno-sse -mno-avx > - -mno-avx2 -msoft-float -fPIC -mno-red-zone -mno-relax -I. -Iinclude > - -I/usr/src/stand/efi/loader_4th/../loader -I/usr/src/stand/libsa/zfs > - -I/usr/src/sys/contrib/openzfs/include = -I/usr/src/sys/contrib/openzfs/include/os/freebsd/zfs > - -DEFI_ZFS_BOOT -fPIC -I/usr/src/stand/efi/loader_4th > - -I/usr/src/stand/efi/loader_4th/arch/amd64 = -I/usr/src/stand/efi/include > - -I/usr/src/stand/efi/include/amd64 = -I/usr/src/sys/contrib/dev/acpica/include > - -I/usr/src/stand/i386/libi386 -DEFI -DEFI_SECUREBOOT = -I/usr/src/stand/common -fPIC > - -I/usr/src/stand/ficl -I/usr/src/stand/ficl/amd64 = -I/usr/src/stand/common -DBF_DICTSIZE=3D30000 > - -DLOADER_VERIEXEC -I/usr/src/lib/libsecureboot/h -DLOADER_VERIEXEC > - -I/usr/src/lib/libsecureboot/h -DLOADER_VERIEXEC_VECTX = -DLOADER_MSDOS_SUPPORT > - -DLOADER_UFS_SUPPORT -DLOADER_NET_SUPPORT -DLOADER_GPT_SUPPORT = -DLOADER_MBR_SUPPORT > - -DLOADER_ZFS_SUPPORT -I/usr/src/stand/libsa/zfs = -I/usr/src/sys/cddl/boot/zfs > - -I/usr/src/sys/cddl/contrib/opensolaris/uts/common -DNDEBUG -fPIE = -MD -MF.depend.bootinfo.o > - -MTbootinfo.o -std=3Dgnu99 -Wno-format-zero-length -Wsystem-headers = -Wno-pointer-sign > - -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable = -Wno-tautological-compare > - -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function = -Wno-enum-conversion > - -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch = -Wno-switch-enum > - -Wno-knr-promoted-parameter -Wno-parentheses -Oz -Qunused-arguments = -I/usr/src/sys/teken > - -I/usr/src/contrib/pnglite -c = /usr/src/stand/efi/loader_4th/../loader/bootinfo.c -o > bootinfo.o --- all_subdir_share --- --- = all_subdir_share/i18n/csmapper/BIG5 --- =3D=3D=3D> > share/i18n/csmapper/BIG5 (all) --- all_subdir_share/i18n/csmapper/CNS = --- =3D=3D=3D> > share/i18n/csmapper/CNS (all) --- all_subdir_share/i18n/csmapper/CP = --- =3D=3D=3D> > share/i18n/csmapper/CP (all) --- all_subdir_stand --- > /usr/src/stand/efi/loader_4th/../loader/bootinfo.c:304:1: error: = function definition is not > allowed here --- all_subdir_share --- --- all_subdir_share/examples = --- --- > all_subdir_share/examples/ipfilter --- =3D=3D=3D> = share/examples/ipfilter (all) >=20 > make[1]: stopped in /usr/src It looks like it might have been broken by a rebase. I=E2=80=99ve = reverted until I have time to fix. Andrew From owner-dev-commits-src-main@freebsd.org Wed Mar 3 16:39:01 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B4E3F56FFF6; Wed, 3 Mar 2021 16:39:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DrKT14p87z4WvM; Wed, 3 Mar 2021 16:39:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 97A7D519B; Wed, 3 Mar 2021 16:39:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 123Gd1Tv056029; Wed, 3 Mar 2021 16:39:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 123Gd1l7056028; Wed, 3 Mar 2021 16:39:01 GMT (envelope-from git) Date: Wed, 3 Mar 2021 16:39:01 GMT Message-Id: <202103031639.123Gd1l7056028@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Chris Rees Subject: git: 29358694281f - main - crontab.5: Correct claims on ranges and names MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: crees X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 29358694281ffa12c7dc8b94f09a9a146579fe6e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 16:39:01 -0000 The branch main has been updated by crees (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=29358694281ffa12c7dc8b94f09a9a146579fe6e commit 29358694281ffa12c7dc8b94f09a9a146579fe6e Author: Chris Rees AuthorDate: 2021-03-03 16:35:45 +0000 Commit: Chris Rees CommitDate: 2021-03-03 16:35:45 +0000 crontab.5: Correct claims on ranges and names Ranges use the function get_number, which means that ranges of names are supported and indeed always have been, righ back to the initial import. PR: docs/253969 Reported by: Ben Bullock --- usr.sbin/cron/crontab/crontab.5 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/usr.sbin/cron/crontab/crontab.5 b/usr.sbin/cron/crontab/crontab.5 index 44c3c3a36f0f..0e48a0d804f4 100644 --- a/usr.sbin/cron/crontab/crontab.5 +++ b/usr.sbin/cron/crontab/crontab.5 @@ -203,8 +203,7 @@ Names can also be used for the ``month'' and ``day of week'' fields. Use the first three letters of the particular day or month (case does not matter). -Ranges or -lists of names are not allowed. +Ranges and lists are also allowed. .Pp The ``sixth'' field (the rest of the line) specifies the command to be run. From owner-dev-commits-src-main@freebsd.org Wed Mar 3 16:52:40 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 59399548E02; Wed, 3 Mar 2021 16:52:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DrKmm27q9z4YJQ; Wed, 3 Mar 2021 16:52:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3C42B516E; Wed, 3 Mar 2021 16:52:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 123Gqevd081504; Wed, 3 Mar 2021 16:52:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 123GqeFq081503; Wed, 3 Mar 2021 16:52:40 GMT (envelope-from git) Date: Wed, 3 Mar 2021 16:52:40 GMT Message-Id: <202103031652.123GqeFq081503@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: f2f24008a2b1 - main - Cirrus-CI: Add more information to help track down disk full issues MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f2f24008a2b1b3c7a1c4b75e9b9c2d0f08abc27b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 16:52:40 -0000 The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=f2f24008a2b1b3c7a1c4b75e9b9c2d0f08abc27b commit f2f24008a2b1b3c7a1c4b75e9b9c2d0f08abc27b Author: Ed Maste AuthorDate: 2021-03-01 21:19:01 +0000 Commit: Ed Maste CommitDate: 2021-03-03 16:51:08 +0000 Cirrus-CI: Add more information to help track down disk full issues Execute df(1) before and after the build (reporting in MiB for consistency), and du(1) of /usr/obj. Also include the uname. --- .cirrus.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 5e1b9fa3f9ee..0b1814790071 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -15,9 +15,13 @@ task: install_script: - pkg install -y llvm11 setup_script: - - df -h + - uname -a + - df -m - pw useradd user - mkdir -p /usr/obj/$(pwd -P) - chown user:user /usr/obj/$(pwd -P) script: - su user -c "make -j$(sysctl -n hw.ncpu) CROSS_TOOLCHAIN=llvm11 WITHOUT_TOOLCHAIN=yes buildworld buildkernel" + post_script: + - df -m + - du -m -s /usr/obj From owner-dev-commits-src-main@freebsd.org Wed Mar 3 16:53:56 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 00805548C57 for ; Wed, 3 Mar 2021 16:53:56 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x72e.google.com (mail-qk1-x72e.google.com [IPv6:2607:f8b0:4864:20::72e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DrKpC65zPz4YXp for ; Wed, 3 Mar 2021 16:53:55 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x72e.google.com with SMTP id l4so9868518qkl.0 for ; Wed, 03 Mar 2021 08:53:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=z1TFELr0rieE1fJITpeppTIQj7JRe8DaH221JOdljoI=; b=DRp+uaH70TsfNpkCd70PEDvA7BoeMOkh44EK2Lh85Sej3jdmAYaPBqyAYW2DLO0Mtb 5VcJ/XOlYFQpJQlyltJ+cYv3fv927koJmTxomKdJQDwo/lgPV1bs+Pe8wQ9m/hg2jrch x0bgXqDeX7mL39t0DXO4Cp/pzQuKOcm8+Hf0AvK4IQOiQRgPQ8GlWWMcE1tSHPYVT64A mq/9VW9mCESKmSY29zey/yR0ajp+QB0w1FMuQLPn1maMOxVwP5jZwT6JD7Vjbtqvt6AI stvMTiBvL/pNhcmwapqn6VCia0KNS3IAqh+2E2SbOSo3bB8dXoTjwAnjdmOj+NF2SlXP Qn1w== 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=z1TFELr0rieE1fJITpeppTIQj7JRe8DaH221JOdljoI=; b=fAHP8w64gStv2a1gUCz6N9tQx4o87QFZX11q3G4hDURYQuTcPZ7hHe5YrQBglz4qgY NgmYMl1cnNtaORPtDhutfpaYw3Q51z9wCvUK31rmOeMvpmGGWTyR333TnJYLkIc4VlwZ VKCXFu57awQoB4QqZ0ZaR/IvAtL+zQoKqRKFRu81Zu6bTCJNMY2KI7+2uUKg1CSoDvBM Lf7ZQIJ9rNstec+cgLjUKZxcDpi2FeegY98kY414fM239y+aA7cxHNH4WSiOP4Z8/AT0 KKX/3X1fZOtPfGhQSFxmkxrf4g1GjDyrBB6coRvMe3RD5oBzIz83VN59aIdYvKuE5SNz yAgA== X-Gm-Message-State: AOAM5315xNBJz/541ZpjhlGpsTL69aTzcK8LAcqPYCUdpUpRHLwPyRFP ans1uy247j/yBoKzJHYnraWiX7zkcZh0ElV2cOYKpw== X-Google-Smtp-Source: ABdhPJzymoQ/QZfJpFMPSy6kfJbJcoJAj7I1E74EDWa7eEGWTTsGhI55SN2/8WIj6VqCHU3GJ7/zUsSgGfrXgVPeT6Y= X-Received: by 2002:a37:a085:: with SMTP id j127mr24301369qke.206.1614790434739; Wed, 03 Mar 2021 08:53:54 -0800 (PST) MIME-Version: 1.0 References: <202103031253.123CrxKG051357@gndrsh.dnsmgr.net> <14d09680-1036-4a7e-8a0e-c3063cac8bc9@www.fastmail.com> <6e52fee6-a2fd-584f-757e-e77a8f8ea8eb@freebsd.org> In-Reply-To: <6e52fee6-a2fd-584f-757e-e77a8f8ea8eb@freebsd.org> From: Warner Losh Date: Wed, 3 Mar 2021 09:53:43 -0700 Message-ID: Subject: Re: git: 2c26d77d989a - main - Remove /boot/efi from mtree, missed in 0b7472b3d8d2. To: Nathan Whitehorn Cc: Brandon Bergren , "Rodney W. Grimes" , Ed Maste , src-committers , "" , dev-commits-src-main@freebsd.org X-Rspamd-Queue-Id: 4DrKpC65zPz4YXp X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 16:53:56 -0000 On Wed, Mar 3, 2021 at 8:55 AM Nathan Whitehorn wrote: > > > On 3/3/21 10:38 AM, Warner Losh wrote: > > > > > > On Wed, Mar 3, 2021 at 7:13 AM Nathan Whitehorn > > > wrote: > > > > > > > > On 3/3/21 9:05 AM, Brandon Bergren wrote: > > > On Wed, Mar 3, 2021, at 6:53 AM, Rodney W. Grimes wrote: > > >> What am I missing here? One place I am being told this is run in > > >> an environment that may not even be an EFI booted system, and in > > >> another place it is being used as a test if something is mounted > > >> on it, which should only be true on an EFI booted system. > > > That the script in question is a generic script that runs as > > part of bsdinstall on every platform and has to be universal. > > > > > > The actual *problem* here is that > > usr.sbin/bsdinstall/scripts/bootconfig has a default case that is > > > *) die "Unsupported arch $(uname -m) for > > UEFI install" > > > > > > which then causes the main script to bail out, leaving the > > system in a half-installed state. > > > > > > If that had just been an exit 0 this would have never been a > > problem, I suppose. > > > > > > Before the original change that broke this, there was a check > > that the script was not running on powerpc or mips platforms > > before running the efi bits, but this got taken out. > > > > > > > Well, incidentally. The bootconfig script needs to know if there > > is an > > ESP it should configure, but the signalling mechanism (the > > presence of > > the ESP mount point) was being broken by mtree making that directory > > unconditionally even on systems that don't use EFI. So then > > bootconfig > > tried to set it up, but failed later on, because there was no EFI > > loader > > to set up. The mtree change makes the ESP mount point only exist on > > systems with an ESP. > > > > > > So you made a unilateral change, without discussion of the bigger > > design, to something without even asking the original person who made > > the change to mtree about it for what sounds like an obscure case in > > the installer that could be solved in a different way? It's trivial > > enough to look at the boot method sysctl and skip the EFI update if we > > didn't boot EFI (and if by change that's not on all systems, it's easy > > enough to add it on all systems). I have no notion about why that > > wasn't considered, at least, before jumping in and taking people by > > surprise. > > > > Next time, talk to people first. That's the whole point of having > > review tools, mailing list and git blame. > > > > Warner > > This method of testing was in the original review here posted on Feb. > 23: https://reviews.freebsd.org/D28897 That review didn't remove it from mtree, though... > > The description of the test procedure you're objecting to was even in > the summary! Then we had a discussion by email about the change to mtree > on the committers list on Feb. 28 to resolve a bug affecting PowerPC in > the patch reviewed and approved by you. I then waited several days and > had a long thread for several days on the mailing list about the > approach. coming up with this short patch -- again, as a bug fix to a > reviewed approach. > We can change the logic -- that's fine! But, to paraphrase, the reason > we have reviews is so people like you can look at the review and note > these kinds of problems when they are reviewed, not after the commit > goes in. There's a significant amount of whiplash when you do get > patches reviewed, approved, and then the person who reviewed and > approved them accuses you of "taking people by surprise". > The mtree stuff was a surprise. It wasn't in the review. It was a big surprise in an area that had been carefully negotiated over a year ago, so I had a strong reaction. Especially when git blame shows I did the commit, I'd have expected at least a 'hey, why is this here?' to come up... But rather than rehashing here, I'd like to focus on the technical side. The installer *does* mount the partition in advance, so checking whether > there is a mounted file system is a perfectly reasonable test to do. We > could also check fstab. I would like to understand what is actually > wrong here first, though. Especially after this misfire -- which is > problematic for reasons that are still not clear to me, since there are > a number of standard directories in hier(7) not in mtree -- I want to > make sure we actually do have consensus about what is changing and why. > At the top level, we default to having directories in mtree unless there's a good reason not to. We disagree as to whether the installer should take the presence or absence of the directory as a strong enough reason to do something. I don't think that's a good reason. But leaving that aside, let's say we wanted to reuse the install boot part of the installer to update boot blocks as part of installworld. If we can talk through that example w/o it in mtree, then we can leave it out. The last time I worked through this, though, I thought I'd talked myself into needing it. Looking at bootconfig, we could use machdep.bootmethod to determine if we need to update the ESP. If we didn't use that, then the ESP shouldn't be touched. This is, at the moment, x86 centric, but could trivially be added to architectures (I'm happy to add it). This would prevent the 'false positive' that's possible in cases where we've installed UEFI then downgraded to BIOS because of some problem (though purely in the context of the installer, I guess this isn't an issue). Even with your approach, we'd bogusly update an ESP (though one could argue you might want that). We could also change the code so that 'unsupported' architectures just didn't update. This is why I think it's a bit fragile to rely only on the directory being present. It should have something mounted there. If you wanted to mkfs_dos + mkdir efi at the top level, you could check for that directory if you were looking for a flag, though that would still update on a BIOS boot the ESP, and prevent false positives if run as part of an update. A long-term project I've had has been to try to update the boot blocks as part of installworld or maybe as part of installboot. We have really poor reuse as a project in this area. Every little orchestration thing wrote its own thing, and all of them have done it badly. I was hoping to be able to reuse this code, or modify the installer to use whatever we come up with there. As part of that, I had talked myself into thinking we always needed /boot/efi, but I'm having trouble reconstructing why that is now though I know it had to do with installed systems and bootstrapping issues... I know I was worried about questions about 'why isn't /boot/efi on the system by default so I can mount it' for people that have upgraded, but I recall there was more to it than that. With it in mtree, an installworld (even w/o an ESP update) would create it and people could mount it w/o having to mkdir which they might make as $SOMETHING_ELSE. So I guess that's a bit of a weak reason to absolutely require it in mtree. Warner From owner-dev-commits-src-main@freebsd.org Wed Mar 3 17:06:18 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CA66E548CF7; Wed, 3 Mar 2021 17:06:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DrL4V3FLvz4ZCZ; Wed, 3 Mar 2021 17:06:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5EAE655A0; Wed, 3 Mar 2021 17:06:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 123H6IR5095834; Wed, 3 Mar 2021 17:06:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 123H6IO0095833; Wed, 3 Mar 2021 17:06:18 GMT (envelope-from git) Date: Wed, 3 Mar 2021 17:06:18 GMT Message-Id: <202103031706.123H6IO0095833@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: aff9b9ee894e - main - Restore condition removed in df3747c6607b. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aff9b9ee894e3e6b6d8c7e4182d6b973804df853 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 17:06:20 -0000 The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=aff9b9ee894e3e6b6d8c7e4182d6b973804df853 commit aff9b9ee894e3e6b6d8c7e4182d6b973804df853 Author: Alexander Motin AuthorDate: 2021-03-03 16:58:04 +0000 Commit: Alexander Motin CommitDate: 2021-03-03 17:03:08 +0000 Restore condition removed in df3747c6607b. I think it allowed to avoid some TX thread wakeups while the socket buffer is full. But add there another options if ic_check_send_space is set, which means socket just reported that new space appeared, so it may have sense to pull more data from ic_to_send for better TX coalescing. MFC after: 1 week --- sys/dev/iscsi/icl_soft.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/iscsi/icl_soft.c b/sys/dev/iscsi/icl_soft.c index d579c034e63f..57ab24defabb 100644 --- a/sys/dev/iscsi/icl_soft.c +++ b/sys/dev/iscsi/icl_soft.c @@ -975,7 +975,8 @@ icl_send_thread(void *arg) * This way the icl_conn_send_pdus() can go through * all the queued PDUs without holding any locks. */ - STAILQ_CONCAT(&queue, &ic->ic_to_send); + if (STAILQ_EMPTY(&queue) || ic->ic_check_send_space) + STAILQ_CONCAT(&queue, &ic->ic_to_send); ic->ic_check_send_space = false; ICL_CONN_UNLOCK(ic); From owner-dev-commits-src-main@freebsd.org Wed Mar 3 17:21:50 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 431755494CC; Wed, 3 Mar 2021 17:21:50 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DrLQQ1QXrz4bKJ; Wed, 3 Mar 2021 17:21:50 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from comporellon.tachypleus.net (unknown [IPv6:2601:405:4a00:acd:cc7b:682b:f804:9afd]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: nwhitehorn/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id D42C523B6D; Wed, 3 Mar 2021 17:21:49 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) To: Warner Losh Cc: Brandon Bergren , "Rodney W. Grimes" , Ed Maste , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202103031253.123CrxKG051357@gndrsh.dnsmgr.net> <14d09680-1036-4a7e-8a0e-c3063cac8bc9@www.fastmail.com> <6e52fee6-a2fd-584f-757e-e77a8f8ea8eb@freebsd.org> From: Nathan Whitehorn Subject: Re: git: 2c26d77d989a - main - Remove /boot/efi from mtree, missed in 0b7472b3d8d2. Message-ID: <91a51b75-9872-d202-53c0-fa1a21dc9cb3@freebsd.org> Date: Wed, 3 Mar 2021 12:21:49 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Content-Language: en-US X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 17:21:50 -0000 On 3/3/21 11:53 AM, Warner Losh wrote: > [clipping non-technical pre-history] > > The installer *does* mount the partition in advance, so checking > whether > there is a mounted file system is a perfectly reasonable test to > do. We > could also check fstab. I would like to understand what is actually= > wrong here first, though. Especially after this misfire -- which is= > problematic for reasons that are still not clear to me, since > there are > a number of standard directories in hier(7) not in mtree -- I want = to > make sure we actually do have consensus about what is changing and > why. > > > At the top level, we default to having directories in mtree unless=20 > there's a good reason not to. We disagree as to whether the installer=20 > should take the presence or absence of the directory as a strong=20 > enough reason to do something. I don't think that's a good reason. > > But leaving that aside, let's say we=C2=A0wanted to reuse the install b= oot=20 > part of the installer to update boot blocks as part of installworld.=20 > If we can talk through that example w/o it in mtree, then we can leave = > it out. The last time I worked through this, though, I thought I'd=20 > talked myself into needing it. > Looking at bootconfig, we could use machdep.bootmethod to determine if = > we need to update the ESP. If we didn't use that, then the ESP=20 > shouldn't be touched. This is, at the moment, x86 centric, but could=20 > trivially be added to architectures (I'm happy to add it). This would=20 > prevent the 'false positive' that's possible in cases where we've=20 > installed UEFI then downgraded to BIOS because of some problem (though = > purely in the context of the installer, I guess this isn't an issue).=20 > Even with your approach, we'd bogusly update an ESP (though one could=20 > argue you might want that). We could also change the code so that=20 > 'unsupported' architectures just didn't update. This is why I think=20 > it's a bit fragile to rely only on the directory being present. It=20 > should have something mounted there. If you wanted to mkfs_dos=C2=A0+ m= kdir=20 > efi at the top level, you could check for that directory if you were=20 > looking for a flag, though that would still update on a BIOS boot the=20 > ESP, and prevent false positives if run as part of an update. I think we would *want* to update an ESP that is mounted but not=20 currently being used. If I set up a dual BIOS/EFI-boot system for some=20 reason and happened to install an update while booted from BIOS, I would = be deeply astonished if my configured-by-the-installer EFI bootloader=20 did not also get updated. (As an aside, I would also much rather the installer use an update=20 utility to set up the ESP than have the update utility use the installer.= ) So here's a proposal, now that everyone is in the CC list: - We add /boot/efi back to mtree, even though I find it kind of weird to = have it there I think we're too close to the release to have a=20 conclusion on this. - We have the installer check for either the ESP directory being an=20 active mountpoint or being in the in-progress fstab, whichever is=20 easiest to implement (they are equivalent for the installer). If that seems OK, I'll post another review for the change. > A long-term project I've had has been to try to update the boot blocks = > as part of installworld or maybe as part of installboot. We have=20 > really poor reuse as a project in this area. Every little=20 > orchestration thing wrote its own thing, and all of them have done it=20 > badly. I was hoping to be able to reuse this code, or modify the=20 > installer to use whatever we come up with there. As part of that, I=20 > had talked myself into thinking we always needed /boot/efi, but I'm=20 > having trouble reconstructing why that is now though I know it had to=20 > do with installed systems and bootstrapping issues... I know I was=20 > worried about questions about 'why isn't /boot/efi on the system by=20 > default so I can mount it' for people that have upgraded, but I recall = > there was more to it than that. With it in mtree, an installworld > (even w/o an ESP update) would create it and people could mount it w/o = > having to mkdir which they might make as $SOMETHING_ELSE. So I guess=20 > that's a bit of a weak reason to absolutely require it in mtree. Thanks a lot for the explanation. I'm agreed entirely about the problem=20 and the difficulty -- hopefully this set of changes helps at least. As for mtree, I was imagining this as something like /home, which is a=20 standard part of the system but isn't part of mtree since it depends on=20 local-system policy. It's also different from /home in that we *do* want = it to be a standard place for updates, of course. I think there's really = not a ton of precedent either way: we don't have any other mount points=20 in there for file systems that may or may not exist depending on=20 circumstances, as far as I can tell. My worry with having it in mtree is = that having it exist but potentially be a directory rather than an=20 actual ESP requires that update tools be a little smarter and errors=20 will be a little less obvious, since updates that don't pay enough=20 attention will be a bit more likely to splat files there assuming there=20 is an ESP even if makes no sense. It's a weak consideration either way,=20 I think. -Nathan > > Warner From owner-dev-commits-src-main@freebsd.org Wed Mar 3 18:28:29 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BBFB054CDE7; Wed, 3 Mar 2021 18:28:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DrMvK4ywkz4skC; Wed, 3 Mar 2021 18:28:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9937F6763; Wed, 3 Mar 2021 18:28:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 123ISTZv001653; Wed, 3 Mar 2021 18:28:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 123ISTI5001652; Wed, 3 Mar 2021 18:28:29 GMT (envelope-from git) Date: Wed, 3 Mar 2021 18:28:29 GMT Message-Id: <202103031828.123ISTI5001652@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 55deb0a5f089 - main - service(8): use an environment more consistent with init(8) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 55deb0a5f089c8a27cfc1666655b93881c2b47ae Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 18:28:29 -0000 The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=55deb0a5f089c8a27cfc1666655b93881c2b47ae commit 55deb0a5f089c8a27cfc1666655b93881c2b47ae Author: Andrew Gierth AuthorDate: 2021-03-03 18:25:11 +0000 Commit: Kyle Evans CommitDate: 2021-03-03 18:25:11 +0000 service(8): use an environment more consistent with init(8) init(8) sets the "daemon" login class without specifying a pw entry (so no substitutions are done on the variables). service(8)'s use of env -L had the effect of specifying root's pw entry, with two effects: getpwnam and getpwuid are being called, which may not be entirely safe depending on what nsswitch is up to and what stage of boot we are at, and substitutions would have been done. Fix by teaching env(8) to allow -L -/classname to set the class environment with no pw entry at all specified, and use it in service(8). PR: 253959 --- usr.bin/env/env.1 | 7 ++++++- usr.bin/env/env.c | 25 ++++++++++++++++--------- usr.sbin/service/service.sh | 2 +- 3 files changed, 23 insertions(+), 11 deletions(-) diff --git a/usr.bin/env/env.1 b/usr.bin/env/env.1 index 8c0527608506..9aff9508e47b 100644 --- a/usr.bin/env/env.1 +++ b/usr.bin/env/env.1 @@ -31,7 +31,7 @@ .\" From FreeBSD: src/usr.bin/printenv/printenv.1,v 1.17 2002/11/26 17:33:35 ru Exp .\" $FreeBSD$ .\" -.Dd November 11, 2020 +.Dd March 3, 2021 .Dt ENV 1 .Os .Sh NAME @@ -104,6 +104,11 @@ is used, then the specified user's .Pa ~/.login_conf is read as well. The user may be specified by name or by uid. +If a username of +.Sq Li \&- +is given, then no user lookup will be done, the login class will default to +.Sq Li default +if not explicitly given, and no substitutions will be done on the values. .\" -P .It Fl P Ar altpath Search the set of directories as specified by diff --git a/usr.bin/env/env.c b/usr.bin/env/env.c index e408577ea7a4..0aa42a4663dd 100644 --- a/usr.bin/env/env.c +++ b/usr.bin/env/env.c @@ -144,16 +144,23 @@ main(int argc, char **argv) login_class = strchr(login_name, '/'); if (login_class) *login_class++ = '\0'; - pw = getpwnam(login_name); - if (pw == NULL) { - char *endp = NULL; - errno = 0; - uid = strtoul(login_name, &endp, 10); - if (errno == 0 && *endp == '\0') - pw = getpwuid(uid); + if (*login_name != '\0' && strcmp(login_name,"-") != 0) { + pw = getpwnam(login_name); + if (pw == NULL) { + char *endp = NULL; + errno = 0; + uid = strtoul(login_name, &endp, 10); + if (errno == 0 && *endp == '\0') + pw = getpwuid(uid); + } + if (pw == NULL) + errx(EXIT_FAILURE, "no such user: %s", login_name); } - if (pw == NULL) - errx(EXIT_FAILURE, "no such user: %s", login_name); + /* + * Note that it is safe for pw to be null here; the libutil + * code handles that, bypassing substitution of $ and using + * the class "default" if no class name is given either. + */ if (login_class != NULL) { lc = login_getclass(login_class); if (lc == NULL) diff --git a/usr.sbin/service/service.sh b/usr.sbin/service/service.sh index 9646aae67b0c..76cce580c5b4 100755 --- a/usr.sbin/service/service.sh +++ b/usr.sbin/service/service.sh @@ -171,7 +171,7 @@ cd / for dir in /etc/rc.d $local_startup; do if [ -x "$dir/$script" ]; then [ -n "$VERBOSE" ] && echo "$script is located in $dir" - exec env -i -L 0/daemon HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin "$dir/$script" "$@" + exec env -i -L -/daemon HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin "$dir/$script" "$@" fi done From owner-dev-commits-src-main@freebsd.org Wed Mar 3 20:22:25 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1B253550198; Wed, 3 Mar 2021 20:22:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DrQQn0Db0z3HLG; Wed, 3 Mar 2021 20:22:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EF7471016B; Wed, 3 Mar 2021 20:22:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 123KMOHn059031; Wed, 3 Mar 2021 20:22:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 123KMOje059030; Wed, 3 Mar 2021 20:22:24 GMT (envelope-from git) Date: Wed, 3 Mar 2021 20:22:24 GMT Message-Id: <202103032022.123KMOje059030@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 0c1a5eaae832 - main - env: style(9) fix, add a space MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0c1a5eaae83267365330437adb60f44e1a622a2b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 20:22:25 -0000 The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=0c1a5eaae83267365330437adb60f44e1a622a2b commit 0c1a5eaae83267365330437adb60f44e1a622a2b Author: Kyle Evans AuthorDate: 2021-03-03 20:20:17 +0000 Commit: Kyle Evans CommitDate: 2021-03-03 20:21:56 +0000 env: style(9) fix, add a space Reported by: pstef Fixes: 55deb0a5f089 ("service(8): use an environment more [...]") --- usr.bin/env/env.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/env/env.c b/usr.bin/env/env.c index 0aa42a4663dd..a0f55d665a9a 100644 --- a/usr.bin/env/env.c +++ b/usr.bin/env/env.c @@ -144,7 +144,7 @@ main(int argc, char **argv) login_class = strchr(login_name, '/'); if (login_class) *login_class++ = '\0'; - if (*login_name != '\0' && strcmp(login_name,"-") != 0) { + if (*login_name != '\0' && strcmp(login_name, "-") != 0) { pw = getpwnam(login_name); if (pw == NULL) { char *endp = NULL; From owner-dev-commits-src-main@freebsd.org Wed Mar 3 20:29:39 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0E2BB5501C1; Wed, 3 Mar 2021 20:29:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DrQb66hv5z3HJx; Wed, 3 Mar 2021 20:29:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D4B4E10395; Wed, 3 Mar 2021 20:29:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 123KTcJa060203; Wed, 3 Mar 2021 20:29:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 123KTcTN060202; Wed, 3 Mar 2021 20:29:38 GMT (envelope-from git) Date: Wed, 3 Mar 2021 20:29:38 GMT Message-Id: <202103032029.123KTcTN060202@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: afc3e54eeee6 - main - Move ic_check_send_space clear to the actual check. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: afc3e54eeee635a525c88e4678cc38e3219302c3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 20:29:39 -0000 The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=afc3e54eeee635a525c88e4678cc38e3219302c3 commit afc3e54eeee635a525c88e4678cc38e3219302c3 Author: Alexander Motin AuthorDate: 2021-03-03 20:21:26 +0000 Commit: Alexander Motin CommitDate: 2021-03-03 20:29:35 +0000 Move ic_check_send_space clear to the actual check. It closes tiny race when the flag could be set between being cleared and the space is checked, that would create us some more work. The flag setting is protected by both locks, so we can clear it in either place, but in between both locks are dropped. MFC after: 1 week --- sys/dev/iscsi/icl_soft.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/iscsi/icl_soft.c b/sys/dev/iscsi/icl_soft.c index 57ab24defabb..9cede6b44311 100644 --- a/sys/dev/iscsi/icl_soft.c +++ b/sys/dev/iscsi/icl_soft.c @@ -866,6 +866,7 @@ icl_conn_send_pdus(struct icl_conn *ic, struct icl_pdu_stailq *queue) * of error. */ available = sbspace(&so->so_snd); + ic->ic_check_send_space = false; /* * Notify the socket upcall that we don't need wakeups @@ -978,7 +979,6 @@ icl_send_thread(void *arg) if (STAILQ_EMPTY(&queue) || ic->ic_check_send_space) STAILQ_CONCAT(&queue, &ic->ic_to_send); - ic->ic_check_send_space = false; ICL_CONN_UNLOCK(ic); icl_conn_send_pdus(ic, &queue); ICL_CONN_LOCK(ic); From owner-dev-commits-src-main@freebsd.org Wed Mar 3 22:01:26 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CCB5D55239F; Wed, 3 Mar 2021 22:01:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DrSd23Y8wz3NmN; Wed, 3 Mar 2021 22:01:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6ABD31174A; Wed, 3 Mar 2021 22:01:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 123M1Qe2088307; Wed, 3 Mar 2021 22:01:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 123M1Qah088306; Wed, 3 Mar 2021 22:01:26 GMT (envelope-from git) Date: Wed, 3 Mar 2021 22:01:26 GMT Message-Id: <202103032201.123M1Qah088306@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: c49b075305a7 - main - git-arc: Handle commit ranges in the "update" verb MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c49b075305a7aa1c7f500db1672cd1d2b8066b55 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 22:01:26 -0000 The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c49b075305a7aa1c7f500db1672cd1d2b8066b55 commit c49b075305a7aa1c7f500db1672cd1d2b8066b55 Author: Mark Johnston AuthorDate: 2021-03-03 22:00:58 +0000 Commit: Mark Johnston CommitDate: 2021-03-03 22:00:58 +0000 git-arc: Handle commit ranges in the "update" verb Reported by: imp --- tools/tools/git/git-arc.sh | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/tools/tools/git/git-arc.sh b/tools/tools/git/git-arc.sh index 07b042ceb151..c3541e438c9f 100644 --- a/tools/tools/git/git-arc.sh +++ b/tools/tools/git/git-arc.sh @@ -53,7 +53,7 @@ Commands: list | patch [ ...] stage [-b branch] [|] - update + update [|] Description: Create or manage FreeBSD Phabricator reviews based on git commits. There @@ -500,24 +500,24 @@ gitarc::stage() gitarc::update() { - local commit diff - - commit=$1 - diff=$(commit2diff $commit) - - if ! show_and_prompt $commit; then - return - fi + local commit commits diff + commits=$(build_commit_list $@) save_head + for commit in ${commits}; do + diff=$(commit2diff $commit) - git checkout -q $commit + if ! show_and_prompt $commit; then + break + fi - # The linter is stupid and applies patches to the working copy. - # This would be tolerable if it didn't try to correct "misspelled" variable - # names. - arc diff --allow-untracked --never-apply-patches --update $diff HEAD~ + git checkout -q $commit + # The linter is stupid and applies patches to the working copy. + # This would be tolerable if it didn't try to correct "misspelled" variable + # names. + arc diff --allow-untracked --never-apply-patches --update $diff HEAD~ + done restore_head } From owner-dev-commits-src-main@freebsd.org Wed Mar 3 22:01:28 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 070875523A0; Wed, 3 Mar 2021 22:01:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DrSd35DZnz3Nf1; Wed, 3 Mar 2021 22:01:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 97A62118AE; Wed, 3 Mar 2021 22:01:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 123M1Rl1088330; Wed, 3 Mar 2021 22:01:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 123M1RuA088329; Wed, 3 Mar 2021 22:01:27 GMT (envelope-from git) Date: Wed, 3 Mar 2021 22:01:27 GMT Message-Id: <202103032201.123M1RuA088329@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: c113740f266e - main - git-arc.1: Fix synopsis for the "update" verb MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c113740f266ecfbe4a34c97607f860d63c08eb76 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 22:01:28 -0000 The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c113740f266ecfbe4a34c97607f860d63c08eb76 commit c113740f266ecfbe4a34c97607f860d63c08eb76 Author: Mark Johnston AuthorDate: 2021-03-03 22:01:04 +0000 Commit: Mark Johnston CommitDate: 2021-03-03 22:01:04 +0000 git-arc.1: Fix synopsis for the "update" verb --- tools/tools/git/git-arc.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/tools/git/git-arc.1 b/tools/tools/git/git-arc.1 index cc510c069c3a..00019a19180d 100644 --- a/tools/tools/git/git-arc.1 +++ b/tools/tools/git/git-arc.1 @@ -47,7 +47,7 @@ .Ar branch Op Ar commit Ns | Ns Ar commit-range .Nm .Cm update -.Op Ar branch Oo Ar commit Ns | Ns Ar commit-range Oc +.Op Ar commit Ns | Ns Ar commit-range Oc .Sh DESCRIPTION The .Nm From owner-dev-commits-src-main@freebsd.org Wed Mar 3 22:25:29 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 89CBA552D6E for ; Wed, 3 Mar 2021 22:25:29 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x72c.google.com (mail-qk1-x72c.google.com [IPv6:2607:f8b0:4864:20::72c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DrT8n3BfTz3QjB for ; Wed, 3 Mar 2021 22:25:29 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x72c.google.com with SMTP id z128so25787586qkc.12 for ; Wed, 03 Mar 2021 14:25:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zD0mdRv+v11ua6jZjZU6vAihX6p/414yPJa8ABaN50w=; b=llgrDZiUYXU1PWFAK42NLlELjvcfwqHfOollg0ShE69lieuSt5hoFiSESiGJRE1vUn 1blnghK1CUAtHzIL3F4ZyAB+W9Zs3FHmhKhAC0PcFjmh5BS+BTX5zsDW72lP4cO6mO++ GzJurBPZpKKI5Qeer8DxbOB9rI4+q+3IFrBcSKssJZAv4nUkDPBfot/hZSF3+tv/80up zC8d4UuM74kgsiWoy/UUdXrauANcP3c2bLZzhmj7ye1NaePiMYfzJxDBODCrd971iocq LqOqsEPngngX1EajPG8RDJSjnskWk0d85vd90CjjbWaMHbZtk5JKwZQAd6q9NvXCWxSz Tg/A== 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=zD0mdRv+v11ua6jZjZU6vAihX6p/414yPJa8ABaN50w=; b=uNJXBF1gQsqOwSbcmruGSNdphK+O2N0um5IuTJETmrNGHAqUcncAtOOhuydzMEYdrz 7YDcAVRRp2GfE58Qc9aUc9p/c77l+RL1PYXFXiY0vGnd0YjhxCseX8oRy6G1eMt2JIou IRlaHN7vyNtS7n1S7EgxYtwj28djtyeRDfBOZDpn9W74E6h5Ptm4dX3NLJL+aT5XOqO0 cHfvrN3iVXIS2LvxyB/6dcPKMy2SDFNj3ni+q5AeQ74n38JH2P/VdHlJ664dpCIo4Kts 7FAuLiqoJCgccRcFVBdC6+auBVVtCN60lP8ZhXZByyZIFaHyqwkNWh67EdNYQr6vqh8W m+pQ== X-Gm-Message-State: AOAM53318yuFz80+VPi3IpvjOBC7XXcmcHbwRzlv8ED2VKMkhJUHWs8V gy32fm9gGEW2m40eRuMKvfKdtlS0hcO9BIxdFNxZQA== X-Google-Smtp-Source: ABdhPJx0UqejeeifdeJhDh0Wvmb+5L2XDY+G5VVsN6LehnJmTXBjh0d+uhuW7+RWuLXVd6a/cB5Q0FMcF6DDjoR0k74= X-Received: by 2002:a37:7f83:: with SMTP id a125mr1304227qkd.44.1614810328611; Wed, 03 Mar 2021 14:25:28 -0800 (PST) MIME-Version: 1.0 References: <202103031253.123CrxKG051357@gndrsh.dnsmgr.net> <14d09680-1036-4a7e-8a0e-c3063cac8bc9@www.fastmail.com> <6e52fee6-a2fd-584f-757e-e77a8f8ea8eb@freebsd.org> <91a51b75-9872-d202-53c0-fa1a21dc9cb3@freebsd.org> In-Reply-To: <91a51b75-9872-d202-53c0-fa1a21dc9cb3@freebsd.org> From: Warner Losh Date: Wed, 3 Mar 2021 15:25:17 -0700 Message-ID: Subject: Re: git: 2c26d77d989a - main - Remove /boot/efi from mtree, missed in 0b7472b3d8d2. To: Nathan Whitehorn Cc: Brandon Bergren , "Rodney W. Grimes" , Ed Maste , src-committers , "" , dev-commits-src-main@freebsd.org X-Rspamd-Queue-Id: 4DrT8n3BfTz3QjB X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 22:25:29 -0000 On Wed, Mar 3, 2021 at 10:21 AM Nathan Whitehorn wrote: > > > On 3/3/21 11:53 AM, Warner Losh wrote: > > > > [clipping non-technical pre-history] > Thanks. re-reading it now, I think I was more grumpy than warranted. And for that I apologize. Thanks for omitting it from the rest of the thread. > > > > The installer *does* mount the partition in advance, so checking > > whether > > there is a mounted file system is a perfectly reasonable test to > > do. We > > could also check fstab. I would like to understand what is actually > > wrong here first, though. Especially after this misfire -- which is > > problematic for reasons that are still not clear to me, since > > there are > > a number of standard directories in hier(7) not in mtree -- I want to > > make sure we actually do have consensus about what is changing and > > why. > > > > > > At the top level, we default to having directories in mtree unless > > there's a good reason not to. We disagree as to whether the installer > > should take the presence or absence of the directory as a strong > > enough reason to do something. I don't think that's a good reason. > > > > But leaving that aside, let's say we wanted to reuse the install boot > > part of the installer to update boot blocks as part of installworld. > > If we can talk through that example w/o it in mtree, then we can leave > > it out. The last time I worked through this, though, I thought I'd > > talked myself into needing it. > > > Looking at bootconfig, we could use machdep.bootmethod to determine if > > we need to update the ESP. If we didn't use that, then the ESP > > shouldn't be touched. This is, at the moment, x86 centric, but could > > trivially be added to architectures (I'm happy to add it). This would > > prevent the 'false positive' that's possible in cases where we've > > installed UEFI then downgraded to BIOS because of some problem (though > > purely in the context of the installer, I guess this isn't an issue). > > Even with your approach, we'd bogusly update an ESP (though one could > > argue you might want that). We could also change the code so that > > 'unsupported' architectures just didn't update. This is why I think > > it's a bit fragile to rely only on the directory being present. It > > should have something mounted there. If you wanted to mkfs_dos + mkdir > > efi at the top level, you could check for that directory if you were > > looking for a flag, though that would still update on a BIOS boot the > > ESP, and prevent false positives if run as part of an update. > > I think we would *want* to update an ESP that is mounted but not > currently being used. If I set up a dual BIOS/EFI-boot system for some > reason and happened to install an update while booted from BIOS, I would > be deeply astonished if my configured-by-the-installer EFI bootloader > did not also get updated. > Yea, it's unclear to me what POLA here is, to be honest. Some of that is driven by a deep desire not to accidentally update USB drives that have a bootable image on them as well, so that may overly color my thinking. > (As an aside, I would also much rather the installer use an update > utility to set up the ESP than have the update utility use the installer.) > Agreed. We can work towards that after the release. It would be better if we could accumulate the scripts from a number of different places, find a good way to make them callable from those places more easily and start to move that tribal knowledge back into the base system where it belongs, imho. Baptiste raised an important point years ago that we also need to think about doing that with a way to 'plug in' $NEWEST_CLOUD's packages, containers, layout such that they could provide the details and then the automation would just work with them too: image building, release customization, boot block update, etc. > So here's a proposal, now that everyone is in the CC list: > - We add /boot/efi back to mtree, even though I find it kind of weird to > have it there I think we're too close to the release to have a > conclusion on this. > - We have the installer check for either the ESP directory being an > active mountpoint or being in the in-progress fstab, whichever is > easiest to implement (they are equivalent for the installer). > I'm OK with both of these points. If others are opposed to the first one, I'm willing to see how people react to it in the upgrade path before changing it again. We should get closure on Ed's proposed change here. I think it's good and should go in right after your changes. I'd start on your changes, and give people until the morning to pipe up with any objections. > If that seems OK, I'll post another review for the change. > > > A long-term project I've had has been to try to update the boot blocks > > as part of installworld or maybe as part of installboot. We have > > really poor reuse as a project in this area. Every little > > orchestration thing wrote its own thing, and all of them have done it > > badly. I was hoping to be able to reuse this code, or modify the > > installer to use whatever we come up with there. As part of that, I > > had talked myself into thinking we always needed /boot/efi, but I'm > > having trouble reconstructing why that is now though I know it had to > > do with installed systems and bootstrapping issues... I know I was > > worried about questions about 'why isn't /boot/efi on the system by > > default so I can mount it' for people that have upgraded, but I recall > > there was more to it than that. With it in mtree, an installworld > > (even w/o an ESP update) would create it and people could mount it w/o > > having to mkdir which they might make as $SOMETHING_ELSE. So I guess > > that's a bit of a weak reason to absolutely require it in mtree. > > Thanks a lot for the explanation. I'm agreed entirely about the problem > and the difficulty -- hopefully this set of changes helps at least. > It does. It starts to get people to use the same mount point for the ESP and we can then constrain the problem a bit and where we can't constrain it we can parameterize it. > As for mtree, I was imagining this as something like /home, which is a > standard part of the system but isn't part of mtree since it depends on > local-system policy. It's also different from /home in that we *do* want > it to be a standard place for updates, of course. I think there's really > not a ton of precedent either way: we don't have any other mount points > in there for file systems that may or may not exist depending on > circumstances, as far as I can tell. My worry with having it in mtree is > that having it exist but potentially be a directory rather than an > actual ESP requires that update tools be a little smarter and errors > will be a little less obvious, since updates that don't pay enough > attention will be a bit more likely to splat files there assuming there > is an ESP even if makes no sense. It's a weak consideration either way, > I think. > Yea. After a few hours of reflection, I've found that I could go either way and am having trouble understanding why I was so dead set this morning on a particular way. Chalk it up to me being a little extra grumpy at surprise changes. This one seems less like local policy than /home, but there's still a local aspect: Do I mount by default, and where. I think we should always, though, have a fstab entry as we'll need to update it from time to time. Even Windows has a nominal drive that it uses to mount the ESP, even if it isn't mounted by default. That's used to update it when scripts and such need to do that (or if you're the victim of an upgrade script that did too much that now needs to be undone). I think we should be similar in that regard. This would also let us take the automation of updates to the next level if we can rely on some basic things. Warner > > > > > Warner > > > From owner-dev-commits-src-main@freebsd.org Wed Mar 3 22:34:49 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3B1A45531AC; Wed, 3 Mar 2021 22:34:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DrTMY19nYz3R6X; Wed, 3 Mar 2021 22:34:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1B1D011D5A; Wed, 3 Mar 2021 22:34:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 123MYnSV031206; Wed, 3 Mar 2021 22:34:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 123MYnoa031205; Wed, 3 Mar 2021 22:34:49 GMT (envelope-from git) Date: Wed, 3 Mar 2021 22:34:49 GMT Message-Id: <202103032234.123MYnoa031205@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 49f6925ca342 - main - ktls: Cache output buffers for software encryption MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 49f6925ca342b16a057d586107f09747969184f5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 22:34:49 -0000 The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=49f6925ca342b16a057d586107f09747969184f5 commit 49f6925ca342b16a057d586107f09747969184f5 Author: Mark Johnston AuthorDate: 2021-03-03 22:30:08 +0000 Commit: Mark Johnston CommitDate: 2021-03-03 22:34:01 +0000 ktls: Cache output buffers for software encryption Maintain a cache of physically contiguous runs of pages for use as output buffers when software encryption is configured and in-place encryption is not possible. This makes allocation and free cheaper since in the common case we avoid touching the vm_page structures for the buffer, and fewer calls into UMA are needed. gallatin@ reports a ~10% absolute decrease in CPU usage with sendfile/KTLS on a Xeon after this change. It is possible that we will not be able to allocate these buffers if physical memory is fragmented. To avoid frequently calling into the physical memory allocator in this scenario, rate-limit allocation attempts after a failure. In the failure case we fall back to the old behaviour of allocating a page at a time. N.B.: this scheme could be simplified, either by simply using malloc() and looking up the PAs of the pages backing the buffer, or by falling back to page by page allocation and creating a mapping in the cache zone. This requires some way to save a mapping of an M_EXTPG page array in the mbuf, though. m_data is not really appropriate. The second approach may be possible by saving the mapping in the plinks union of the first vm_page structure of the array, but this would force a vm_page access when freeing an mbuf. Reviewed by: gallatin, jhb Tested by: gallatin Sponsored by: Ampere Computing Submitted by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D28556 --- sys/kern/uipc_ktls.c | 162 ++++++++++++++++++++++++++++++++++++++-------- sys/opencrypto/ktls_ocf.c | 80 ++++++++++++----------- sys/sys/ktls.h | 6 +- 3 files changed, 180 insertions(+), 68 deletions(-) diff --git a/sys/kern/uipc_ktls.c b/sys/kern/uipc_ktls.c index 9fc5f8b203c0..5125061e0879 100644 --- a/sys/kern/uipc_ktls.c +++ b/sys/kern/uipc_ktls.c @@ -82,6 +82,7 @@ struct ktls_wq { STAILQ_HEAD(, mbuf) m_head; STAILQ_HEAD(, socket) so_head; bool running; + int lastallocfail; } __aligned(CACHE_LINE_SIZE); struct ktls_domain_info { @@ -95,6 +96,7 @@ static struct proc *ktls_proc; LIST_HEAD(, ktls_crypto_backend) ktls_backends; static struct rmlock ktls_backends_lock; static uma_zone_t ktls_session_zone; +static uma_zone_t ktls_buffer_zone; static uint16_t ktls_cpuid_lookup[MAXCPU]; SYSCTL_NODE(_kern_ipc, OID_AUTO, tls, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, @@ -116,7 +118,7 @@ SYSCTL_INT(_kern_ipc_tls, OID_AUTO, bind_threads, CTLFLAG_RDTUN, "Bind crypto threads to cores (1) or cores and domains (2) at boot"); static u_int ktls_maxlen = 16384; -SYSCTL_UINT(_kern_ipc_tls, OID_AUTO, maxlen, CTLFLAG_RWTUN, +SYSCTL_UINT(_kern_ipc_tls, OID_AUTO, maxlen, CTLFLAG_RDTUN, &ktls_maxlen, 0, "Maximum TLS record size"); static int ktls_number_threads; @@ -134,6 +136,11 @@ SYSCTL_BOOL(_kern_ipc_tls, OID_AUTO, cbc_enable, CTLFLAG_RWTUN, &ktls_cbc_enable, 1, "Enable Support of AES-CBC crypto for kernel TLS"); +static bool ktls_sw_buffer_cache = true; +SYSCTL_BOOL(_kern_ipc_tls, OID_AUTO, sw_buffer_cache, CTLFLAG_RDTUN, + &ktls_sw_buffer_cache, 1, + "Enable caching of output buffers for SW encryption"); + static COUNTER_U64_DEFINE_EARLY(ktls_tasks_active); SYSCTL_COUNTER_U64(_kern_ipc_tls, OID_AUTO, tasks_active, CTLFLAG_RD, &ktls_tasks_active, "Number of active tasks"); @@ -366,6 +373,51 @@ ktls_get_cpu(struct socket *so) } #endif +static int +ktls_buffer_import(void *arg, void **store, int count, int domain, int flags) +{ + vm_page_t m; + int i; + + KASSERT((ktls_maxlen & PAGE_MASK) == 0, + ("%s: ktls max length %d is not page size-aligned", + __func__, ktls_maxlen)); + + for (i = 0; i < count; i++) { + m = vm_page_alloc_contig_domain(NULL, 0, domain, + VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED | + VM_ALLOC_NODUMP | malloc2vm_flags(flags), + atop(ktls_maxlen), 0, ~0ul, PAGE_SIZE, 0, + VM_MEMATTR_DEFAULT); + if (m == NULL) + break; + store[i] = (void *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(m)); + } + return (i); +} + +static void +ktls_buffer_release(void *arg __unused, void **store, int count) +{ + vm_page_t m; + int i, j; + + for (i = 0; i < count; i++) { + m = PHYS_TO_VM_PAGE(DMAP_TO_PHYS((vm_offset_t)store[i])); + for (j = 0; j < atop(ktls_maxlen); j++) { + (void)vm_page_unwire_noq(m + j); + vm_page_free(m + j); + } + } +} + +static void +ktls_free_mext_contig(struct mbuf *m) +{ + M_ASSERTEXTPG(m); + uma_zfree(ktls_buffer_zone, (void *)PHYS_TO_DMAP(m->m_epg_pa[0])); +} + static void ktls_init(void *dummy __unused) { @@ -385,6 +437,13 @@ ktls_init(void *dummy __unused) NULL, NULL, NULL, NULL, UMA_ALIGN_CACHE, 0); + if (ktls_sw_buffer_cache) { + ktls_buffer_zone = uma_zcache_create("ktls_buffers", + roundup2(ktls_maxlen, PAGE_SIZE), NULL, NULL, NULL, NULL, + ktls_buffer_import, ktls_buffer_release, NULL, + UMA_ZONE_FIRSTTOUCH); + } + /* * Initialize the workqueues to run the TLS work. We create a * work queue for each CPU. @@ -1974,6 +2033,30 @@ ktls_enqueue_to_free(struct mbuf *m) wakeup(wq); } +static void * +ktls_buffer_alloc(struct ktls_wq *wq, struct mbuf *m) +{ + void *buf; + + if (m->m_epg_npgs <= 2) + return (NULL); + if (ktls_buffer_zone == NULL) + return (NULL); + if ((u_int)(ticks - wq->lastallocfail) < hz) { + /* + * Rate-limit allocation attempts after a failure. + * ktls_buffer_import() will acquire a per-domain mutex to check + * the free page queues and may fail consistently if memory is + * fragmented. + */ + return (NULL); + } + buf = uma_zalloc(ktls_buffer_zone, M_NOWAIT | M_NORECLAIM); + if (buf == NULL) + wq->lastallocfail = ticks; + return (buf); +} + void ktls_enqueue(struct mbuf *m, struct socket *so, int page_count) { @@ -2006,7 +2089,7 @@ ktls_enqueue(struct mbuf *m, struct socket *so, int page_count) } static __noinline void -ktls_encrypt(struct mbuf *top) +ktls_encrypt(struct ktls_wq *wq, struct mbuf *top) { struct ktls_session *tls; struct socket *so; @@ -2015,6 +2098,7 @@ ktls_encrypt(struct mbuf *top) struct iovec src_iov[1 + btoc(TLS_MAX_MSG_SIZE_V10_2)]; struct iovec dst_iov[1 + btoc(TLS_MAX_MSG_SIZE_V10_2)]; vm_page_t pg; + void *cbuf; int error, i, len, npages, off, total_pages; bool is_anon; @@ -2056,6 +2140,9 @@ ktls_encrypt(struct mbuf *top) KASSERT(npages + m->m_epg_npgs <= total_pages, ("page count mismatch: top %p, total_pages %d, m %p", top, total_pages, m)); + KASSERT(ptoa(m->m_epg_npgs) <= ktls_maxlen, + ("page count %d larger than maximum frame length %d", + m->m_epg_npgs, ktls_maxlen)); /* * Generate source and destination ivoecs to pass to @@ -2072,37 +2159,50 @@ ktls_encrypt(struct mbuf *top) len = m_epg_pagelen(m, i, off); src_iov[i].iov_len = len; src_iov[i].iov_base = - (char *)(void *)PHYS_TO_DMAP(m->m_epg_pa[i]) + - off; + (char *)(void *)PHYS_TO_DMAP(m->m_epg_pa[i]) + off; + } - if (is_anon) { - dst_iov[i].iov_base = src_iov[i].iov_base; - dst_iov[i].iov_len = src_iov[i].iov_len; - continue; - } -retry_page: - pg = vm_page_alloc(NULL, 0, VM_ALLOC_NORMAL | - VM_ALLOC_NOOBJ | VM_ALLOC_NODUMP | VM_ALLOC_WIRED); - if (pg == NULL) { - vm_wait(NULL); - goto retry_page; + if (is_anon) { + memcpy(dst_iov, src_iov, i * sizeof(struct iovec)); + } else if ((cbuf = ktls_buffer_alloc(wq, m)) != NULL) { + len = ptoa(m->m_epg_npgs - 1) + m->m_epg_last_len - + m->m_epg_1st_off; + dst_iov[0].iov_base = (char *)cbuf + m->m_epg_1st_off; + dst_iov[0].iov_len = len; + parray[0] = DMAP_TO_PHYS((vm_offset_t)cbuf); + i = 1; + } else { + cbuf = NULL; + off = m->m_epg_1st_off; + for (i = 0; i < m->m_epg_npgs; i++, off = 0) { + do { + pg = vm_page_alloc(NULL, 0, + VM_ALLOC_NORMAL | + VM_ALLOC_NOOBJ | + VM_ALLOC_NODUMP | + VM_ALLOC_WIRED | + VM_ALLOC_WAITFAIL); + } while (pg == NULL); + + len = m_epg_pagelen(m, i, off); + parray[i] = VM_PAGE_TO_PHYS(pg); + dst_iov[i].iov_base = + (char *)(void *)PHYS_TO_DMAP( + parray[i]) + off; + dst_iov[i].iov_len = len; } - parray[i] = VM_PAGE_TO_PHYS(pg); - dst_iov[i].iov_base = - (char *)(void *)PHYS_TO_DMAP(parray[i]) + off; - dst_iov[i].iov_len = len; } if (__predict_false(m->m_epg_npgs == 0)) { /* TLS 1.0 empty fragment. */ npages++; } else - npages += i; + npages += m->m_epg_npgs; error = (*tls->sw_encrypt)(tls, (const struct tls_record_layer *)m->m_epg_hdr, - m->m_epg_trail, src_iov, dst_iov, i, m->m_epg_seqno, - m->m_epg_record_type); + m->m_epg_trail, src_iov, dst_iov, m->m_epg_npgs, i, + m->m_epg_seqno, m->m_epg_record_type); if (error) { counter_u64_add(ktls_offload_failed_crypto, 1); break; @@ -2118,11 +2218,19 @@ retry_page: m->m_ext.ext_free(m); /* Replace them with the new pages. */ - for (i = 0; i < m->m_epg_npgs; i++) - m->m_epg_pa[i] = parray[i]; + if (cbuf != NULL) { + for (i = 0; i < m->m_epg_npgs; i++) + m->m_epg_pa[i] = parray[0] + ptoa(i); + + /* Contig pages should go back to the cache. */ + m->m_ext.ext_free = ktls_free_mext_contig; + } else { + for (i = 0; i < m->m_epg_npgs; i++) + m->m_epg_pa[i] = parray[i]; - /* Use the basic free routine. */ - m->m_ext.ext_free = mb_free_mext_pgs; + /* Use the basic free routine. */ + m->m_ext.ext_free = mb_free_mext_pgs; + } /* Pages are now writable. */ m->m_epg_flags |= EPG_FLAG_ANON; @@ -2189,7 +2297,7 @@ ktls_work_thread(void *ctx) ktls_free(m->m_epg_tls); uma_zfree(zone_mbuf, m); } else { - ktls_encrypt(m); + ktls_encrypt(wq, m); counter_u64_add(ktls_cnt_tx_queued, -1); } } diff --git a/sys/opencrypto/ktls_ocf.c b/sys/opencrypto/ktls_ocf.c index fd4a230fedea..31d787c2b61b 100644 --- a/sys/opencrypto/ktls_ocf.c +++ b/sys/opencrypto/ktls_ocf.c @@ -178,15 +178,15 @@ ktls_ocf_dispatch(struct ocf_session *os, struct cryptop *crp) static int ktls_ocf_tls_cbc_encrypt(struct ktls_session *tls, const struct tls_record_layer *hdr, uint8_t *trailer, struct iovec *iniov, - struct iovec *outiov, int iovcnt, uint64_t seqno, + struct iovec *outiov, int iniovcnt, int outiovcnt, uint64_t seqno, uint8_t record_type __unused) { struct uio uio, out_uio; struct tls_mac_data ad; struct cryptop crp; struct ocf_session *os; - struct iovec iov[iovcnt + 2]; - struct iovec out_iov[iovcnt + 1]; + struct iovec iov[iniovcnt + 2]; + struct iovec out_iov[outiovcnt + 1]; int i, error; uint16_t tls_comp_len; uint8_t pad; @@ -219,10 +219,11 @@ ktls_ocf_tls_cbc_encrypt(struct ktls_session *tls, * at least compute inplace as well while we are here. */ tls_comp_len = 0; - inplace = true; - for (i = 0; i < iovcnt; i++) { + inplace = iniovcnt == outiovcnt; + for (i = 0; i < iniovcnt; i++) { tls_comp_len += iniov[i].iov_len; - if (iniov[i].iov_base != outiov[i].iov_base) + if (inplace && + (i >= outiovcnt || iniov[i].iov_base != outiov[i].iov_base)) inplace = false; } @@ -236,11 +237,11 @@ ktls_ocf_tls_cbc_encrypt(struct ktls_session *tls, /* First, compute the MAC. */ iov[0].iov_base = &ad; iov[0].iov_len = sizeof(ad); - memcpy(&iov[1], iniov, sizeof(*iniov) * iovcnt); - iov[iovcnt + 1].iov_base = trailer; - iov[iovcnt + 1].iov_len = os->mac_len; + memcpy(&iov[1], iniov, sizeof(*iniov) * iniovcnt); + iov[iniovcnt + 1].iov_base = trailer; + iov[iniovcnt + 1].iov_len = os->mac_len; uio.uio_iov = iov; - uio.uio_iovcnt = iovcnt + 2; + uio.uio_iovcnt = iniovcnt + 2; uio.uio_offset = 0; uio.uio_segflg = UIO_SYSSPACE; uio.uio_td = curthread; @@ -279,10 +280,10 @@ ktls_ocf_tls_cbc_encrypt(struct ktls_session *tls, * Don't recopy the input iovec, instead just adjust the * trailer length and skip over the AAD vector in the uio. */ - iov[iovcnt + 1].iov_len += pad + 1; + iov[iniovcnt + 1].iov_len += pad + 1; uio.uio_iov = iov + 1; - uio.uio_iovcnt = iovcnt + 1; - uio.uio_resid = tls_comp_len + iov[iovcnt + 1].iov_len; + uio.uio_iovcnt = iniovcnt + 1; + uio.uio_resid = tls_comp_len + iov[iniovcnt + 1].iov_len; KASSERT(uio.uio_resid % AES_BLOCK_LEN == 0, ("invalid encryption size")); @@ -297,10 +298,10 @@ ktls_ocf_tls_cbc_encrypt(struct ktls_session *tls, memcpy(crp.crp_iv, hdr + 1, AES_BLOCK_LEN); crypto_use_uio(&crp, &uio); if (!inplace) { - memcpy(out_iov, outiov, sizeof(*iniov) * iovcnt); - out_iov[iovcnt] = iov[iovcnt + 1]; + memcpy(out_iov, outiov, sizeof(*iniov) * outiovcnt); + out_iov[outiovcnt] = iov[outiovcnt + 1]; out_uio.uio_iov = out_iov; - out_uio.uio_iovcnt = iovcnt + 1; + out_uio.uio_iovcnt = outiovcnt + 1; out_uio.uio_offset = 0; out_uio.uio_segflg = UIO_SYSSPACE; out_uio.uio_td = curthread; @@ -338,14 +339,14 @@ ktls_ocf_tls_cbc_encrypt(struct ktls_session *tls, static int ktls_ocf_tls12_aead_encrypt(struct ktls_session *tls, const struct tls_record_layer *hdr, uint8_t *trailer, struct iovec *iniov, - struct iovec *outiov, int iovcnt, uint64_t seqno, + struct iovec *outiov, int iniovcnt, int outiovcnt, uint64_t seqno, uint8_t record_type __unused) { struct uio uio, out_uio, *tag_uio; struct tls_aead_data ad; struct cryptop crp; struct ocf_session *os; - struct iovec iov[iovcnt + 1]; + struct iovec iov[outiovcnt + 1]; int i, error; uint16_t tls_comp_len; bool inplace; @@ -353,13 +354,13 @@ ktls_ocf_tls12_aead_encrypt(struct ktls_session *tls, os = tls->cipher; uio.uio_iov = iniov; - uio.uio_iovcnt = iovcnt; + uio.uio_iovcnt = iniovcnt; uio.uio_offset = 0; uio.uio_segflg = UIO_SYSSPACE; uio.uio_td = curthread; out_uio.uio_iov = outiov; - out_uio.uio_iovcnt = iovcnt; + out_uio.uio_iovcnt = outiovcnt; out_uio.uio_offset = 0; out_uio.uio_segflg = UIO_SYSSPACE; out_uio.uio_td = curthread; @@ -396,10 +397,11 @@ ktls_ocf_tls12_aead_encrypt(struct ktls_session *tls, crp.crp_aad_length = sizeof(ad); /* Compute payload length and determine if encryption is in place. */ - inplace = true; + inplace = iniovcnt == outiovcnt; crp.crp_payload_start = 0; - for (i = 0; i < iovcnt; i++) { - if (iniov[i].iov_base != outiov[i].iov_base) + for (i = 0; i < iniovcnt; i++) { + if (inplace && + (i >= outiovcnt || iniov[i].iov_base != outiov[i].iov_base)) inplace = false; crp.crp_payload_length += iniov[i].iov_len; } @@ -412,9 +414,9 @@ ktls_ocf_tls12_aead_encrypt(struct ktls_session *tls, tag_uio = &out_uio; /* Duplicate iovec and append vector for tag. */ - memcpy(iov, tag_uio->uio_iov, iovcnt * sizeof(struct iovec)); - iov[iovcnt].iov_base = trailer; - iov[iovcnt].iov_len = AES_GMAC_HASH_LEN; + memcpy(iov, tag_uio->uio_iov, outiovcnt * sizeof(struct iovec)); + iov[outiovcnt].iov_base = trailer; + iov[outiovcnt].iov_len = AES_GMAC_HASH_LEN; tag_uio->uio_iov = iov; tag_uio->uio_iovcnt++; crp.crp_digest_start = tag_uio->uio_resid; @@ -510,14 +512,15 @@ ktls_ocf_tls12_aead_decrypt(struct ktls_session *tls, static int ktls_ocf_tls13_aead_encrypt(struct ktls_session *tls, const struct tls_record_layer *hdr, uint8_t *trailer, struct iovec *iniov, - struct iovec *outiov, int iovcnt, uint64_t seqno, uint8_t record_type) + struct iovec *outiov, int iniovcnt, int outiovcnt, uint64_t seqno, + uint8_t record_type) { struct uio uio, out_uio; struct tls_aead_data_13 ad; char nonce[12]; struct cryptop crp; struct ocf_session *os; - struct iovec iov[iovcnt + 1], out_iov[iovcnt + 1]; + struct iovec iov[iniovcnt + 1], out_iov[outiovcnt + 1]; int i, error; bool inplace; @@ -538,10 +541,11 @@ ktls_ocf_tls13_aead_encrypt(struct ktls_session *tls, crp.crp_aad_length = sizeof(ad); /* Compute payload length and determine if encryption is in place. */ - inplace = true; + inplace = iniovcnt == outiovcnt; crp.crp_payload_start = 0; - for (i = 0; i < iovcnt; i++) { - if (iniov[i].iov_base != outiov[i].iov_base) + for (i = 0; i < iniovcnt; i++) { + if (inplace && (i >= outiovcnt || + iniov[i].iov_base != outiov[i].iov_base)) inplace = false; crp.crp_payload_length += iniov[i].iov_len; } @@ -556,11 +560,11 @@ ktls_ocf_tls13_aead_encrypt(struct ktls_session *tls, * include the full trailer as input to get the record_type * even if only the first byte is used. */ - memcpy(iov, iniov, iovcnt * sizeof(*iov)); - iov[iovcnt].iov_base = trailer; - iov[iovcnt].iov_len = tls->params.tls_tlen; + memcpy(iov, iniov, iniovcnt * sizeof(*iov)); + iov[iniovcnt].iov_base = trailer; + iov[iniovcnt].iov_len = tls->params.tls_tlen; uio.uio_iov = iov; - uio.uio_iovcnt = iovcnt + 1; + uio.uio_iovcnt = iniovcnt + 1; uio.uio_offset = 0; uio.uio_resid = crp.crp_payload_length + tls->params.tls_tlen - 1; uio.uio_segflg = UIO_SYSSPACE; @@ -569,11 +573,11 @@ ktls_ocf_tls13_aead_encrypt(struct ktls_session *tls, if (!inplace) { /* Duplicate the output iov to append the trailer. */ - memcpy(out_iov, outiov, iovcnt * sizeof(*out_iov)); - out_iov[iovcnt] = iov[iovcnt]; + memcpy(out_iov, outiov, outiovcnt * sizeof(*out_iov)); + out_iov[outiovcnt] = iov[outiovcnt]; out_uio.uio_iov = out_iov; - out_uio.uio_iovcnt = iovcnt + 1; + out_uio.uio_iovcnt = outiovcnt + 1; out_uio.uio_offset = 0; out_uio.uio_resid = crp.crp_payload_length + tls->params.tls_tlen - 1; diff --git a/sys/sys/ktls.h b/sys/sys/ktls.h index d3da1286403c..3c43a23af04f 100644 --- a/sys/sys/ktls.h +++ b/sys/sys/ktls.h @@ -164,7 +164,7 @@ struct tls_session_params { #define KTLS_TX 1 #define KTLS_RX 2 -#define KTLS_API_VERSION 7 +#define KTLS_API_VERSION 8 struct iovec; struct ktls_session; @@ -186,8 +186,8 @@ struct ktls_session { union { int (*sw_encrypt)(struct ktls_session *tls, const struct tls_record_layer *hdr, uint8_t *trailer, - struct iovec *src, struct iovec *dst, int iovcnt, - uint64_t seqno, uint8_t record_type); + struct iovec *src, struct iovec *dst, int srciovcnt, + int dstiovcnt, uint64_t seqno, uint8_t record_type); int (*sw_decrypt)(struct ktls_session *tls, const struct tls_record_layer *hdr, struct mbuf *m, uint64_t seqno, int *trailer_len); From owner-dev-commits-src-main@freebsd.org Wed Mar 3 22:45:21 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F35F955365B; Wed, 3 Mar 2021 22:45:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DrTbj6XcTz3hjN; Wed, 3 Mar 2021 22:45:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D32DD121B4; Wed, 3 Mar 2021 22:45:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 123MjLXs044148; Wed, 3 Mar 2021 22:45:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 123MjLYY044147; Wed, 3 Mar 2021 22:45:21 GMT (envelope-from git) Date: Wed, 3 Mar 2021 22:45:21 GMT Message-Id: <202103032245.123MjLYY044147@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: 6241b57131a6 - main - hid: add opt_hid.h to modules that use HID_DEBUG MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6241b57131a60bc2bd0eda41c145aa9659c2886b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 22:45:22 -0000 The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=6241b57131a60bc2bd0eda41c145aa9659c2886b commit 6241b57131a60bc2bd0eda41c145aa9659c2886b Author: Vladimir Kondratyev AuthorDate: 2021-03-03 22:21:15 +0000 Commit: Vladimir Kondratyev CommitDate: 2021-03-03 22:43:29 +0000 hid: add opt_hid.h to modules that use HID_DEBUG Submitted by: Greg V Reviewed by: imp, wulf MFC after: 1 week Differential revision: https://reviews.freebsd.org/D28995 --- sys/dev/hid/hconf.c | 2 ++ sys/dev/hid/hkbd.c | 1 + sys/modules/hid/hconf/Makefile | 1 + sys/modules/hid/hkbd/Makefile | 2 +- sys/modules/hid/ps4dshock/Makefile | 1 + 5 files changed, 6 insertions(+), 1 deletion(-) diff --git a/sys/dev/hid/hconf.c b/sys/dev/hid/hconf.c index cb0465e71b3e..90cd52d3116c 100644 --- a/sys/dev/hid/hconf.c +++ b/sys/dev/hid/hconf.c @@ -34,6 +34,8 @@ __FBSDID("$FreeBSD$"); * https://docs.microsoft.com/en-us/windows-hardware/design/component-guidelines/windows-precision-touchpad-required-hid-top-level-collections */ +#include "opt_hid.h" + #include #include #include diff --git a/sys/dev/hid/hkbd.c b/sys/dev/hid/hkbd.c index 89325f9b2499..775ad677f4de 100644 --- a/sys/dev/hid/hkbd.c +++ b/sys/dev/hid/hkbd.c @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); * HID spec: http://www.usb.org/developers/devclass_docs/HID1_11.pdf */ +#include "opt_hid.h" #include "opt_kbd.h" #include "opt_hkbd.h" #include "opt_evdev.h" diff --git a/sys/modules/hid/hconf/Makefile b/sys/modules/hid/hconf/Makefile index 1e5c68fe1848..0ac8d969cd71 100644 --- a/sys/modules/hid/hconf/Makefile +++ b/sys/modules/hid/hconf/Makefile @@ -4,6 +4,7 @@ KMOD= hconf SRCS= hconf.c +SRCS+= opt_hid.h SRCS+= bus_if.h device_if.h .include diff --git a/sys/modules/hid/hkbd/Makefile b/sys/modules/hid/hkbd/Makefile index 38221227d1cd..8bb1c339ac6c 100644 --- a/sys/modules/hid/hkbd/Makefile +++ b/sys/modules/hid/hkbd/Makefile @@ -4,7 +4,7 @@ KMOD= hkbd SRCS= hkbd.c -SRCS+= opt_evdev.h opt_kbd.h opt_hkbd.h +SRCS+= opt_hid.h opt_evdev.h opt_kbd.h opt_hkbd.h SRCS+= bus_if.h device_if.h .include diff --git a/sys/modules/hid/ps4dshock/Makefile b/sys/modules/hid/ps4dshock/Makefile index 688494f33ac6..ab46ba3f2363 100644 --- a/sys/modules/hid/ps4dshock/Makefile +++ b/sys/modules/hid/ps4dshock/Makefile @@ -4,6 +4,7 @@ KMOD= ps4dshock SRCS= ps4dshock.c +SRCS+= opt_hid.h SRCS+= bus_if.h device_if.h usbdevs.h .include From owner-dev-commits-src-main@freebsd.org Wed Mar 3 22:47:54 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 38C6C55399B; Wed, 3 Mar 2021 22:47:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DrTff16PGz3j6N; Wed, 3 Mar 2021 22:47:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 18E1412392; Wed, 3 Mar 2021 22:47:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 123Mlr82044624; Wed, 3 Mar 2021 22:47:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 123Mlrmg044623; Wed, 3 Mar 2021 22:47:53 GMT (envelope-from git) Date: Wed, 3 Mar 2021 22:47:53 GMT Message-Id: <202103032247.123Mlrmg044623@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: e6cfd2939a42 - main - Remove the usr/tests/usr.bin/yacc/yacc directory when removing yacc. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e6cfd2939a4261c1f4bf802368cea8faf824c128 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 22:47:54 -0000 The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=e6cfd2939a4261c1f4bf802368cea8faf824c128 commit e6cfd2939a4261c1f4bf802368cea8faf824c128 Author: John Baldwin AuthorDate: 2021-03-03 22:46:45 +0000 Commit: John Baldwin CommitDate: 2021-03-03 22:46:45 +0000 Remove the usr/tests/usr.bin/yacc/yacc directory when removing yacc. MFC after: 1 week --- tools/build/mk/OptionalObsoleteFiles.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index 5984645cbc14..44cd4a4281e7 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -9164,6 +9164,7 @@ OLD_FILES+=usr/tests/usr.bin/yacc/yacc/varsyntax_calc1.output OLD_FILES+=usr/tests/usr.bin/yacc/yacc/varsyntax_calc1.tab.c OLD_FILES+=usr/tests/usr.bin/yacc/yacc/varsyntax_calc1.tab.h OLD_FILES+=usr/tests/usr.bin/yacc/yacc_tests +OLD_DIRS+=usr/tests/usr.bin/yacc/yacc OLD_DIRS+=usr/tests/usr.bin/yacc .endif From owner-dev-commits-src-main@freebsd.org Wed Mar 3 23:16:27 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 87B3D553D73; Wed, 3 Mar 2021 23:16:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DrVHb3TY6z3kJQ; Wed, 3 Mar 2021 23:16:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6A27C1236F; Wed, 3 Mar 2021 23:16:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 123NGR1s084402; Wed, 3 Mar 2021 23:16:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 123NGRLt084401; Wed, 3 Mar 2021 23:16:27 GMT (envelope-from git) Date: Wed, 3 Mar 2021 23:16:27 GMT Message-Id: <202103032316.123NGRLt084401@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jung-uk Kim Subject: git: 645eaa2ccaed - main - libkvm: Plug couple of memory leaks and check possible calloc(3) failure MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jkim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 645eaa2ccaed6eea801d07d6a092974fc1713896 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 23:16:27 -0000 The branch main has been updated by jkim: URL: https://cgit.FreeBSD.org/src/commit/?id=645eaa2ccaed6eea801d07d6a092974fc1713896 commit 645eaa2ccaed6eea801d07d6a092974fc1713896 Author: Jung-uk Kim AuthorDate: 2021-03-03 23:10:00 +0000 Commit: Jung-uk Kim CommitDate: 2021-03-03 23:10:00 +0000 libkvm: Plug couple of memory leaks and check possible calloc(3) failure First, r204494 introduced dpcpu_off in struct __kvm and it was allocated from _kvm_dpcpu_init() but it was not free(3)'ed from kvm_close(3). Second, r291406 introduced kvm_nlist2(3) and converted kvm_nlist(3) to use the new function but it did not free the temporary buffer. Also, check possible calloc(3) failure while I am in the neighborhood. MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D29019 --- lib/libkvm/kvm.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/libkvm/kvm.c b/lib/libkvm/kvm.c index 95c5a580a2dd..2905302f32f2 100644 --- a/lib/libkvm/kvm.c +++ b/lib/libkvm/kvm.c @@ -301,6 +301,8 @@ kvm_close(kvm_t *kd) free(kd->pt_map); if (kd->page_map != NULL) free(kd->page_map); + if (kd->dpcpu_initialized != 0) + free(kd->dpcpu_off); if (kd->sparse_map != MAP_FAILED) munmap(kd->sparse_map, kd->pt_sparse_size); free((void *)kd); @@ -340,6 +342,10 @@ kvm_nlist(kvm_t *kd, struct nlist *nl) if (count == 0) return (0); kl = calloc(count + 1, sizeof(*kl)); + if (kl == NULL) { + _kvm_err(kd, kd->program, "cannot allocate memory"); + return (-1); + } for (i = 0; i < count; i++) kl[i].n_name = nl[i].n_name; nfail = kvm_nlist2(kd, kl); @@ -349,6 +355,7 @@ kvm_nlist(kvm_t *kd, struct nlist *nl) nl[i].n_desc = 0; nl[i].n_value = kl[i].n_value; } + free(kl); return (nfail); } From owner-dev-commits-src-main@freebsd.org Wed Mar 3 23:21:22 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2D31C5544F0; Wed, 3 Mar 2021 23:21:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DrVPG0rBHz3l3p; Wed, 3 Mar 2021 23:21:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0FC25129B2; Wed, 3 Mar 2021 23:21:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 123NLLWf093467; Wed, 3 Mar 2021 23:21:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 123NLLKu093466; Wed, 3 Mar 2021 23:21:21 GMT (envelope-from git) Date: Wed, 3 Mar 2021 23:21:21 GMT Message-Id: <202103032321.123NLLKu093466@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 68c03734484f - main - cryptocheck: Add support for the Poly1305 digest. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 68c03734484f679bf2f15fc81359128e331db364 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 23:21:22 -0000 The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=68c03734484f679bf2f15fc81359128e331db364 commit 68c03734484f679bf2f15fc81359128e331db364 Author: John Baldwin AuthorDate: 2021-03-03 23:17:00 +0000 Commit: John Baldwin CommitDate: 2021-03-03 23:20:56 +0000 cryptocheck: Add support for the Poly1305 digest. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D28758 --- tools/tools/crypto/cryptocheck.c | 90 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 85 insertions(+), 5 deletions(-) diff --git a/tools/tools/crypto/cryptocheck.c b/tools/tools/crypto/cryptocheck.c index fc08396b45f5..389d0cc9f610 100644 --- a/tools/tools/crypto/cryptocheck.c +++ b/tools/tools/crypto/cryptocheck.c @@ -98,6 +98,7 @@ * gmac 128-bit GMAC * gmac192 192-bit GMAC * gmac256 256-bit GMAC + * poly1305 * * Ciphers: * aes-cbc 128-bit AES-CBC @@ -149,10 +150,12 @@ static const struct alg { const char *name; int cipher; int mac; - enum { T_HASH, T_HMAC, T_GMAC, T_CIPHER, T_ETA, T_AEAD } type; + enum { T_HASH, T_HMAC, T_GMAC, T_DIGEST, T_CIPHER, T_ETA, T_AEAD } type; + int key_len; int tag_len; const EVP_CIPHER *(*evp_cipher)(void); const EVP_MD *(*evp_md)(void); + int pkey; } algs[] = { { .name = "sha1", .mac = CRYPTO_SHA1, .type = T_HASH, .evp_md = EVP_sha1 }, @@ -184,6 +187,8 @@ static const struct alg { .tag_len = AES_GMAC_HASH_LEN, .evp_cipher = EVP_aes_192_gcm }, { .name = "gmac256", .mac = CRYPTO_AES_NIST_GMAC, .type = T_GMAC, .tag_len = AES_GMAC_HASH_LEN, .evp_cipher = EVP_aes_256_gcm }, + { .name = "poly1305", .mac = CRYPTO_POLY1305, .type = T_DIGEST, + .key_len = POLY1305_KEY_LEN, .pkey = EVP_PKEY_POLY1305 }, { .name = "aes-cbc", .cipher = CRYPTO_AES_CBC, .type = T_CIPHER, .evp_cipher = EVP_aes_128_cbc }, { .name = "aes-cbc192", .cipher = CRYPTO_AES_CBC, .type = T_CIPHER, @@ -1061,7 +1066,7 @@ openssl_gmac(const struct alg *alg, const EVP_CIPHER *cipher, const char *key, } static bool -ocf_gmac(const struct alg *alg, const char *input, size_t size, const char *key, +ocf_mac(const struct alg *alg, const char *input, size_t size, const char *key, size_t key_len, const char *iv, char *tag, int *cridp) { struct ocf_session ses; @@ -1072,7 +1077,7 @@ ocf_gmac(const struct alg *alg, const char *input, size_t size, const char *key, sop.mackeylen = key_len; sop.mackey = key; sop.mac = alg->mac; - if (!ocf_init_session(&sop, "GMAC", alg->name, &ses)) + if (!ocf_init_session(&sop, "MAC", alg->name, &ses)) return (false); ocf_init_cop(&ses, &cop); @@ -1119,7 +1124,78 @@ run_gmac_test(const struct alg *alg, size_t size) openssl_gmac(alg, cipher, key, iv, buffer, size, control_tag); /* OCF GMAC. */ - if (!ocf_gmac(alg, buffer, size, key, key_len, iv, test_tag, &crid)) + if (!ocf_mac(alg, buffer, size, key, key_len, iv, test_tag, &crid)) + goto out; + if (memcmp(control_tag, test_tag, sizeof(control_tag)) != 0) { + printf("%s (%zu) mismatch:\n", alg->name, size); + printf("control:\n"); + hexdump(control_tag, sizeof(control_tag), NULL, 0); + printf("test (cryptodev device %s):\n", crfind(crid)); + hexdump(test_tag, sizeof(test_tag), NULL, 0); + goto out; + } + + if (verbose) + printf("%s (%zu) matched (cryptodev device %s)\n", + alg->name, size, crfind(crid)); + +out: + free(buffer); + free(key); +} + +static void +openssl_digest(const struct alg *alg, const char *key, u_int key_len, + const char *input, size_t size, char *tag, u_int tag_len) +{ + EVP_MD_CTX *mdctx; + EVP_PKEY *pkey; + size_t len; + + pkey = EVP_PKEY_new_raw_private_key(alg->pkey, NULL, key, key_len); + if (pkey == NULL) + errx(1, "OpenSSL %s (%zu) pkey new failed: %s", alg->name, + size, ERR_error_string(ERR_get_error(), NULL)); + mdctx = EVP_MD_CTX_new(); + if (mdctx == NULL) + errx(1, "OpenSSL %s (%zu) ctx new failed: %s", alg->name, + size, ERR_error_string(ERR_get_error(), NULL)); + if (EVP_DigestSignInit(mdctx, NULL, NULL, NULL, pkey) != 1) + errx(1, "OpenSSL %s (%zu) digest sign init failed: %s", + alg->name, size, ERR_error_string(ERR_get_error(), NULL)); + if (EVP_DigestSignUpdate(mdctx, input, size) != 1) + errx(1, "OpenSSL %s (%zu) digest update failed: %s", alg->name, + size, ERR_error_string(ERR_get_error(), NULL)); + len = tag_len; + if (EVP_DigestSignFinal(mdctx, tag, &len) != 1) + errx(1, "OpenSSL %s (%zu) digest final failed: %s", alg->name, + size, ERR_error_string(ERR_get_error(), NULL)); + EVP_MD_CTX_free(mdctx); + EVP_PKEY_free(pkey); +} + +static void +run_digest_test(const struct alg *alg, size_t size) +{ + char *key, *buffer; + u_int key_len; + int crid; + char control_tag[EVP_MAX_MD_SIZE], test_tag[EVP_MAX_MD_SIZE]; + + memset(control_tag, 0x3c, sizeof(control_tag)); + memset(test_tag, 0x3c, sizeof(test_tag)); + + key_len = alg->key_len; + + key = alloc_buffer(key_len); + buffer = alloc_buffer(size); + + /* OpenSSL Poly1305. */ + openssl_digest(alg, key, key_len, buffer, size, control_tag, + sizeof(control_tag)); + + /* OCF Poly1305. */ + if (!ocf_mac(alg, buffer, size, key, key_len, NULL, test_tag, &crid)) goto out; if (memcmp(control_tag, test_tag, sizeof(control_tag)) != 0) { printf("%s (%zu) mismatch:\n", alg->name, size); @@ -1471,6 +1547,9 @@ run_test(const struct alg *alg, size_t aad_len, size_t size) case T_GMAC: run_gmac_test(alg, size); break; + case T_DIGEST: + run_digest_test(alg, size); + break; case T_CIPHER: run_cipher_test(alg, size); break; @@ -1518,7 +1597,8 @@ run_mac_tests(void) u_int i; for (i = 0; i < nitems(algs); i++) - if (algs[i].type == T_HMAC || algs[i].type == T_GMAC) + if (algs[i].type == T_HMAC || algs[i].type == T_GMAC || + algs[i].type == T_DIGEST) run_test_sizes(&algs[i]); } From owner-dev-commits-src-main@freebsd.org Wed Mar 3 23:21:23 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4935C55466A; Wed, 3 Mar 2021 23:21:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DrVPH1cTWz3kr7; Wed, 3 Mar 2021 23:21:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 29BE312450; Wed, 3 Mar 2021 23:21:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 123NLN9d093490; Wed, 3 Mar 2021 23:21:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 123NLNre093489; Wed, 3 Mar 2021 23:21:23 GMT (envelope-from git) Date: Wed, 3 Mar 2021 23:21:23 GMT Message-Id: <202103032321.123NLNre093489@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 442a29361146 - main - cryptocheck: Free generated IV after each GMAC test. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 442a293611461834778d1b7cd2ac170fb3427dcf Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 23:21:23 -0000 The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=442a293611461834778d1b7cd2ac170fb3427dcf commit 442a293611461834778d1b7cd2ac170fb3427dcf Author: John Baldwin AuthorDate: 2021-03-03 23:17:19 +0000 Commit: John Baldwin CommitDate: 2021-03-03 23:20:57 +0000 cryptocheck: Free generated IV after each GMAC test. Reviewed by: cem Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D28753 --- tools/tools/crypto/cryptocheck.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/tools/crypto/cryptocheck.c b/tools/tools/crypto/cryptocheck.c index 389d0cc9f610..bd075d24e0f5 100644 --- a/tools/tools/crypto/cryptocheck.c +++ b/tools/tools/crypto/cryptocheck.c @@ -1141,6 +1141,7 @@ run_gmac_test(const struct alg *alg, size_t size) out: free(buffer); + free(iv); free(key); } From owner-dev-commits-src-main@freebsd.org Wed Mar 3 23:21:24 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6C4CA55471D; Wed, 3 Mar 2021 23:21:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DrVPJ2VV1z3krC; Wed, 3 Mar 2021 23:21:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 46A011281E; Wed, 3 Mar 2021 23:21:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 123NLOWf093508; Wed, 3 Mar 2021 23:21:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 123NLOKb093507; Wed, 3 Mar 2021 23:21:24 GMT (envelope-from git) Date: Wed, 3 Mar 2021 23:21:24 GMT Message-Id: <202103032321.123NLOKb093507@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: a079e38b08f2 - main - ossl: Add Poly1305 digest support. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a079e38b08f2f07c50ba915dae66d099559abdcc Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 23:21:24 -0000 The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=a079e38b08f2f07c50ba915dae66d099559abdcc commit a079e38b08f2f07c50ba915dae66d099559abdcc Author: John Baldwin AuthorDate: 2021-03-03 23:17:29 +0000 Commit: John Baldwin CommitDate: 2021-03-03 23:20:57 +0000 ossl: Add Poly1305 digest support. Reviewed by: cem Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D28754 --- share/man/man4/ossl.4 | 4 +- sys/conf/files | 1 + sys/conf/files.amd64 | 1 + sys/conf/files.arm64 | 2 + sys/conf/files.i386 | 1 + sys/crypto/openssl/ossl.c | 46 ++++++---- sys/crypto/openssl/ossl.h | 3 +- sys/crypto/openssl/ossl_poly1305.c | 181 +++++++++++++++++++++++++++++++++++++ sys/crypto/openssl/ossl_poly1305.h | 35 +++++++ sys/modules/ossl/Makefile | 4 + 10 files changed, 260 insertions(+), 18 deletions(-) diff --git a/share/man/man4/ossl.4 b/share/man/man4/ossl.4 index ce97a9fc0f71..9c0d7f897d53 100644 --- a/share/man/man4/ossl.4 +++ b/share/man/man4/ossl.4 @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 4, 2020 +.Dd March 3, 2021 .Dt OSSL 4 .Os .Sh NAME @@ -74,6 +74,8 @@ driver includes support for the following algorithms: .Pp .Bl -bullet -compact .It +Poly1305 +.It SHA1 .It SHA1-HMAC diff --git a/sys/conf/files b/sys/conf/files index 21990a4a762c..679e76d50d44 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -739,6 +739,7 @@ crypto/chacha20/chacha-sw.c optional crypto | ipsec | ipsec_support crypto/des/des_ecb.c optional netsmb crypto/des/des_setkey.c optional netsmb crypto/openssl/ossl.c optional ossl +crypto/openssl/ossl_poly1305.c optional ossl crypto/openssl/ossl_sha1.c optional ossl crypto/openssl/ossl_sha256.c optional ossl crypto/openssl/ossl_sha512.c optional ossl diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64 index f0c863e0bd2f..d589e5d51367 100644 --- a/sys/conf/files.amd64 +++ b/sys/conf/files.amd64 @@ -137,6 +137,7 @@ cddl/dev/dtrace/amd64/dtrace_asm.S optional dtrace compile-with "${DTRACE_S}" cddl/dev/dtrace/amd64/dtrace_subr.c optional dtrace compile-with "${DTRACE_C}" crypto/aesni/aeskeys_amd64.S optional aesni crypto/des/des_enc.c optional netsmb +crypto/openssl/amd64/poly1305-x86_64.S optional ossl crypto/openssl/amd64/sha1-x86_64.S optional ossl crypto/openssl/amd64/sha256-x86_64.S optional ossl crypto/openssl/amd64/sha512-x86_64.S optional ossl diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index 3ca830f64f05..b87202eaf887 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -125,6 +125,8 @@ ghashv8-armx.o optional armv8crypto \ crypto/des/des_enc.c optional netsmb crypto/openssl/ossl_aarch64.c optional ossl +crypto/openssl/aarch64/poly1305-armv8.S optional ossl \ + compile-with "${CC} -c ${CFLAGS:N-mgeneral-regs-only} ${WERROR} ${PROF} ${.IMPSRC}" crypto/openssl/aarch64/sha1-armv8.S optional ossl \ compile-with "${CC} -c ${CFLAGS:N-mgeneral-regs-only} ${WERROR} ${PROF} ${.IMPSRC}" crypto/openssl/aarch64/sha256-armv8.S optional ossl \ diff --git a/sys/conf/files.i386 b/sys/conf/files.i386 index 1e2ab5f8c52a..06fb2d8dc0e1 100644 --- a/sys/conf/files.i386 +++ b/sys/conf/files.i386 @@ -77,6 +77,7 @@ compat/linux/linux_vdso.c optional compat_linux compat/linux/linux.c optional compat_linux crypto/aesni/aeskeys_i386.S optional aesni crypto/des/arch/i386/des_enc.S optional netsmb +crypto/openssl/i386/poly1305-x86.S optional ossl crypto/openssl/i386/sha1-586.S optional ossl crypto/openssl/i386/sha256-586.S optional ossl crypto/openssl/i386/sha512-586.S optional ossl diff --git a/sys/crypto/openssl/ossl.c b/sys/crypto/openssl/ossl.c index 35f19c9fbca7..229729c27c21 100644 --- a/sys/crypto/openssl/ossl.c +++ b/sys/crypto/openssl/ossl.c @@ -135,6 +135,8 @@ ossl_lookup_hash(const struct crypto_session_params *csp) case CRYPTO_SHA2_512: case CRYPTO_SHA2_512_HMAC: return (&ossl_hash_sha512); + case CRYPTO_POLY1305: + return (&ossl_hash_poly1305); default: return (NULL); } @@ -159,14 +161,6 @@ ossl_probesession(device_t dev, const struct crypto_session_params *csp) return (CRYPTODEV_PROBE_ACCEL_SOFTWARE); } -static void -ossl_setkey_hmac(struct ossl_session *s, const void *key, int klen) -{ - - hmac_init_ipad(s->hash.axf, key, klen, &s->hash.ictx); - hmac_init_opad(s->hash.axf, key, klen, &s->hash.octx); -} - static int ossl_newsession(device_t dev, crypto_session_t cses, const struct crypto_session_params *csp) @@ -188,8 +182,16 @@ ossl_newsession(device_t dev, crypto_session_t cses, } else { if (csp->csp_auth_key != NULL) { fpu_kern_enter(curthread, NULL, FPU_KERN_NOCTX); - ossl_setkey_hmac(s, csp->csp_auth_key, - csp->csp_auth_klen); + if (axf->Setkey != NULL) { + axf->Init(&s->hash.ictx); + axf->Setkey(&s->hash.ictx, csp->csp_auth_key, + csp->csp_auth_klen); + } else { + hmac_init_ipad(axf, csp->csp_auth_key, + csp->csp_auth_klen, &s->hash.ictx); + hmac_init_opad(axf, csp->csp_auth_key, + csp->csp_auth_klen, &s->hash.octx); + } fpu_kern_leave(curthread, NULL); } } @@ -218,10 +220,18 @@ ossl_process(device_t dev, struct cryptop *crp, int hint) fpu_entered = true; } - if (crp->crp_auth_key != NULL) - ossl_setkey_hmac(s, crp->crp_auth_key, csp->csp_auth_klen); - - ctx = s->hash.ictx; + if (crp->crp_auth_key == NULL) { + ctx = s->hash.ictx; + } else { + if (axf->Setkey != NULL) { + axf->Init(&ctx); + axf->Setkey(&ctx, crp->crp_auth_key, + csp->csp_auth_klen); + } else { + hmac_init_ipad(axf, crp->crp_auth_key, + csp->csp_auth_klen, &ctx); + } + } if (crp->crp_aad != NULL) error = axf->Update(&ctx, crp->crp_aad, crp->crp_aad_length); @@ -238,8 +248,12 @@ ossl_process(device_t dev, struct cryptop *crp, int hint) axf->Final(digest, &ctx); - if (csp->csp_auth_klen != 0) { - ctx = s->hash.octx; + if (csp->csp_auth_klen != 0 && axf->Setkey == NULL) { + if (crp->crp_auth_key == NULL) + ctx = s->hash.octx; + else + hmac_init_opad(axf, crp->crp_auth_key, + csp->csp_auth_klen, &ctx); axf->Update(&ctx, digest, axf->hashsize); axf->Final(digest, &ctx); } diff --git a/sys/crypto/openssl/ossl.h b/sys/crypto/openssl/ossl.h index 533d497f1be3..55022b10f377 100644 --- a/sys/crypto/openssl/ossl.h +++ b/sys/crypto/openssl/ossl.h @@ -38,9 +38,10 @@ void ossl_cpuid(void); /* Needs to be big enough to hold any hash context. */ struct ossl_hash_context { - uint32_t dummy[54]; + uint32_t dummy[61]; } __aligned(32); +extern struct auth_hash ossl_hash_poly1305; extern struct auth_hash ossl_hash_sha1; extern struct auth_hash ossl_hash_sha224; extern struct auth_hash ossl_hash_sha256; diff --git a/sys/crypto/openssl/ossl_poly1305.c b/sys/crypto/openssl/ossl_poly1305.c new file mode 100644 index 000000000000..8f8c5bc4b6e7 --- /dev/null +++ b/sys/crypto/openssl/ossl_poly1305.c @@ -0,0 +1,181 @@ +/* + * Copyright 2015-2018 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#include +#include + +#include +#include + +#include +#include + +#define POLY1305_ASM + +/* From crypto/poly1305/poly1305.c */ + +/* pick 32-bit unsigned integer in little endian order */ +static unsigned int U8TOU32(const unsigned char *p) +{ + return (((unsigned int)(p[0] & 0xff)) | + ((unsigned int)(p[1] & 0xff) << 8) | + ((unsigned int)(p[2] & 0xff) << 16) | + ((unsigned int)(p[3] & 0xff) << 24)); +} + +/* + * Implementations can be classified by amount of significant bits in + * words making up the multi-precision value, or in other words radix + * or base of numerical representation, e.g. base 2^64, base 2^32, + * base 2^26. Complementary characteristic is how wide is the result of + * multiplication of pair of digits, e.g. it would take 128 bits to + * accommodate multiplication result in base 2^64 case. These are used + * interchangeably. To describe implementation that is. But interface + * is designed to isolate this so that low-level primitives implemented + * in assembly can be self-contained/self-coherent. + */ +int poly1305_init(void *ctx, const unsigned char key[16], void *func); +void poly1305_blocks(void *ctx, const unsigned char *inp, size_t len, + unsigned int padbit); +void poly1305_emit(void *ctx, unsigned char mac[16], + const unsigned int nonce[4]); + +static void Poly1305_Init(POLY1305 *ctx, const unsigned char key[32]) +{ + ctx->nonce[0] = U8TOU32(&key[16]); + ctx->nonce[1] = U8TOU32(&key[20]); + ctx->nonce[2] = U8TOU32(&key[24]); + ctx->nonce[3] = U8TOU32(&key[28]); + + /* + * Unlike reference poly1305_init assembly counterpart is expected + * to return a value: non-zero if it initializes ctx->func, and zero + * otherwise. Latter is to simplify assembly in cases when there no + * multiple code paths to switch between. + */ + if (!poly1305_init(ctx->opaque, key, &ctx->func)) { + ctx->func.blocks = poly1305_blocks; + ctx->func.emit = poly1305_emit; + } + + ctx->num = 0; + +} + +#ifdef POLY1305_ASM +/* + * This "eclipses" poly1305_blocks and poly1305_emit, but it's + * conscious choice imposed by -Wshadow compiler warnings. + */ +# define poly1305_blocks (*poly1305_blocks_p) +# define poly1305_emit (*poly1305_emit_p) +#endif + +static void Poly1305_Update(POLY1305 *ctx, const unsigned char *inp, size_t len) +{ +#ifdef POLY1305_ASM + /* + * As documented, poly1305_blocks is never called with input + * longer than single block and padbit argument set to 0. This + * property is fluently used in assembly modules to optimize + * padbit handling on loop boundary. + */ + poly1305_blocks_f poly1305_blocks_p = ctx->func.blocks; +#endif + size_t rem, num; + + if ((num = ctx->num)) { + rem = POLY1305_BLOCK_SIZE - num; + if (len >= rem) { + memcpy(ctx->data + num, inp, rem); + poly1305_blocks(ctx->opaque, ctx->data, POLY1305_BLOCK_SIZE, 1); + inp += rem; + len -= rem; + } else { + /* Still not enough data to process a block. */ + memcpy(ctx->data + num, inp, len); + ctx->num = num + len; + return; + } + } + + rem = len % POLY1305_BLOCK_SIZE; + len -= rem; + + if (len >= POLY1305_BLOCK_SIZE) { + poly1305_blocks(ctx->opaque, inp, len, 1); + inp += len; + } + + if (rem) + memcpy(ctx->data, inp, rem); + + ctx->num = rem; +} + +static void Poly1305_Final(POLY1305 *ctx, unsigned char mac[16]) +{ +#ifdef POLY1305_ASM + poly1305_blocks_f poly1305_blocks_p = ctx->func.blocks; + poly1305_emit_f poly1305_emit_p = ctx->func.emit; +#endif + size_t num; + + if ((num = ctx->num)) { + ctx->data[num++] = 1; /* pad bit */ + while (num < POLY1305_BLOCK_SIZE) + ctx->data[num++] = 0; + poly1305_blocks(ctx->opaque, ctx->data, POLY1305_BLOCK_SIZE, 0); + } + + poly1305_emit(ctx->opaque, mac, ctx->nonce); + + /* zero out the state */ + OPENSSL_cleanse(ctx, sizeof(*ctx)); +} + +static void +ossl_poly1305_init(void *vctx) +{ +} + +static void +ossl_poly1305_setkey(void *vctx, const uint8_t *key, u_int klen) +{ + MPASS(klen == 32); + Poly1305_Init(vctx, key); +} + +static int +ossl_poly1305_update(void *vctx, const void *buf, u_int len) +{ + Poly1305_Update(vctx, buf, len); + return (0); +} + +static void +ossl_poly1305_final(uint8_t *digest, void *vctx) +{ + Poly1305_Final(vctx, digest); +} + +struct auth_hash ossl_hash_poly1305 = { + .type = CRYPTO_POLY1305, + .name = "OpenSSL-Poly1305", + .hashsize = POLY1305_HASH_LEN, + .ctxsize = sizeof(struct poly1305_context), + .blocksize = POLY1305_BLOCK_SIZE, + .Init = ossl_poly1305_init, + .Setkey = ossl_poly1305_setkey, + .Update = ossl_poly1305_update, + .Final = ossl_poly1305_final, +}; + +_Static_assert(sizeof(struct poly1305_context) <= + sizeof(struct ossl_hash_context), "ossl_hash_context too small"); diff --git a/sys/crypto/openssl/ossl_poly1305.h b/sys/crypto/openssl/ossl_poly1305.h new file mode 100644 index 000000000000..d1b2db6d5cba --- /dev/null +++ b/sys/crypto/openssl/ossl_poly1305.h @@ -0,0 +1,35 @@ +/* + * Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +/* From include/crypto/poly1305.h */ + +#define POLY1305_BLOCK_SIZE 16 + +typedef struct poly1305_context POLY1305; + +/* From crypto/poly1305/poly1305_local.h */ + +typedef void (*poly1305_blocks_f) (void *ctx, const unsigned char *inp, + size_t len, unsigned int padbit); +typedef void (*poly1305_emit_f) (void *ctx, unsigned char mac[16], + const unsigned int nonce[4]); + +struct poly1305_context { + double opaque[24]; /* large enough to hold internal state, declared + * 'double' to ensure at least 64-bit invariant + * alignment across all platforms and + * configurations */ + unsigned int nonce[4]; + unsigned char data[POLY1305_BLOCK_SIZE]; + size_t num; + struct { + poly1305_blocks_f blocks; + poly1305_emit_f emit; + } func; +}; diff --git a/sys/modules/ossl/Makefile b/sys/modules/ossl/Makefile index 6fe8c5a6c812..2ddebefebd1a 100644 --- a/sys/modules/ossl/Makefile +++ b/sys/modules/ossl/Makefile @@ -8,24 +8,28 @@ SRCS= bus_if.h \ cryptodev_if.h \ device_if.h \ ossl.c \ + ossl_poly1305.c \ ossl_sha1.c \ ossl_sha256.c \ ossl_sha512.c \ ${SRCS.${MACHINE_CPUARCH}} SRCS.aarch64= \ + poly1305-armv8.S \ sha1-armv8.S \ sha256-armv8.S \ sha512-armv8.S \ ossl_aarch64.c SRCS.amd64= \ + poly1305-x86_64.S \ sha1-x86_64.S \ sha256-x86_64.S \ sha512-x86_64.S \ ossl_x86.c SRCS.i386= \ + poly1305-x86.S \ sha1-586.S \ sha256-586.S \ sha512-586.S \ From owner-dev-commits-src-main@freebsd.org Wed Mar 3 23:21:26 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 985ED5541E7; Wed, 3 Mar 2021 23:21:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DrVPK4j5Xz3l1x; Wed, 3 Mar 2021 23:21:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6CF701267A; Wed, 3 Mar 2021 23:21:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 123NLPxx093530; Wed, 3 Mar 2021 23:21:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 123NLPOF093529; Wed, 3 Mar 2021 23:21:25 GMT (envelope-from git) Date: Wed, 3 Mar 2021 23:21:25 GMT Message-Id: <202103032321.123NLPOF093529@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: a899ce4ba4c4 - main - The ChaCha20 counter is little endian, not big endian. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a899ce4ba4c404d342bf892b8b756b66fc65d6b5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 23:21:27 -0000 The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=a899ce4ba4c404d342bf892b8b756b66fc65d6b5 commit a899ce4ba4c404d342bf892b8b756b66fc65d6b5 Author: John Baldwin AuthorDate: 2021-03-03 23:17:37 +0000 Commit: John Baldwin CommitDate: 2021-03-03 23:20:57 +0000 The ChaCha20 counter is little endian, not big endian. Reviewed by: cem Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D28755 --- share/man/man7/crypto.7 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man7/crypto.7 b/share/man/man7/crypto.7 index ccc2d1fc9be3..6e5bd83621aa 100644 --- a/share/man/man7/crypto.7 +++ b/share/man/man7/crypto.7 @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 18, 2021 +.Dd March 3, 2021 .Dt CRYPTO 7 .Os .Sh NAME @@ -136,7 +136,7 @@ counter rollover. .Dv CRYPTO_CHACHA20 accepts a 16 byte IV. The first 8 bytes are used as a nonce. -The last 8 bytes are used as 64-bit big-endian block counter. +The last 8 bytes are used as a 64-bit little-endian block counter. .Ss Authenticated Encryption with Associated Data Algorithms AEAD algorithms in OCF combine a stream cipher with an authentication algorithm to provide both secrecy and authentication. From owner-dev-commits-src-main@freebsd.org Wed Mar 3 23:21:29 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AEB5D554559; Wed, 3 Mar 2021 23:21:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DrVPM0ZbYz3ktg; Wed, 3 Mar 2021 23:21:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 96DD112A28; Wed, 3 Mar 2021 23:21:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 123NLQF1093552; Wed, 3 Mar 2021 23:21:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 123NLQGZ093551; Wed, 3 Mar 2021 23:21:26 GMT (envelope-from git) Date: Wed, 3 Mar 2021 23:21:26 GMT Message-Id: <202103032321.123NLQGZ093551@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 92aecd1e6fac - main - ossl: Add ChaCha20 cipher support. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 92aecd1e6fac47ffc893f628c1fe289568bb19cb Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 23:21:31 -0000 The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=92aecd1e6fac47ffc893f628c1fe289568bb19cb commit 92aecd1e6fac47ffc893f628c1fe289568bb19cb Author: John Baldwin AuthorDate: 2021-03-03 23:17:43 +0000 Commit: John Baldwin CommitDate: 2021-03-03 23:20:57 +0000 ossl: Add ChaCha20 cipher support. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D28756 --- share/man/man4/ossl.4 | 2 + sys/conf/files | 1 + sys/conf/files.amd64 | 1 + sys/conf/files.arm64 | 2 + sys/conf/files.i386 | 1 + sys/crypto/openssl/ossl.c | 82 ++++++++++++++++----- sys/crypto/openssl/ossl.h | 5 ++ sys/crypto/openssl/ossl_chacha.h | 42 +++++++++++ sys/crypto/openssl/ossl_chacha20.c | 141 +++++++++++++++++++++++++++++++++++++ sys/modules/ossl/Makefile | 4 ++ 10 files changed, 262 insertions(+), 19 deletions(-) diff --git a/share/man/man4/ossl.4 b/share/man/man4/ossl.4 index 9c0d7f897d53..2aa4b69eda31 100644 --- a/share/man/man4/ossl.4 +++ b/share/man/man4/ossl.4 @@ -74,6 +74,8 @@ driver includes support for the following algorithms: .Pp .Bl -bullet -compact .It +ChaCha20 +.It Poly1305 .It SHA1 diff --git a/sys/conf/files b/sys/conf/files index 679e76d50d44..60b334f75d3f 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -739,6 +739,7 @@ crypto/chacha20/chacha-sw.c optional crypto | ipsec | ipsec_support crypto/des/des_ecb.c optional netsmb crypto/des/des_setkey.c optional netsmb crypto/openssl/ossl.c optional ossl +crypto/openssl/ossl_chacha20.c optional ossl crypto/openssl/ossl_poly1305.c optional ossl crypto/openssl/ossl_sha1.c optional ossl crypto/openssl/ossl_sha256.c optional ossl diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64 index d589e5d51367..c5421f4af4fc 100644 --- a/sys/conf/files.amd64 +++ b/sys/conf/files.amd64 @@ -137,6 +137,7 @@ cddl/dev/dtrace/amd64/dtrace_asm.S optional dtrace compile-with "${DTRACE_S}" cddl/dev/dtrace/amd64/dtrace_subr.c optional dtrace compile-with "${DTRACE_C}" crypto/aesni/aeskeys_amd64.S optional aesni crypto/des/des_enc.c optional netsmb +crypto/openssl/amd64/chacha-x86_64.S optional ossl crypto/openssl/amd64/poly1305-x86_64.S optional ossl crypto/openssl/amd64/sha1-x86_64.S optional ossl crypto/openssl/amd64/sha256-x86_64.S optional ossl diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index b87202eaf887..0286ae57b0e0 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -125,6 +125,8 @@ ghashv8-armx.o optional armv8crypto \ crypto/des/des_enc.c optional netsmb crypto/openssl/ossl_aarch64.c optional ossl +crypto/openssl/aarch64/chacha-armv8.S optional ossl \ + compile-with "${CC} -c ${CFLAGS:N-mgeneral-regs-only} ${WERROR} ${PROF} ${.IMPSRC}" crypto/openssl/aarch64/poly1305-armv8.S optional ossl \ compile-with "${CC} -c ${CFLAGS:N-mgeneral-regs-only} ${WERROR} ${PROF} ${.IMPSRC}" crypto/openssl/aarch64/sha1-armv8.S optional ossl \ diff --git a/sys/conf/files.i386 b/sys/conf/files.i386 index 06fb2d8dc0e1..b0827ec0580d 100644 --- a/sys/conf/files.i386 +++ b/sys/conf/files.i386 @@ -77,6 +77,7 @@ compat/linux/linux_vdso.c optional compat_linux compat/linux/linux.c optional compat_linux crypto/aesni/aeskeys_i386.S optional aesni crypto/des/arch/i386/des_enc.S optional netsmb +crypto/openssl/i386/chacha-x86.S optional ossl crypto/openssl/i386/poly1305-x86.S optional ossl crypto/openssl/i386/sha1-586.S optional ossl crypto/openssl/i386/sha256-586.S optional ossl diff --git a/sys/crypto/openssl/ossl.c b/sys/crypto/openssl/ossl.c index 229729c27c21..0c863429939c 100644 --- a/sys/crypto/openssl/ossl.c +++ b/sys/crypto/openssl/ossl.c @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include "cryptodev_if.h" @@ -154,6 +155,16 @@ ossl_probesession(device_t dev, const struct crypto_session_params *csp) if (ossl_lookup_hash(csp) == NULL) return (EINVAL); break; + case CSP_MODE_CIPHER: + switch (csp->csp_cipher_alg) { + case CRYPTO_CHACHA20: + if (csp->csp_cipher_klen != CHACHA_KEY_SIZE) + return (EINVAL); + break; + default: + return (EINVAL); + } + break; default: return (EINVAL); } @@ -161,15 +172,12 @@ ossl_probesession(device_t dev, const struct crypto_session_params *csp) return (CRYPTODEV_PROBE_ACCEL_SOFTWARE); } -static int -ossl_newsession(device_t dev, crypto_session_t cses, +static void +ossl_newsession_hash(struct ossl_session *s, const struct crypto_session_params *csp) { - struct ossl_session *s; struct auth_hash *axf; - s = crypto_get_driver_session(cses); - axf = ossl_lookup_hash(csp); s->hash.axf = axf; if (csp->csp_auth_mlen == 0) @@ -195,31 +203,35 @@ ossl_newsession(device_t dev, crypto_session_t cses, fpu_kern_leave(curthread, NULL); } } +} + +static int +ossl_newsession(device_t dev, crypto_session_t cses, + const struct crypto_session_params *csp) +{ + struct ossl_session *s; + + s = crypto_get_driver_session(cses); + switch (csp->csp_mode) { + case CSP_MODE_DIGEST: + ossl_newsession_hash(s, csp); + break; + } + return (0); } static int -ossl_process(device_t dev, struct cryptop *crp, int hint) +ossl_process_hash(struct ossl_session *s, struct cryptop *crp, + const struct crypto_session_params *csp) { struct ossl_hash_context ctx; char digest[HASH_MAX_LEN]; - const struct crypto_session_params *csp; - struct ossl_session *s; struct auth_hash *axf; int error; - bool fpu_entered; - s = crypto_get_driver_session(crp->crp_session); - csp = crypto_get_params(crp->crp_session); axf = s->hash.axf; - if (is_fpu_kern_thread(0)) { - fpu_entered = false; - } else { - fpu_kern_enter(curthread, NULL, FPU_KERN_NOCTX); - fpu_entered = true; - } - if (crp->crp_auth_key == NULL) { ctx = s->hash.ictx; } else { @@ -273,13 +285,45 @@ ossl_process(device_t dev, struct cryptop *crp, int hint) explicit_bzero(digest, sizeof(digest)); out: + explicit_bzero(&ctx, sizeof(ctx)); + return (error); +} + +static int +ossl_process(device_t dev, struct cryptop *crp, int hint) +{ + const struct crypto_session_params *csp; + struct ossl_session *s; + int error; + bool fpu_entered; + + s = crypto_get_driver_session(crp->crp_session); + csp = crypto_get_params(crp->crp_session); + + if (is_fpu_kern_thread(0)) { + fpu_entered = false; + } else { + fpu_kern_enter(curthread, NULL, FPU_KERN_NOCTX); + fpu_entered = true; + } + + switch (csp->csp_mode) { + case CSP_MODE_DIGEST: + error = ossl_process_hash(s, crp, csp); + break; + case CSP_MODE_CIPHER: + error = ossl_chacha20(crp, csp); + break; + default: + __assert_unreachable(); + } + if (fpu_entered) fpu_kern_leave(curthread, NULL); crp->crp_etype = error; crypto_done(crp); - explicit_bzero(&ctx, sizeof(ctx)); return (0); } diff --git a/sys/crypto/openssl/ossl.h b/sys/crypto/openssl/ossl.h index 55022b10f377..b7c681d0fb1d 100644 --- a/sys/crypto/openssl/ossl.h +++ b/sys/crypto/openssl/ossl.h @@ -34,6 +34,11 @@ /* Compatibility shims. */ #define OPENSSL_cleanse explicit_bzero +struct cryptop; +struct crypto_session_params; + +int ossl_chacha20(struct cryptop *crp, + const struct crypto_session_params *csp); void ossl_cpuid(void); /* Needs to be big enough to hold any hash context. */ diff --git a/sys/crypto/openssl/ossl_chacha.h b/sys/crypto/openssl/ossl_chacha.h new file mode 100644 index 000000000000..781899c6bdf6 --- /dev/null +++ b/sys/crypto/openssl/ossl_chacha.h @@ -0,0 +1,42 @@ +/* + * Copyright 2015-2018 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +/* From include/crypto/chacha.h */ + +#ifndef OSSL_CRYPTO_CHACHA_H +#define OSSL_CRYPTO_CHACHA_H + +/* + * ChaCha20_ctr32 encrypts |len| bytes from |inp| with the given key and + * nonce and writes the result to |out|, which may be equal to |inp|. + * The |key| is not 32 bytes of verbatim key material though, but the + * said material collected into 8 32-bit elements array in host byte + * order. Same approach applies to nonce: the |counter| argument is + * pointer to concatenated nonce and counter values collected into 4 + * 32-bit elements. This, passing crypto material collected into 32-bit + * elements as opposite to passing verbatim byte vectors, is chosen for + * efficiency in multi-call scenarios. + */ +void ChaCha20_ctr32(unsigned char *out, const unsigned char *inp, + size_t len, const unsigned int key[8], + const unsigned int counter[4]); +/* + * You can notice that there is no key setup procedure. Because it's + * as trivial as collecting bytes into 32-bit elements, it's reckoned + * that below macro is sufficient. + */ +#define CHACHA_U8TOU32(p) ( \ + ((unsigned int)(p)[0]) | ((unsigned int)(p)[1]<<8) | \ + ((unsigned int)(p)[2]<<16) | ((unsigned int)(p)[3]<<24) ) + +#define CHACHA_KEY_SIZE 32 +#define CHACHA_CTR_SIZE 16 +#define CHACHA_BLK_SIZE 64 + +#endif diff --git a/sys/crypto/openssl/ossl_chacha20.c b/sys/crypto/openssl/ossl_chacha20.c new file mode 100644 index 000000000000..70a0a5718dbd --- /dev/null +++ b/sys/crypto/openssl/ossl_chacha20.c @@ -0,0 +1,141 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2020 Netflix, Inc + * + * 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, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any + * redistribution must be conditioned upon including a substantially + * similar Disclaimer requirement for further binary redistribution. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY + * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES. + */ + +#include +#include +#include +#include + +#include + +#include +#include + +int +ossl_chacha20(struct cryptop *crp, const struct crypto_session_params *csp) +{ + _Alignas(8) unsigned int key[CHACHA_KEY_SIZE / 4]; + unsigned int counter[CHACHA_CTR_SIZE / 4]; + unsigned char block[CHACHA_BLK_SIZE]; + struct crypto_buffer_cursor cc_in, cc_out; + const unsigned char *in, *inseg, *cipher_key; + unsigned char *out, *outseg; + size_t resid, todo, inlen, outlen; + uint32_t next_counter; + u_int i; + + if (crp->crp_cipher_key != NULL) + cipher_key = crp->crp_cipher_key; + else + cipher_key = csp->csp_cipher_key; + for (i = 0; i < nitems(key); i++) + key[i] = CHACHA_U8TOU32(cipher_key + i * 4); + crypto_read_iv(crp, counter); + for (i = 0; i < nitems(counter); i++) + counter[i] = le32toh(counter[i]); + + resid = crp->crp_payload_length; + crypto_cursor_init(&cc_in, &crp->crp_buf); + crypto_cursor_advance(&cc_in, crp->crp_payload_start); + inseg = crypto_cursor_segbase(&cc_in); + inlen = crypto_cursor_seglen(&cc_in); + if (CRYPTO_HAS_OUTPUT_BUFFER(crp)) { + crypto_cursor_init(&cc_out, &crp->crp_obuf); + crypto_cursor_advance(&cc_out, crp->crp_payload_output_start); + } else + cc_out = cc_in; + outseg = crypto_cursor_segbase(&cc_out); + outlen = crypto_cursor_seglen(&cc_out); + while (resid >= CHACHA_BLK_SIZE) { + if (inlen < CHACHA_BLK_SIZE) { + crypto_cursor_copydata(&cc_in, CHACHA_BLK_SIZE, block); + in = block; + inlen = CHACHA_BLK_SIZE; + } else + in = inseg; + if (outlen < CHACHA_BLK_SIZE) { + out = block; + outlen = CHACHA_BLK_SIZE; + } else + out = outseg; + + /* Figure out how many blocks we can encrypt/decrypt at once. */ + todo = rounddown(MIN(inlen, outlen), CHACHA_BLK_SIZE); + +#ifdef __LP64__ + /* ChaCha20_ctr32() assumes length is <= 4GB. */ + todo = (uint32_t)todo; +#endif + + /* Truncate if the 32-bit counter would roll over. */ + next_counter = counter[0] + todo / CHACHA_BLK_SIZE; + if (next_counter < counter[0]) { + todo -= next_counter * CHACHA_BLK_SIZE; + next_counter = 0; + } + + ChaCha20_ctr32(out, in, todo, key, counter); + + counter[0] = next_counter; + if (counter[0] == 0) + counter[1]++; + + if (out == block) { + crypto_cursor_copyback(&cc_out, CHACHA_BLK_SIZE, block); + outseg = crypto_cursor_segbase(&cc_out); + outlen = crypto_cursor_seglen(&cc_out); + } else { + crypto_cursor_advance(&cc_out, todo); + outseg += todo; + outlen -= todo; + } + if (in == block) { + inseg = crypto_cursor_segbase(&cc_in); + inlen = crypto_cursor_seglen(&cc_in); + } else { + crypto_cursor_advance(&cc_in, todo); + inseg += todo; + inlen -= todo; + } + resid -= todo; + } + + if (resid > 0) { + memset(block, 0, sizeof(block)); + crypto_cursor_copydata(&cc_in, resid, block); + ChaCha20_ctr32(block, block, CHACHA_BLK_SIZE, key, counter); + crypto_cursor_copyback(&cc_out, resid, block); + } + + explicit_bzero(block, sizeof(block)); + explicit_bzero(counter, sizeof(counter)); + explicit_bzero(key, sizeof(key)); + return (0); +} diff --git a/sys/modules/ossl/Makefile b/sys/modules/ossl/Makefile index 2ddebefebd1a..dfd82dcf6e1f 100644 --- a/sys/modules/ossl/Makefile +++ b/sys/modules/ossl/Makefile @@ -8,6 +8,7 @@ SRCS= bus_if.h \ cryptodev_if.h \ device_if.h \ ossl.c \ + ossl_chacha20.c \ ossl_poly1305.c \ ossl_sha1.c \ ossl_sha256.c \ @@ -15,6 +16,7 @@ SRCS= bus_if.h \ ${SRCS.${MACHINE_CPUARCH}} SRCS.aarch64= \ + chacha-armv8.S \ poly1305-armv8.S \ sha1-armv8.S \ sha256-armv8.S \ @@ -22,6 +24,7 @@ SRCS.aarch64= \ ossl_aarch64.c SRCS.amd64= \ + chacha-x86_64.S \ poly1305-x86_64.S \ sha1-x86_64.S \ sha256-x86_64.S \ @@ -29,6 +32,7 @@ SRCS.amd64= \ ossl_x86.c SRCS.i386= \ + chacha-x86.S \ poly1305-x86.S \ sha1-586.S \ sha256-586.S \ From owner-dev-commits-src-main@freebsd.org Wed Mar 3 23:21:33 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A60DA554929; Wed, 3 Mar 2021 23:21:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DrVPR0QCDz3kxD; Wed, 3 Mar 2021 23:21:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B632E12A2A; Wed, 3 Mar 2021 23:21:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 123NLRaX093570; Wed, 3 Mar 2021 23:21:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 123NLRW3093569; Wed, 3 Mar 2021 23:21:27 GMT (envelope-from git) Date: Wed, 3 Mar 2021 23:21:27 GMT Message-Id: <202103032321.123NLRW3093569@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 78991a93eb9d - main - ossl: Add support for the ChaCha20 + Poly1305 AEAD cipher from RFC 8439 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 78991a93eb9dd3074a3fc19b88a7c3e34e1ec703 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 23:21:33 -0000 The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=78991a93eb9dd3074a3fc19b88a7c3e34e1ec703 commit 78991a93eb9dd3074a3fc19b88a7c3e34e1ec703 Author: John Baldwin AuthorDate: 2021-03-03 23:17:51 +0000 Commit: John Baldwin CommitDate: 2021-03-03 23:20:57 +0000 ossl: Add support for the ChaCha20 + Poly1305 AEAD cipher from RFC 8439 Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D28757 --- share/man/man4/ossl.4 | 2 + sys/crypto/openssl/ossl.c | 14 ++ sys/crypto/openssl/ossl.h | 4 + sys/crypto/openssl/ossl_chacha20.c | 306 +++++++++++++++++++++++++++++++++++++ sys/crypto/openssl/ossl_poly1305.c | 8 +- sys/crypto/openssl/ossl_poly1305.h | 5 + 6 files changed, 335 insertions(+), 4 deletions(-) diff --git a/share/man/man4/ossl.4 b/share/man/man4/ossl.4 index 2aa4b69eda31..5929e46e9fe3 100644 --- a/share/man/man4/ossl.4 +++ b/share/man/man4/ossl.4 @@ -76,6 +76,8 @@ driver includes support for the following algorithms: .It ChaCha20 .It +ChaCha20-Poly1305 (RFC 8439) +.It Poly1305 .It SHA1 diff --git a/sys/crypto/openssl/ossl.c b/sys/crypto/openssl/ossl.c index 0c863429939c..ad9b93dd960d 100644 --- a/sys/crypto/openssl/ossl.c +++ b/sys/crypto/openssl/ossl.c @@ -165,6 +165,14 @@ ossl_probesession(device_t dev, const struct crypto_session_params *csp) return (EINVAL); } break; + case CSP_MODE_AEAD: + switch (csp->csp_cipher_alg) { + case CRYPTO_CHACHA20_POLY1305: + break; + default: + return (EINVAL); + } + break; default: return (EINVAL); } @@ -314,6 +322,12 @@ ossl_process(device_t dev, struct cryptop *crp, int hint) case CSP_MODE_CIPHER: error = ossl_chacha20(crp, csp); break; + case CSP_MODE_AEAD: + if (CRYPTO_OP_IS_ENCRYPT(crp->crp_op)) + error = ossl_chacha20_poly1305_encrypt(crp, csp); + else + error = ossl_chacha20_poly1305_decrypt(crp, csp); + break; default: __assert_unreachable(); } diff --git a/sys/crypto/openssl/ossl.h b/sys/crypto/openssl/ossl.h index b7c681d0fb1d..11793dca037a 100644 --- a/sys/crypto/openssl/ossl.h +++ b/sys/crypto/openssl/ossl.h @@ -39,6 +39,10 @@ struct crypto_session_params; int ossl_chacha20(struct cryptop *crp, const struct crypto_session_params *csp); +int ossl_chacha20_poly1305_decrypt(struct cryptop *crp, + const struct crypto_session_params *csp); +int ossl_chacha20_poly1305_encrypt(struct cryptop *crp, + const struct crypto_session_params *csp); void ossl_cpuid(void); /* Needs to be big enough to hold any hash context. */ diff --git a/sys/crypto/openssl/ossl_chacha20.c b/sys/crypto/openssl/ossl_chacha20.c index 70a0a5718dbd..a2bfb52cacd6 100644 --- a/sys/crypto/openssl/ossl_chacha20.c +++ b/sys/crypto/openssl/ossl_chacha20.c @@ -37,6 +37,7 @@ #include #include +#include int ossl_chacha20(struct cryptop *crp, const struct crypto_session_params *csp) @@ -139,3 +140,308 @@ ossl_chacha20(struct cryptop *crp, const struct crypto_session_params *csp) explicit_bzero(key, sizeof(key)); return (0); } + +int +ossl_chacha20_poly1305_encrypt(struct cryptop *crp, + const struct crypto_session_params *csp) +{ + _Alignas(8) unsigned int key[CHACHA_KEY_SIZE / 4]; + unsigned int counter[CHACHA_CTR_SIZE / 4]; + _Alignas(8) unsigned char block[CHACHA_BLK_SIZE]; + unsigned char tag[POLY1305_HASH_LEN]; + POLY1305 auth_ctx; + struct crypto_buffer_cursor cc_in, cc_out; + const unsigned char *in, *inseg, *cipher_key; + unsigned char *out, *outseg; + size_t resid, todo, inlen, outlen; + uint32_t next_counter; + u_int i; + + if (crp->crp_cipher_key != NULL) + cipher_key = crp->crp_cipher_key; + else + cipher_key = csp->csp_cipher_key; + for (i = 0; i < nitems(key); i++) + key[i] = CHACHA_U8TOU32(cipher_key + i * 4); + + crypto_read_iv(crp, counter + 1); + for (i = 1; i < nitems(counter); i++) + counter[i] = le32toh(counter[i]); + + /* Block 0 is used to generate the poly1305 key. */ + counter[0] = 0; + + memset(block, 0, sizeof(block)); + ChaCha20_ctr32(block, block, sizeof(block), key, counter); + Poly1305_Init(&auth_ctx, block); + + /* MAC the AAD. */ + if (crp->crp_aad != NULL) + Poly1305_Update(&auth_ctx, crp->crp_aad, crp->crp_aad_length); + else + crypto_apply(crp, crp->crp_aad_start, crp->crp_aad_length, + ossl_poly1305_update, &auth_ctx); + if (crp->crp_aad_length % 16 != 0) { + /* padding1 */ + memset(block, 0, 16); + Poly1305_Update(&auth_ctx, block, + 16 - crp->crp_aad_length % 16); + } + + /* Encryption starts with block 1. */ + counter[0] = 1; + + /* Do encryption with MAC */ + resid = crp->crp_payload_length; + crypto_cursor_init(&cc_in, &crp->crp_buf); + crypto_cursor_advance(&cc_in, crp->crp_payload_start); + inseg = crypto_cursor_segbase(&cc_in); + inlen = crypto_cursor_seglen(&cc_in); + if (CRYPTO_HAS_OUTPUT_BUFFER(crp)) { + crypto_cursor_init(&cc_out, &crp->crp_obuf); + crypto_cursor_advance(&cc_out, crp->crp_payload_output_start); + } else + cc_out = cc_in; + outseg = crypto_cursor_segbase(&cc_out); + outlen = crypto_cursor_seglen(&cc_out); + while (resid >= CHACHA_BLK_SIZE) { + if (inlen < CHACHA_BLK_SIZE) { + crypto_cursor_copydata(&cc_in, CHACHA_BLK_SIZE, block); + in = block; + inlen = CHACHA_BLK_SIZE; + } else + in = inseg; + if (outlen < CHACHA_BLK_SIZE) { + out = block; + outlen = CHACHA_BLK_SIZE; + } else + out = outseg; + + /* Figure out how many blocks we can encrypt/decrypt at once. */ + todo = rounddown(MIN(inlen, outlen), CHACHA_BLK_SIZE); + +#ifdef __LP64__ + /* ChaCha20_ctr32() assumes length is <= 4GB. */ + todo = (uint32_t)todo; +#endif + + /* Truncate if the 32-bit counter would roll over. */ + next_counter = counter[0] + todo / CHACHA_BLK_SIZE; + if (next_counter < counter[0]) { + todo -= next_counter * CHACHA_BLK_SIZE; + next_counter = 0; + } + + ChaCha20_ctr32(out, in, todo, key, counter); + Poly1305_Update(&auth_ctx, out, todo); + + counter[0] = next_counter; + if (counter[0] == 0) + counter[1]++; + + if (out == block) { + crypto_cursor_copyback(&cc_out, CHACHA_BLK_SIZE, block); + outseg = crypto_cursor_segbase(&cc_out); + outlen = crypto_cursor_seglen(&cc_out); + } else { + crypto_cursor_advance(&cc_out, todo); + outseg += todo; + outlen -= todo; + } + if (in == block) { + inseg = crypto_cursor_segbase(&cc_in); + inlen = crypto_cursor_seglen(&cc_in); + } else { + crypto_cursor_advance(&cc_in, todo); + inseg += todo; + inlen -= todo; + } + resid -= todo; + } + + if (resid > 0) { + memset(block, 0, sizeof(block)); + crypto_cursor_copydata(&cc_in, resid, block); + ChaCha20_ctr32(block, block, CHACHA_BLK_SIZE, key, counter); + crypto_cursor_copyback(&cc_out, resid, block); + + /* padding2 */ + todo = roundup2(resid, 16); + memset(block + resid, 0, todo - resid); + Poly1305_Update(&auth_ctx, block, todo); + } + + /* lengths */ + le64enc(block, crp->crp_aad_length); + le64enc(block + 8, crp->crp_payload_length); + Poly1305_Update(&auth_ctx, block, sizeof(uint64_t) * 2); + + Poly1305_Final(&auth_ctx, tag); + crypto_copyback(crp, crp->crp_digest_start, csp->csp_auth_mlen == 0 ? + POLY1305_HASH_LEN : csp->csp_auth_mlen, tag); + + explicit_bzero(&auth_ctx, sizeof(auth_ctx)); + explicit_bzero(tag, sizeof(tag)); + explicit_bzero(block, sizeof(block)); + explicit_bzero(counter, sizeof(counter)); + explicit_bzero(key, sizeof(key)); + return (0); +} + + +int +ossl_chacha20_poly1305_decrypt(struct cryptop *crp, + const struct crypto_session_params *csp) +{ + _Alignas(8) unsigned int key[CHACHA_KEY_SIZE / 4]; + unsigned int counter[CHACHA_CTR_SIZE / 4]; + _Alignas(8) unsigned char block[CHACHA_BLK_SIZE]; + unsigned char tag[POLY1305_HASH_LEN], tag2[POLY1305_HASH_LEN]; + struct poly1305_context auth_ctx; + struct crypto_buffer_cursor cc_in, cc_out; + const unsigned char *in, *inseg, *cipher_key; + unsigned char *out, *outseg; + size_t resid, todo, inlen, outlen; + uint32_t next_counter; + int error; + u_int i, mlen; + + if (crp->crp_cipher_key != NULL) + cipher_key = crp->crp_cipher_key; + else + cipher_key = csp->csp_cipher_key; + for (i = 0; i < nitems(key); i++) + key[i] = CHACHA_U8TOU32(cipher_key + i * 4); + + crypto_read_iv(crp, counter + 1); + for (i = 1; i < nitems(counter); i++) + counter[i] = le32toh(counter[i]); + + /* Block 0 is used to generate the poly1305 key. */ + counter[0] = 0; + + memset(block, 0, sizeof(block)); + ChaCha20_ctr32(block, block, sizeof(block), key, counter); + Poly1305_Init(&auth_ctx, block); + + /* MAC the AAD. */ + if (crp->crp_aad != NULL) + Poly1305_Update(&auth_ctx, crp->crp_aad, crp->crp_aad_length); + else + crypto_apply(crp, crp->crp_aad_start, crp->crp_aad_length, + ossl_poly1305_update, &auth_ctx); + if (crp->crp_aad_length % 16 != 0) { + /* padding1 */ + memset(block, 0, 16); + Poly1305_Update(&auth_ctx, block, + 16 - crp->crp_aad_length % 16); + } + + /* Mac the ciphertext. */ + crypto_apply(crp, crp->crp_payload_start, crp->crp_payload_length, + ossl_poly1305_update, &auth_ctx); + if (crp->crp_payload_length % 16 != 0) { + /* padding2 */ + memset(block, 0, 16); + Poly1305_Update(&auth_ctx, block, + 16 - crp->crp_payload_length % 16); + } + + /* lengths */ + le64enc(block, crp->crp_aad_length); + le64enc(block + 8, crp->crp_payload_length); + Poly1305_Update(&auth_ctx, block, sizeof(uint64_t) * 2); + + Poly1305_Final(&auth_ctx, tag); + mlen = csp->csp_auth_mlen == 0 ? POLY1305_HASH_LEN : csp->csp_auth_mlen; + crypto_copydata(crp, crp->crp_digest_start, mlen, tag2); + if (timingsafe_bcmp(tag, tag2, mlen) != 0) { + error = EBADMSG; + goto out; + } + + /* Decryption starts with block 1. */ + counter[0] = 1; + + resid = crp->crp_payload_length; + crypto_cursor_init(&cc_in, &crp->crp_buf); + crypto_cursor_advance(&cc_in, crp->crp_payload_start); + inseg = crypto_cursor_segbase(&cc_in); + inlen = crypto_cursor_seglen(&cc_in); + if (CRYPTO_HAS_OUTPUT_BUFFER(crp)) { + crypto_cursor_init(&cc_out, &crp->crp_obuf); + crypto_cursor_advance(&cc_out, crp->crp_payload_output_start); + } else + cc_out = cc_in; + outseg = crypto_cursor_segbase(&cc_out); + outlen = crypto_cursor_seglen(&cc_out); + while (resid >= CHACHA_BLK_SIZE) { + if (inlen < CHACHA_BLK_SIZE) { + crypto_cursor_copydata(&cc_in, CHACHA_BLK_SIZE, block); + in = block; + inlen = CHACHA_BLK_SIZE; + } else + in = inseg; + if (outlen < CHACHA_BLK_SIZE) { + out = block; + outlen = CHACHA_BLK_SIZE; + } else + out = outseg; + + /* Figure out how many blocks we can encrypt/decrypt at once. */ + todo = rounddown(MIN(inlen, outlen), CHACHA_BLK_SIZE); + +#ifdef __LP64__ + /* ChaCha20_ctr32() assumes length is <= 4GB. */ + todo = (uint32_t)todo; +#endif + + /* Truncate if the 32-bit counter would roll over. */ + next_counter = counter[0] + todo / CHACHA_BLK_SIZE; + if (next_counter < counter[0]) { + todo -= next_counter * CHACHA_BLK_SIZE; + next_counter = 0; + } + + ChaCha20_ctr32(out, in, todo, key, counter); + + counter[0] = next_counter; + if (counter[0] == 0) + counter[1]++; + + if (out == block) { + crypto_cursor_copyback(&cc_out, CHACHA_BLK_SIZE, block); + outseg = crypto_cursor_segbase(&cc_out); + outlen = crypto_cursor_seglen(&cc_out); + } else { + crypto_cursor_advance(&cc_out, todo); + outseg += todo; + outlen -= todo; + } + if (in == block) { + inseg = crypto_cursor_segbase(&cc_in); + inlen = crypto_cursor_seglen(&cc_in); + } else { + crypto_cursor_advance(&cc_in, todo); + inseg += todo; + inlen -= todo; + } + resid -= todo; + } + + if (resid > 0) { + memset(block, 0, sizeof(block)); + crypto_cursor_copydata(&cc_in, resid, block); + ChaCha20_ctr32(block, block, CHACHA_BLK_SIZE, key, counter); + crypto_cursor_copyback(&cc_out, resid, block); + } + + error = 0; +out: + explicit_bzero(&auth_ctx, sizeof(auth_ctx)); + explicit_bzero(tag, sizeof(tag)); + explicit_bzero(block, sizeof(block)); + explicit_bzero(counter, sizeof(counter)); + explicit_bzero(key, sizeof(key)); + return (error); +} diff --git a/sys/crypto/openssl/ossl_poly1305.c b/sys/crypto/openssl/ossl_poly1305.c index 8f8c5bc4b6e7..9d08e84ae5bf 100644 --- a/sys/crypto/openssl/ossl_poly1305.c +++ b/sys/crypto/openssl/ossl_poly1305.c @@ -46,7 +46,7 @@ void poly1305_blocks(void *ctx, const unsigned char *inp, size_t len, void poly1305_emit(void *ctx, unsigned char mac[16], const unsigned int nonce[4]); -static void Poly1305_Init(POLY1305 *ctx, const unsigned char key[32]) +void Poly1305_Init(POLY1305 *ctx, const unsigned char key[32]) { ctx->nonce[0] = U8TOU32(&key[16]); ctx->nonce[1] = U8TOU32(&key[20]); @@ -77,7 +77,7 @@ static void Poly1305_Init(POLY1305 *ctx, const unsigned char key[32]) # define poly1305_emit (*poly1305_emit_p) #endif -static void Poly1305_Update(POLY1305 *ctx, const unsigned char *inp, size_t len) +void Poly1305_Update(POLY1305 *ctx, const unsigned char *inp, size_t len) { #ifdef POLY1305_ASM /* @@ -119,7 +119,7 @@ static void Poly1305_Update(POLY1305 *ctx, const unsigned char *inp, size_t len) ctx->num = rem; } -static void Poly1305_Final(POLY1305 *ctx, unsigned char mac[16]) +void Poly1305_Final(POLY1305 *ctx, unsigned char mac[16]) { #ifdef POLY1305_ASM poly1305_blocks_f poly1305_blocks_p = ctx->func.blocks; @@ -152,7 +152,7 @@ ossl_poly1305_setkey(void *vctx, const uint8_t *key, u_int klen) Poly1305_Init(vctx, key); } -static int +int ossl_poly1305_update(void *vctx, const void *buf, u_int len) { Poly1305_Update(vctx, buf, len); diff --git a/sys/crypto/openssl/ossl_poly1305.h b/sys/crypto/openssl/ossl_poly1305.h index d1b2db6d5cba..d0811e0e3f06 100644 --- a/sys/crypto/openssl/ossl_poly1305.h +++ b/sys/crypto/openssl/ossl_poly1305.h @@ -33,3 +33,8 @@ struct poly1305_context { poly1305_emit_f emit; } func; }; + +int ossl_poly1305_update(void *vctx, const void *buf, u_int len); +void Poly1305_Init(POLY1305 *ctx, const unsigned char key[32]); +void Poly1305_Update(POLY1305 *ctx, const unsigned char *inp, size_t len); +void Poly1305_Final(POLY1305 *ctx, unsigned char mac[16]); From owner-dev-commits-src-main@freebsd.org Wed Mar 3 23:36:00 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7DD9E555084; Wed, 3 Mar 2021 23:36:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DrVk838jZz3mQ2; Wed, 3 Mar 2021 23:36:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5A8E712C1A; Wed, 3 Mar 2021 23:36:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 123Na02L010968; Wed, 3 Mar 2021 23:36:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 123Na06i010967; Wed, 3 Mar 2021 23:36:00 GMT (envelope-from git) Date: Wed, 3 Mar 2021 23:36:00 GMT Message-Id: <202103032336.123Na06i010967@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 0dcde5cc1274 - main - growfs: allow operation on RW-mounted filesystems MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0dcde5cc12744e5188300711a8829e5e6a9cd0de Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 23:36:00 -0000 The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=0dcde5cc12744e5188300711a8829e5e6a9cd0de commit 0dcde5cc12744e5188300711a8829e5e6a9cd0de Author: Ed Maste AuthorDate: 2021-03-02 22:35:48 +0000 Commit: Ed Maste CommitDate: 2021-03-03 23:35:21 +0000 growfs: allow operation on RW-mounted filesystems growfs supports growing mounted filesystems (writes are temporarily suspended while the grow happens). Drop the check for fs_clean == 0 to restore this case. Leave fs_flags check for FS_UNCLEAN or FS_NEEDSFSCK which represent the state of the filesystem when it was mounted, and fsck should be run first if they are set. PR: 253754 Reviewed by: mckusick MFC after: 3 days Fixes: 6eb925f8450f ("Filesystem utilities that modify the...") Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D29021 --- sbin/growfs/growfs.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sbin/growfs/growfs.c b/sbin/growfs/growfs.c index d1098210f088..510192dada0b 100644 --- a/sbin/growfs/growfs.c +++ b/sbin/growfs/growfs.c @@ -1461,10 +1461,9 @@ main(int argc, char **argv) } } /* - * Check for unclean filesystem. + * Check for filesystem that was unclean at mount time. */ - if (fs->fs_clean == 0 || - (fs->fs_flags & (FS_UNCLEAN | FS_NEEDSFSCK)) != 0) + if ((fs->fs_flags & (FS_UNCLEAN | FS_NEEDSFSCK)) != 0) errx(1, "%s is not clean - run fsck.\n", *argv); memcpy(&osblock, fs, fs->fs_sbsize); free(fs); From owner-dev-commits-src-main@freebsd.org Wed Mar 3 23:45:18 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F092955525F; Wed, 3 Mar 2021 23:45:18 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DrVwt6BYgz3nDS; Wed, 3 Mar 2021 23:45:18 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: by mail-pl1-x62f.google.com with SMTP id d11so14982652plo.8; Wed, 03 Mar 2021 15:45:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:message-id:date:mime-version:user-agent:reply-to:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=N/emB/1YFsG2Bim1x0jlMiiCyVHQVS4Dqw7P70AKORk=; b=WoBPzNkcEDYARXpi7jS4lsFqZpUV0nEoY42dlVcw1yVj3EDtaAgMEwRxa2llJzf7dF +hOb0yt+P2eE4/Yr5alg55xEGpn0FteleOKPZdR6npm/G1TuKfzDbYACb2cSsreArIFF YxJ6qynE12Laov0TiHx5+G347vOIPyn6G01TUjE9rhlWISbTnLPngxAqJJE1I6rJfjNq 7Yyn8Rc2Z4HHovfY2KezzWIn975x6EFCYKdA49q3iVpoB8EFjr1K1ZY7xchfa7G932iQ BdW0djFF0qIu2gTZKED06tbCTCVRZIzDYwTSOswxGz/qmA6HJT/EADEsmIvaC+rE3Jp7 +Tew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:message-id:date:mime-version:user-agent :reply-to:subject:content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=N/emB/1YFsG2Bim1x0jlMiiCyVHQVS4Dqw7P70AKORk=; b=W/1pjryuA3h3VHabYiUABfhxdEF8bIt75t2T6Xl09AkCucrzpaHc05trQ1SvBE9yku 3X2a315CORMbRqBowxt+bvlothTtP6vFnHkWKm6z6Tavj4rKTg0HY8ZSoesuK/tFsXhG t14+V3+Pye54iCcaastZH/B/BZFYZyXYDq2qM1Y2/T9DAqwoKiq3CAZsBayrdAOUQPil wqxfaaPIWxY2oHY6wo5YViIZCJsA3tud7vF7kEhHC96KwZouh8Q5I8WBPdRMmveH7zds FhGeDFawUoePKGa0a8w6bCtMWGY8gHTHcCRhA+H/YDqnH6WZm5WLkXaQJxWYTpp/xVyy rfWw== X-Gm-Message-State: AOAM531HMYVR0RNvpMOtjGQ9RzcqGUX4C7FZkQSvxUuUAJKyFzbi7jC3 yPm8xkDT7Cu6Jy8ItiNltyIgV3SPfVU= X-Google-Smtp-Source: ABdhPJzXZBw+mavc57fSyUA0ozyvBteEIDNp43LIArXfwwmvKf/FO4fbiR2GAVSm3BcLAmogdyXxYA== X-Received: by 2002:a17:90a:1696:: with SMTP id o22mr1493447pja.0.1614815117036; Wed, 03 Mar 2021 15:45:17 -0800 (PST) Received: from localhost (167-179-159-58.a7b39f.syd.nbn.aussiebb.net. [167.179.159.58]) by smtp.gmail.com with UTF8SMTPSA id d19sm1232998pjs.55.2021.03.03.15.45.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 03 Mar 2021 15:45:16 -0800 (PST) Sender: Kubilay Kocak Message-ID: <2c9e447a-d139-fb48-d9b5-85bfae1ff30f@FreeBSD.org> Date: Thu, 4 Mar 2021 10:45:11 +1100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:88.0) Gecko/20100101 Thunderbird/88.0a1 Reply-To: koobs@FreeBSD.org Subject: Re: git: 55deb0a5f089 - main - service(8): use an environment more consistent with init(8) Content-Language: en-US To: Kyle Evans , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202103031828.123ISTI5001652@gitrepo.freebsd.org> From: Kubilay Kocak In-Reply-To: <202103031828.123ISTI5001652@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4DrVwt6BYgz3nDS X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 23:45:19 -0000 On 4/03/2021 5:28 am, Kyle Evans wrote: > The branch main has been updated by kevans: > > URL: https://cgit.FreeBSD.org/src/commit/?id=55deb0a5f089c8a27cfc1666655b93881c2b47ae > > commit 55deb0a5f089c8a27cfc1666655b93881c2b47ae > Author: Andrew Gierth > AuthorDate: 2021-03-03 18:25:11 +0000 > Commit: Kyle Evans > CommitDate: 2021-03-03 18:25:11 +0000 > > service(8): use an environment more consistent with init(8) > > init(8) sets the "daemon" login class without specifying a pw > entry (so no substitutions are done on the variables). service(8)'s > use of env -L had the effect of specifying root's pw entry, with two > effects: getpwnam and getpwuid are being called, which may not be > entirely safe depending on what nsswitch is up to and what stage of > boot we are at, and substitutions would have been done. > > Fix by teaching env(8) to allow -L -/classname to set the class > environment with no pw entry at all specified, and use it in > service(8). > > PR: 253959 Is MFC'able to stable/* or might there be backward compatibility issue? From owner-dev-commits-src-main@freebsd.org Wed Mar 3 23:52:51 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5DE295551E6; Wed, 3 Mar 2021 23:52:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DrW5b262hz3nLr; Wed, 3 Mar 2021 23:52:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3B37D13281; Wed, 3 Mar 2021 23:52:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 123Nqpie036908; Wed, 3 Mar 2021 23:52:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 123Nqptt036907; Wed, 3 Mar 2021 23:52:51 GMT (envelope-from git) Date: Wed, 3 Mar 2021 23:52:51 GMT Message-Id: <202103032352.123Nqptt036907@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jung-uk Kim Subject: git: 483c6da3a20b - main - libkvm: Refine the previous commit (645eaa2ccaed) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jkim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 483c6da3a20b2064cd655f7cb19e6b98dee677ff Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2021 23:52:51 -0000 The branch main has been updated by jkim: URL: https://cgit.FreeBSD.org/src/commit/?id=483c6da3a20b2064cd655f7cb19e6b98dee677ff commit 483c6da3a20b2064cd655f7cb19e6b98dee677ff Author: Jung-uk Kim AuthorDate: 2021-03-03 23:50:45 +0000 Commit: Jung-uk Kim CommitDate: 2021-03-03 23:50:45 +0000 libkvm: Refine the previous commit (645eaa2ccaed) Resort free()'ing memory in kvm_close() to make it easier to MFC. MFC after: 3 days --- lib/libkvm/kvm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libkvm/kvm.c b/lib/libkvm/kvm.c index 2905302f32f2..b98f2f25e619 100644 --- a/lib/libkvm/kvm.c +++ b/lib/libkvm/kvm.c @@ -297,12 +297,12 @@ kvm_close(kvm_t *kd) free((void *) kd->argspc); if (kd->argv != 0) free((void *)kd->argv); + if (kd->dpcpu_initialized != 0) + free(kd->dpcpu_off); if (kd->pt_map != NULL) free(kd->pt_map); if (kd->page_map != NULL) free(kd->page_map); - if (kd->dpcpu_initialized != 0) - free(kd->dpcpu_off); if (kd->sparse_map != MAP_FAILED) munmap(kd->sparse_map, kd->pt_sparse_size); free((void *)kd); From owner-dev-commits-src-main@freebsd.org Thu Mar 4 03:38:58 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4E2FA55FF68; Thu, 4 Mar 2021 03:38:58 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Drc6V1bTyz4ZjS; Thu, 4 Mar 2021 03:38:58 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qt1-f178.google.com (mail-qt1-f178.google.com [209.85.160.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 2477B286EF; Thu, 4 Mar 2021 03:38:58 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qt1-f178.google.com with SMTP id v64so19429469qtd.5; Wed, 03 Mar 2021 19:38:58 -0800 (PST) X-Gm-Message-State: AOAM533FFE/HVOKWIQe9R8ik8xeCeSCgzQ/N1F9RpJ6wPTOFm6C2go/b pVj3luheiAx/6/u83fqB7nGT6+KrCd1at8rieio= X-Google-Smtp-Source: ABdhPJzjikhqxAksAvydvS9msgBM+4lmV+U+O/Y2iSQ7tRoeV+tnz3tY91n2ppK/IgwYjBwn6UKFffFPQCjW9FdJobo= X-Received: by 2002:ac8:5bcb:: with SMTP id b11mr2414038qtb.310.1614829137449; Wed, 03 Mar 2021 19:38:57 -0800 (PST) MIME-Version: 1.0 References: <202103031828.123ISTI5001652@gitrepo.freebsd.org> <2c9e447a-d139-fb48-d9b5-85bfae1ff30f@FreeBSD.org> In-Reply-To: <2c9e447a-d139-fb48-d9b5-85bfae1ff30f@FreeBSD.org> From: Kyle Evans Date: Wed, 3 Mar 2021 21:38:46 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 55deb0a5f089 - main - service(8): use an environment more consistent with init(8) To: Kubilay Kocak Cc: src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2021 03:38:58 -0000 On Wed, Mar 3, 2021 at 5:45 PM Kubilay Kocak wrote: > > On 4/03/2021 5:28 am, Kyle Evans wrote: > > The branch main has been updated by kevans: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=55deb0a5f089c8a27cfc1666655b93881c2b47ae > > > > commit 55deb0a5f089c8a27cfc1666655b93881c2b47ae > > Author: Andrew Gierth > > AuthorDate: 2021-03-03 18:25:11 +0000 > > Commit: Kyle Evans > > CommitDate: 2021-03-03 18:25:11 +0000 > > > > service(8): use an environment more consistent with init(8) > > > > init(8) sets the "daemon" login class without specifying a pw > > entry (so no substitutions are done on the variables). service(8)'s > > use of env -L had the effect of specifying root's pw entry, with two > > effects: getpwnam and getpwuid are being called, which may not be > > entirely safe depending on what nsswitch is up to and what stage of > > boot we are at, and substitutions would have been done. > > > > Fix by teaching env(8) to allow -L -/classname to set the class > > environment with no pw entry at all specified, and use it in > > service(8). > > > > PR: 253959 > > Is MFC'able to stable/* or might there be backward compatibility issue? Indeed, I'll be MFC'ing this in some ~days. Thanks, Kyle Evans From owner-dev-commits-src-main@freebsd.org Thu Mar 4 07:34:29 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 190E456457B; Thu, 4 Mar 2021 07:34:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DrjLF099mz4mMB; Thu, 4 Mar 2021 07:34:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EC84018E7B; Thu, 4 Mar 2021 07:34:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1247YSjb045980; Thu, 4 Mar 2021 07:34:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1247YSXV045979; Thu, 4 Mar 2021 07:34:28 GMT (envelope-from git) Date: Thu, 4 Mar 2021 07:34:28 GMT Message-Id: <202103040734.1247YSXV045979@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Oleksandr Tymoshenko Subject: git: 37cd6c20dbcf - main - cron: consume blanks in system crontabs before options MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gonzo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 37cd6c20dbcf251e38d6dfb9d3e02022941f6fc7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2021 07:34:29 -0000 The branch main has been updated by gonzo: URL: https://cgit.FreeBSD.org/src/commit/?id=37cd6c20dbcf251e38d6dfb9d3e02022941f6fc7 commit 37cd6c20dbcf251e38d6dfb9d3e02022941f6fc7 Author: Oleksandr Tymoshenko AuthorDate: 2021-03-04 07:23:31 +0000 Commit: Oleksandr Tymoshenko CommitDate: 2021-03-04 07:23:31 +0000 cron: consume blanks in system crontabs before options On system crontabs, multiple blanks are not being consumed after reading the username. This change adds blank consumption before parsing any -[qn] options. Without this change, an entry like: * * * * * username -n true # Two spaces between username and option. will fail, as the shell will try to execute (' -n true'), while an entry like: * * * * * username -n true # One space between username and option. works as expected (executes 'true'). For user crontabs, this is not an issue as the preceding (day of week or @shortcut) processing consumes any leading whitespace. PR: 253699 Submitted by: Eric A. Borisch MFC after: 1 week --- usr.sbin/cron/lib/entry.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/usr.sbin/cron/lib/entry.c b/usr.sbin/cron/lib/entry.c index 66ead885bea8..2693c9c8d07a 100644 --- a/usr.sbin/cron/lib/entry.c +++ b/usr.sbin/cron/lib/entry.c @@ -315,6 +315,9 @@ load_entry(file, error_func, pw, envp) goto eof; } + /* need to have consumed blanks when checking options below */ + Skip_Blanks(ch, file) + unget_char(ch, file); #ifdef LOGIN_CAP if ((s = strrchr(username, '/')) != NULL) { *s = '\0'; From owner-dev-commits-src-main@freebsd.org Thu Mar 4 08:44:09 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5986956706E; Thu, 4 Mar 2021 08:44:09 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Drktd22LZz4qQ9; Thu, 4 Mar 2021 08:44:09 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from [192.168.1.10] (unknown [98.42.164.217]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: rpokala) by smtp.freebsd.org (Postfix) with ESMTPSA id AAFCC2AA9E; Thu, 4 Mar 2021 08:44:08 +0000 (UTC) (envelope-from rpokala@freebsd.org) User-Agent: Microsoft-MacOutlook/16.45.21011103 Date: Thu, 04 Mar 2021 00:44:05 -0800 Subject: Re: 8a272653d9fb - main - stress2: Initial import From: Ravi Pokala To: Peter Holm , , , Message-ID: Thread-Topic: 8a272653d9fb - main - stress2: Initial import References: <202103031412.123EC3oa069178@gitrepo.freebsd.org> In-Reply-To: <202103031412.123EC3oa069178@gitrepo.freebsd.org> Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: 7bit X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2021 08:44:09 -0000 -----Original Message----- From: on behalf of Peter Holm Date: 2021-03-03, Wednesday at 06:12 To: , , Subject: git: 8a272653d9fb - main - stress2: Initial import The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=8a272653d9fbd9fc37691c9aad6a05089b4ecb4d commit 8a272653d9fbd9fc37691c9aad6a05089b4ecb4d Author: Peter Holm AuthorDate: 2021-03-03 12:56:56 +0000 Commit: Peter Holm CommitDate: 2021-03-03 14:11:40 +0000 stress2: Initial import Ooo! The (in)famous "stress2" suite is finally in the main src tree! Thanks, Peter! -Ravi (rpokala@) From owner-dev-commits-src-main@freebsd.org Thu Mar 4 12:24:32 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A1AFA56FC21; Thu, 4 Mar 2021 12:24:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Drqmw4Bhjz3PyF; Thu, 4 Mar 2021 12:24:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7EEAF1D0AD; Thu, 4 Mar 2021 12:24:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 124COWpE032291; Thu, 4 Mar 2021 12:24:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 124COWqB032290; Thu, 4 Mar 2021 12:24:32 GMT (envelope-from git) Date: Thu, 4 Mar 2021 12:24:32 GMT Message-Id: <202103041224.124COWqB032290@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Chris Rees Subject: git: 5ac70383c8b3 - main - elftoolchain: stop leaving tempfiles on error MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: crees X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5ac70383c8b32eeec80426e837960977971c7c2b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2021 12:24:32 -0000 The branch main has been updated by crees (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=5ac70383c8b32eeec80426e837960977971c7c2b commit 5ac70383c8b32eeec80426e837960977971c7c2b Author: Chris Rees AuthorDate: 2021-02-15 11:37:06 +0000 Commit: Chris Rees CommitDate: 2021-03-04 12:24:07 +0000 elftoolchain: stop leaving tempfiles on error Temporary files were not cleaned up, resulting in $TMPDIR or even the current directory becoming littered with ecp.* files. This happened with error and even sometimes on success! Approved by: dim MFC after: 4 weeks Accepted upstream: https://sourceforge.net/p/elftoolchain/code/3918/ Differential Revision: https://reviews.freebsd.org/D28651 --- contrib/elftoolchain/elfcopy/archive.c | 31 ++++++++++---- contrib/elftoolchain/elfcopy/elfcopy.h | 1 + contrib/elftoolchain/elfcopy/main.c | 77 +++++++++++++++++++++++++++------- 3 files changed, 86 insertions(+), 23 deletions(-) diff --git a/contrib/elftoolchain/elfcopy/archive.c b/contrib/elftoolchain/elfcopy/archive.c index 9e23b831fdca..e57caad58e35 100644 --- a/contrib/elftoolchain/elfcopy/archive.c +++ b/contrib/elftoolchain/elfcopy/archive.c @@ -69,9 +69,11 @@ process_ar_obj(struct elfcopy *ecp, struct ar_obj *obj) /* Output to a temporary file. */ create_tempfile(NULL, &tempfile, &fd); - if ((ecp->eout = elf_begin(fd, ELF_C_WRITE, NULL)) == NULL) + if ((ecp->eout = elf_begin(fd, ELF_C_WRITE, NULL)) == NULL) { + cleanup_tempfile(tempfile); errx(EXIT_FAILURE, "elf_begin() failed: %s", elf_errmsg(-1)); + } elf_flagelf(ecp->eout, ELF_C_SET, ELF_F_LAYOUT); create_elf(ecp); elf_end(ecp->ein); @@ -80,27 +82,40 @@ process_ar_obj(struct elfcopy *ecp, struct ar_obj *obj) obj->buf = NULL; /* Extract archive symbols. */ - if (lseek(fd, 0, SEEK_SET) < 0) + if (lseek(fd, 0, SEEK_SET) < 0) { + cleanup_tempfile(tempfile); err(EXIT_FAILURE, "lseek failed for '%s'", tempfile); - if ((ecp->eout = elf_begin(fd, ELF_C_READ, NULL)) == NULL) + } + if ((ecp->eout = elf_begin(fd, ELF_C_READ, NULL)) == NULL) { + cleanup_tempfile(tempfile); errx(EXIT_FAILURE, "elf_begin() failed: %s", elf_errmsg(-1)); + } extract_arsym(ecp); elf_end(ecp->eout); - if (fstat(fd, &sb) == -1) + if (fstat(fd, &sb) == -1) { + cleanup_tempfile(tempfile); err(EXIT_FAILURE, "fstat %s failed", tempfile); - if (lseek(fd, 0, SEEK_SET) < 0) + } + if (lseek(fd, 0, SEEK_SET) < 0) { + cleanup_tempfile(tempfile); err(EXIT_FAILURE, "lseek %s failed", tempfile); + } obj->size = sb.st_size; - if ((obj->maddr = malloc(obj->size)) == NULL) + if ((obj->maddr = malloc(obj->size)) == NULL) { + cleanup_tempfile(tempfile); err(EXIT_FAILURE, "memory allocation failed for '%s'", tempfile); - if ((size_t) read(fd, obj->maddr, obj->size) != obj->size) + } + if ((size_t) read(fd, obj->maddr, obj->size) != obj->size) { + cleanup_tempfile(tempfile); err(EXIT_FAILURE, "read failed for '%s'", tempfile); - if (unlink(tempfile)) + } + if (cleanup_tempfile(tempfile) < 0) err(EXIT_FAILURE, "unlink %s failed", tempfile); free(tempfile); + tempfile = NULL; close(fd); if (strlen(obj->name) > _MAXNAMELEN_SVR4) add_to_ar_str_table(ecp, obj->name); diff --git a/contrib/elftoolchain/elfcopy/elfcopy.h b/contrib/elftoolchain/elfcopy/elfcopy.h index b8845a574428..17d8b803156d 100644 --- a/contrib/elftoolchain/elfcopy/elfcopy.h +++ b/contrib/elftoolchain/elfcopy/elfcopy.h @@ -277,6 +277,7 @@ void add_to_symtab(struct elfcopy *_ecp, const char *_name, unsigned char _st_info, unsigned char _st_other, int _ndx_known); int add_to_inseg_list(struct elfcopy *_ecp, struct section *_sec); void adjust_addr(struct elfcopy *_ecp); +int cleanup_tempfile(char *_fn); void copy_content(struct elfcopy *_ecp); void copy_data(struct section *_s); void copy_phdr(struct elfcopy *_ecp); diff --git a/contrib/elftoolchain/elfcopy/main.c b/contrib/elftoolchain/elfcopy/main.c index c02bb296c4a3..964d3358de60 100644 --- a/contrib/elftoolchain/elfcopy/main.c +++ b/contrib/elftoolchain/elfcopy/main.c @@ -510,6 +510,27 @@ free_elf(struct elfcopy *ecp) } } +/* + * Remove a temporary file, without freeing its filename. + * + * Safe to pass NULL, will just ignore it. + */ +int +cleanup_tempfile(char *fn) +{ + int errno_save, retval; + + if (fn == NULL) + return 0; + errno_save = errno; + if ((retval = unlink(fn)) < 0) { + warn("unlink tempfile %s failed", fn); + errno = errno_save; + return retval; + } + return 0; +} + /* Create a temporary file. */ void create_tempfile(const char *src, char **fn, int *fd) @@ -656,8 +677,10 @@ create_file(struct elfcopy *ecp, const char *src, const char *dst) } #endif - if (lseek(ifd, 0, SEEK_SET) < 0) + if (lseek(ifd, 0, SEEK_SET) < 0) { + cleanup_tempfile(tempfile); err(EXIT_FAILURE, "lseek failed"); + } /* * If input object is not ELF file, convert it to an intermediate @@ -677,9 +700,12 @@ create_file(struct elfcopy *ecp, const char *src, const char *dst) ecp->oed = ELFDATA2LSB; } create_tempfile(src, &elftemp, &efd); - if ((ecp->eout = elf_begin(efd, ELF_C_WRITE, NULL)) == NULL) + if ((ecp->eout = elf_begin(efd, ELF_C_WRITE, NULL)) == NULL) { + cleanup_tempfile(elftemp); + cleanup_tempfile(tempfile); errx(EXIT_FAILURE, "elf_begin() failed: %s", elf_errmsg(-1)); + } elf_flagelf(ecp->eout, ELF_C_SET, ELF_F_LAYOUT); if (ecp->itf == ETF_BINARY) create_elf_from_binary(ecp, ifd, src); @@ -687,31 +713,45 @@ create_file(struct elfcopy *ecp, const char *src, const char *dst) create_elf_from_ihex(ecp, ifd); else if (ecp->itf == ETF_SREC) create_elf_from_srec(ecp, ifd); - else + else { + cleanup_tempfile(elftemp); + cleanup_tempfile(tempfile); errx(EXIT_FAILURE, "Internal: invalid target flavour"); + } elf_end(ecp->eout); /* Open intermediate ELF object as new input object. */ close(ifd); - if ((ifd = open(elftemp, O_RDONLY)) == -1) + if ((ifd = open(elftemp, O_RDONLY)) == -1) { + cleanup_tempfile(elftemp); + cleanup_tempfile(tempfile); err(EXIT_FAILURE, "open %s failed", src); + } close(efd); - if (unlink(elftemp) < 0) + if (cleanup_tempfile(elftemp) < 0) { + cleanup_tempfile(tempfile); err(EXIT_FAILURE, "unlink %s failed", elftemp); + } free(elftemp); + elftemp = NULL; } - if ((ecp->ein = elf_begin(ifd, ELF_C_READ, NULL)) == NULL) + if ((ecp->ein = elf_begin(ifd, ELF_C_READ, NULL)) == NULL) { + cleanup_tempfile(tempfile); errx(EXIT_FAILURE, "elf_begin() failed: %s", elf_errmsg(-1)); + } switch (elf_kind(ecp->ein)) { case ELF_K_NONE: + cleanup_tempfile(tempfile); errx(EXIT_FAILURE, "file format not recognized"); case ELF_K_ELF: - if ((ecp->eout = elf_begin(ofd, ELF_C_WRITE, NULL)) == NULL) + if ((ecp->eout = elf_begin(ofd, ELF_C_WRITE, NULL)) == NULL) { + cleanup_tempfile(tempfile); errx(EXIT_FAILURE, "elf_begin() failed: %s", elf_errmsg(-1)); + } /* elfcopy(1) manage ELF layout by itself. */ elf_flagelf(ecp->eout, ELF_C_SET, ELF_F_LAYOUT); @@ -730,21 +770,21 @@ create_file(struct elfcopy *ecp, const char *src, const char *dst) * Create (another) tempfile for binary/srec/ihex * output object. */ - if (tempfile != NULL) { - if (unlink(tempfile) < 0) - err(EXIT_FAILURE, "unlink %s failed", - tempfile); - free(tempfile); - } + if (cleanup_tempfile(tempfile) < 0) + errx(EXIT_FAILURE, "unlink %s failed", + tempfile); + free(tempfile); create_tempfile(src, &tempfile, &ofd0); /* * Rewind the file descriptor being processed. */ - if (lseek(ofd, 0, SEEK_SET) < 0) + if (lseek(ofd, 0, SEEK_SET) < 0) { + cleanup_tempfile(tempfile); err(EXIT_FAILURE, "lseek failed for the output object"); + } /* * Call flavour-specific conversion routine. @@ -765,11 +805,13 @@ create_file(struct elfcopy *ecp, const char *src, const char *dst) #if WITH_PE create_pe(ecp, ofd, ofd0); #else + cleanup_tempfile(tempfile); errx(EXIT_FAILURE, "PE/EFI support not enabled" " at compile time"); #endif break; default: + cleanup_tempfile(tempfile); errx(EXIT_FAILURE, "Internal: unsupported" " output flavour %d", ecp->oec); } @@ -784,6 +826,7 @@ create_file(struct elfcopy *ecp, const char *src, const char *dst) /* XXX: Not yet supported. */ break; default: + cleanup_tempfile(tempfile); errx(EXIT_FAILURE, "file format not supported"); } @@ -802,9 +845,13 @@ copy_done: in_place = 1; } - if (copy_from_tempfile(tempfile, dst, ofd, &tfd, in_place) < 0) + if (copy_from_tempfile(tempfile, dst, ofd, + &tfd, in_place) < 0) { + cleanup_tempfile(tempfile); err(EXIT_FAILURE, "creation of %s failed", dst); + } + /* 'tempfile' has been removed by copy_from_tempfile(). */ free(tempfile); tempfile = NULL; From owner-dev-commits-src-main@freebsd.org Thu Mar 4 12:36:58 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 90F6156FF60; Thu, 4 Mar 2021 12:36:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Drr3G3kkhz3Qfk; Thu, 4 Mar 2021 12:36:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 730E51CE64; Thu, 4 Mar 2021 12:36:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 124CawPY045690; Thu, 4 Mar 2021 12:36:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 124CawkY045689; Thu, 4 Mar 2021 12:36:58 GMT (envelope-from git) Date: Thu, 4 Mar 2021 12:36:58 GMT Message-Id: <202103041236.124CawkY045689@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Fernando Apesteguía Subject: git: 3457dbd52b22 - main - mq_open(2): Fix xref to mq_unlink(2) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fernape X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3457dbd52b22daee203ba5a5eb4faf7525f5b165 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2021 12:36:58 -0000 The branch main has been updated by fernape (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=3457dbd52b22daee203ba5a5eb4faf7525f5b165 commit 3457dbd52b22daee203ba5a5eb4faf7525f5b165 Author: Fernando Apesteguía AuthorDate: 2021-02-24 15:20:57 +0000 Commit: Fernando Apesteguía CommitDate: 2021-03-04 12:32:42 +0000 mq_open(2): Fix xref to mq_unlink(2) mq_unlink(2) was added in acab1d58befaa8f42930bd62c26558e6005e1c13 PR: 215611 Reported by: rwatson@FreeBSD.org Approved by: gbe@ (mentor) Differential Revision: https://reviews.freebsd.org/D28913 --- lib/libc/sys/mq_open.2 | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/libc/sys/mq_open.2 b/lib/libc/sys/mq_open.2 index a810ee01cc18..4f1f98e010a5 100644 --- a/lib/libc/sys/mq_open.2 +++ b/lib/libc/sys/mq_open.2 @@ -297,9 +297,9 @@ There is insufficient space for the creation of the new message queue. .Xr mq_receive 2 , .Xr mq_send 2 , .Xr mq_setattr 2 , +.Xr mq_unlink 2 , .Xr mq_timedreceive 3 , .Xr mq_timedsend 3 , -.Xr mq_unlink 3 , .Xr mqueuefs 5 .Sh STANDARDS The @@ -307,9 +307,7 @@ The system call conforms to .St -p1003.1-2004 . .Sh HISTORY -Support for -.Tn POSIX -message queues first appeared in +Support for POSIX message queues first appeared in .Fx 7.0 . .Sh BUGS This implementation places strict requirements on the value of From owner-dev-commits-src-main@freebsd.org Thu Mar 4 13:25:02 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A4054549768; Thu, 4 Mar 2021 13:25:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Drs6k3vwrz3l23; Thu, 4 Mar 2021 13:25:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 790331E018; Thu, 4 Mar 2021 13:25:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 124DP2Ic012006; Thu, 4 Mar 2021 13:25:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 124DP2WR012005; Thu, 4 Mar 2021 13:25:02 GMT (envelope-from git) Date: Thu, 4 Mar 2021 13:25:02 GMT Message-Id: <202103041325.124DP2WR012005@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Stefan Eßer Subject: git: a0d921bae9f3 - main - Remove obsolete bc library and dc test files MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: se X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a0d921bae9f3bcdb664f9737e20c0015123f11af Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2021 13:25:02 -0000 The branch main has been updated by se: URL: https://cgit.FreeBSD.org/src/commit/?id=a0d921bae9f3bcdb664f9737e20c0015123f11af commit a0d921bae9f3bcdb664f9737e20c0015123f11af Author: Stefan Eßer AuthorDate: 2021-03-04 13:21:58 +0000 Commit: Stefan Eßer CommitDate: 2021-03-04 13:24:51 +0000 Remove obsolete bc library and dc test files The new bc implementation has the library embedded into the binary and tests in tests/usr.bin/bc instead of tests/ustr.bin/dc. MFC after: 3 days --- ObsoleteFiles.inc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 5821e9f04e89..59412729ad7e 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -36,6 +36,15 @@ # xargs -n1 | sort | uniq -d; # done +# 20210304: remove old bc and dc support and test files +.if !defined(WITHOUT_GH_BC) +OLD_FILES+=usr/share/misc/bc.library +OLD_FILES+=usr/tests/usr.bin/dc/Kyuafile +OLD_FILES+=usr/tests/usr.bin/dc/bcode +OLD_FILES+=usr/tests/usr.bin/dc/inout +OLD_DIRS+=usr/tests/usr.bin/dc +.endif + # 20210302: fmtree removed OLD_FILES+=usr/sbin/fmtree OLD_FILES+=usr/share/man/man8/fmtree.8.gz From owner-dev-commits-src-main@freebsd.org Thu Mar 4 13:43:07 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1B25254A0CB; Thu, 4 Mar 2021 13:43:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DrsWb0J6Mz3mMZ; Thu, 4 Mar 2021 13:43:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F143F1E05A; Thu, 4 Mar 2021 13:43:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 124Dh64j038223; Thu, 4 Mar 2021 13:43:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 124Dh6cq038222; Thu, 4 Mar 2021 13:43:06 GMT (envelope-from git) Date: Thu, 4 Mar 2021 13:43:06 GMT Message-Id: <202103041343.124Dh6cq038222@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Glen Barber Subject: git: fa04db476201 - main - release: fix VMSIZE following 1ca8842f3ad9 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gjb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fa04db476201c4cad5f6a5f67da8f2ef1e1cdad3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2021 13:43:07 -0000 The branch main has been updated by gjb: URL: https://cgit.FreeBSD.org/src/commit/?id=fa04db476201c4cad5f6a5f67da8f2ef1e1cdad3 commit fa04db476201c4cad5f6a5f67da8f2ef1e1cdad3 Author: Glen Barber AuthorDate: 2021-03-04 13:39:43 +0000 Commit: Glen Barber CommitDate: 2021-03-04 13:43:02 +0000 release: fix VMSIZE following 1ca8842f3ad9 truncate(1) is not case-sensitive with regard to setting the size of a file. makefs(8), however, does not honor upper-case values. Update release-specific files and the release(7) manual page to reflect this. MFC with: 1ca8842f3ad9 Submitted by: ehem_freebsd_m5p.com (original) Differential Review: https://reviews.freebsd.org/D28979 Sponsored by: Rubicon Communications, LLC ("Netgate") --- release/Makefile.vm | 4 ++-- release/release.conf.sample | 4 ++-- release/tools/basic-ci.conf | 2 +- release/tools/ec2.conf | 2 +- release/tools/gce.conf | 2 +- release/tools/vagrant.conf | 2 +- share/man/man7/release.7 | 6 +++--- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/release/Makefile.vm b/release/Makefile.vm index d075fa1fb29c..2240a1e5fc57 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -7,8 +7,8 @@ VMTARGETS= vm-image VMFORMATS?= vhd vmdk qcow2 raw -VMSIZE?= 4096M -SWAPSIZE?= 1G +VMSIZE?= 4096m +SWAPSIZE?= 1g VMBASE?= vm VHD_DESC= Azure, VirtualPC, Hyper-V, Xen disk image diff --git a/release/release.conf.sample b/release/release.conf.sample index 4de068750228..bd7be15b0227 100644 --- a/release/release.conf.sample +++ b/release/release.conf.sample @@ -99,8 +99,8 @@ PORTBRANCH="main" ## If WITH_VMIMAGES is set to a non-empty value, this is the size of the ## virtual machine disk filesystem. Valid size values are described in -## the truncate(1) manual page. -#VMSIZE="20G" +## the makefs(8) manual page. +#VMSIZE="20g" ## If WITH_VMIMAGES is set to a non-empty value, this is a list of disk ## image formats to create. Valid values are listed in the mkimg(1) diff --git a/release/tools/basic-ci.conf b/release/tools/basic-ci.conf index 19bb2454f78d..9dc05c57d0f4 100644 --- a/release/tools/basic-ci.conf +++ b/release/tools/basic-ci.conf @@ -4,7 +4,7 @@ # # Should be enough for base image, image can be resized in needed -export VMSIZE=5G +export VMSIZE=5g # Set to a list of third-party software to enable in rc.conf(5). export VM_RC_LIST="sshd growfs" diff --git a/release/tools/ec2.conf b/release/tools/ec2.conf index e726ccadc048..bfda9052421f 100644 --- a/release/tools/ec2.conf +++ b/release/tools/ec2.conf @@ -24,7 +24,7 @@ export VM_RC_LIST="ec2_configinit ec2_fetchkey ec2_loghostkey firstboot_freebsd_ # Note that if this is set to G, we will end up with an GB disk # image since VMSIZE is the size of the UFS partition, not the disk which # it resides within. -export VMSIZE=5000M +export VMSIZE=5000m # No swap space; the ec2_ephemeralswap rc.d script will allocate swap # space on EC2 ephemeral disks. (If they exist -- the T2 low-cost instances diff --git a/release/tools/gce.conf b/release/tools/gce.conf index f156a5bb93eb..113784a7643e 100644 --- a/release/tools/gce.conf +++ b/release/tools/gce.conf @@ -4,7 +4,7 @@ # # The default of 3GB is too small for GCE, so override the size here. -export VMSIZE=20G +export VMSIZE=20g # Set to a list of packages to install. export VM_EXTRA_PACKAGES="firstboot-freebsd-update firstboot-pkgs \ diff --git a/release/tools/vagrant.conf b/release/tools/vagrant.conf index c683cf7a07d2..05e7052d46c4 100644 --- a/release/tools/vagrant.conf +++ b/release/tools/vagrant.conf @@ -4,7 +4,7 @@ # # The default of 3GB is too small for Vagrant, so override the size here. -export VMSIZE=8G +export VMSIZE=8g # Packages to install into the image we're creating. This is a deliberately # minimalist set, providing only the packages necessary to bootstrap. diff --git a/share/man/man7/release.7 b/share/man/man7/release.7 index 82c1b83fe3a4..a474de83ec93 100644 --- a/share/man/man7/release.7 +++ b/share/man/man7/release.7 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 2, 2021 +.Dd March 4, 2021 .Dt RELEASE 7 .Os .Sh NAME @@ -360,9 +360,9 @@ The default value is .It Va VMSIZE Set to change the size of the virtual machine disk capacity. The default value is -.Va 20G . +.Va 20g . See -.Xr truncate 1 +.Xr makefs 8 for valid values. .Pp Virtual machine disk images are, by default, created as sparse images. From owner-dev-commits-src-main@freebsd.org Thu Mar 4 13:51:30 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2006C54A795; Thu, 4 Mar 2021 13:51:30 +0000 (UTC) (envelope-from gjb@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DrsjG0T7wz3mpw; Thu, 4 Mar 2021 13:51:30 +0000 (UTC) (envelope-from gjb@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1614865890; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=YK1gyegthIL7ghYj4Raa5zmj7FKdftJGJSJXm1aepzo=; b=W3KG1PLanpKSpViEej0Zcm3WLNj01nYw+FxDeC5g7kvYNA3ACCMp8KcqSakg+aZacvt9Kd xN5acKihHbCCA6+clUR4pK5/UBkh+W79N0a4fdDIteqlpFY4u5DIGJMvLWRhib8v/igGu0 K/lvR0gHVDMw1dZXjmN/JAKDSoe1B4V/JaWOl2c8iUug+QqADbm839NdfERMTURdPeIjhn 8fNxo4wn/Q2IX32vVaagV23gLNrnw5NrhukBnii4pqr9XZlg31DwqniXvw2Q/kYXasl4+4 tAfSGWKJZoOSCJ3RS+aUclUDCyAPD4hkho8DxbKOHR6TNZ3tFm9+Ts6A1SCdog== Received: from FreeBSD.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id 9772CDFED; Thu, 4 Mar 2021 13:51:29 +0000 (UTC) (envelope-from gjb@freebsd.org) Date: Thu, 4 Mar 2021 13:51:27 +0000 From: Glen Barber To: Nathan Whitehorn Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 1ca8842f3ad9 - main - Use makefs(8) in release VM-image generation instead of md(4) and newfs. Message-ID: <20210304135127.GA28425@FreeBSD.org> References: <202102250225.11P2PE1I011966@gitrepo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="C7zPtVaVf+AK4Oqc" Content-Disposition: inline In-Reply-To: <202102250225.11P2PE1I011966@gitrepo.freebsd.org> ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1614865890; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=YK1gyegthIL7ghYj4Raa5zmj7FKdftJGJSJXm1aepzo=; b=Kueu1m+DYq4WJnE0U2ISbCln3PIFeM1LL6mzlYkttxrdl4GiNNGznMHgS7zlDp7w496uhN i6Y8TGf6B3+poV2c1CYRXM4Q6tRXAz2kTKDguLSofoZ2+R5fSOATeZk8JS1TRkq2Z74DOF REv+KyYGZ3clIB7i5bxcH0fTo55y1gnMaU+zio1WvzP+GEmX3MPD0IRhTwtgxHOw9y77pz gjxGJ8lFd9t2CTJ7jsvKCAJoWLjm0uw+GeQEM8iZ09KmV8WGbfI1znOp0pYu/ZFebiPmlT E5zolYph+/aFyUEdNE3QdiJyf82PbxrLu30OpipQrj6zlO7lEnAHmDb2Z+YWeg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1614865890; a=rsa-sha256; cv=none; b=qh3qiU45iMQMwkWKpt/4cvzrVs5WiQlsrukR56LolRM/TTg3H2G3bXjTKzmYFbMZAjrEua VMLf8CodLSnGCj9Ko/yl9YuZTH3fTl2RW6/+5DVobitGhTeKhOUI+Woc/5e+dkwq7wR1Fc Rb1Tp1+xMVA5s4syvdD8KWcLVCvh6nnSZKE6sCXvWmWtGGeYAZytXEtRicohC6gGi2RBTp Wi3VNJNaUdYkvVCMupMydeBZcLVPwXolKLAwibVSm7N9K9J+xcH1OzkVGwgLH66PzsN4kU juZp88kVyS0lxm+9kqR1nNOcHbipwcgjKWROwSgjOSNdxxblGGGgXFZNuBS/0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2021 13:51:30 -0000 --C7zPtVaVf+AK4Oqc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Feb 25, 2021 at 02:25:14AM +0000, Nathan Whitehorn wrote: > The branch main has been updated by nwhitehorn: >=20 > URL: https://cgit.FreeBSD.org/src/commit/?id=3D1ca8842f3ad9725863c9affc04= 4d1974a51818a9 >=20 > commit 1ca8842f3ad9725863c9affc044d1974a51818a9 > Author: Nathan Whitehorn > AuthorDate: 2021-02-25 02:16:56 +0000 > Commit: Nathan Whitehorn > CommitDate: 2021-02-25 02:16:56 +0000 >=20 > Use makefs(8) in release VM-image generation instead of md(4) and new= fs. > =20 > Using makefs instead reduces the privileges needed to build VM images, > simplifies the script (no need to copy files to a fresh image at the = end), > and improves portability by allowing generation of cross-endian image= s. > As a result of the last, this patch also adds support for generation = of > powerpc64 and powerpc64le VM images. > =20 > No other changes to the output. Tested and working for both amd64 and > powerpc64 targets. > =20 > Reviewed by: gjb > Differential Revision: https://reviews.freebsd.org/D28912 If you MFC this to stable/13, please also include fa04db476201. I did not realize this will break virtual machine image builds using the in-tree tools. Glen --C7zPtVaVf+AK4Oqc Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEjRJAPC5sqwhs9k2jAxRYpUeP4pMFAmBA5d8ACgkQAxRYpUeP 4pMQkBAAhy2uLy7+R0hLRJruSdBfXBgUNW+a5gpVAwUx2UHaCRrnv4RUaLwV3ZDL TvQerfV2x7btl+5b4ZcWxLAgZ5bNvhTBbdeuGYcR1EeBqh29COKXh4lCQoJZaRxb s91D/U4By1WvH+FUu+VYjthyZnHjJXS8zx3ZXt0oJPY/9YFjwSfPRfytOUfVnTlF nxvSxd+9F4fbNskIUkH4fRNjIKu/xrnFuD+xzHN1xE8flFh8DimnMM6Zul7pPI1U iXN2VeX9MUcs6felhcuL2Z9Fgyaeb2h53KdgjUAZbTsaHfOH8wNUJDXHEf3loBxp 8ID7/oHkr+TREevq/pFR65XX2rEujydQExQ6zs5Jv2vIOEhsNVGfgyytJuVCF7M6 Yvf//yql+aBUN83hvHsO3lZmAmE7gbl8/MOzjjt5jP5hpgzfpwAU17wMXWgJHcfk 3CC94jdB7eDWts8El7GZKBHRBP0qJsYl7gin0OXwziXvibVeGBQ6R4p3xNxSrST4 Wgy7bcANqr70Xwnjau6LqpGLEShbE0zYZI2gu+YUE506i8aRZJeLbUUM6CRdrRQZ KeU5zYxjy5bLER4dur32Z/xhyvJPHWNKNf4q2HUDB837hqUdr7/hTliwPJr6C+TO 7Dmr5FVJxP3nhNZac6zXI9Y4HXz/IwraJAGsWvLN+Z26iCocq5o= =qP5M -----END PGP SIGNATURE----- --C7zPtVaVf+AK4Oqc-- From owner-dev-commits-src-main@freebsd.org Thu Mar 4 13:56:27 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9FF6454A8AD; Thu, 4 Mar 2021 13:56:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Drspz46Y9z3nSJ; Thu, 4 Mar 2021 13:56:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 802BF1E51F; Thu, 4 Mar 2021 13:56:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 124DuRXS052191; Thu, 4 Mar 2021 13:56:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 124DuRli052190; Thu, 4 Mar 2021 13:56:27 GMT (envelope-from git) Date: Thu, 4 Mar 2021 13:56:27 GMT Message-Id: <202103041356.124DuRli052190@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Fernando Apesteguía Subject: git: fc1e79740e4a - main - compress(1): warn about link handling MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fernape X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fc1e79740e4a83013aa0050fc95a991ec9c78e27 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2021 13:56:27 -0000 The branch main has been updated by fernape (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=fc1e79740e4a83013aa0050fc95a991ec9c78e27 commit fc1e79740e4a83013aa0050fc95a991ec9c78e27 Author: Fernando Apesteguía AuthorDate: 2021-02-09 09:11:22 +0000 Commit: Fernando Apesteguía CommitDate: 2021-03-04 13:52:12 +0000 compress(1): warn about link handling compress(1) handles links badly and does not provide link-handling options. Document this behavior. PR: 84271 Submitted by: garys@opusnet.com Approved by: gbe@ (mentor) Differential Revision: https://reviews.freebsd.org/D28552 --- usr.bin/compress/compress.1 | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/usr.bin/compress/compress.1 b/usr.bin/compress/compress.1 index de44653775ea..3aa18a963cdc 100644 --- a/usr.bin/compress/compress.1 +++ b/usr.bin/compress/compress.1 @@ -32,7 +32,7 @@ .\" @(#)compress.1 8.2 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd October 20, 2020 +.Dd March 4, 2021 .Dt COMPRESS 1 .Os .Sh NAME @@ -177,6 +177,13 @@ Compression is generally much better than that achieved by Huffman coding (as used in the historical command pack), or adaptive Huffman coding (as used in the historical command compact), and takes less time to compute. +.Pp +If +.Ar file +is a soft or hard link +.Nm +will replace it with a compressed copy of the file pointed to by the link. +The link's target file is left uncompressed. .Sh EXIT STATUS .Ex -std compress uncompress .Pp @@ -248,6 +255,8 @@ The command appeared in .Bx 4.3 . .Sh BUGS +The program does not handle links well and has no link-handling options. +.Pp Some of these might be considered otherwise-undocumented features. .Pp .Nm compress : From owner-dev-commits-src-main@freebsd.org Thu Mar 4 14:25:24 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 043E554BA15; Thu, 4 Mar 2021 14:25:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DrtSM5kWqz3qZ7; Thu, 4 Mar 2021 14:25:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AD7431EC92; Thu, 4 Mar 2021 14:25:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 124EPNo1092795; Thu, 4 Mar 2021 14:25:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 124EPNbR092794; Thu, 4 Mar 2021 14:25:23 GMT (envelope-from git) Date: Thu, 4 Mar 2021 14:25:23 GMT Message-Id: <202103041425.124EPNbR092794@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Glen Barber Subject: git: 63749bfe96b7 - main - release: sprinkle UNAME_r hacks following c883b6fd8ccd MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gjb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 63749bfe96b792b3a435f84ad81a47888cae1dea Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2021 14:25:24 -0000 The branch main has been updated by gjb: URL: https://cgit.FreeBSD.org/src/commit/?id=63749bfe96b792b3a435f84ad81a47888cae1dea commit 63749bfe96b792b3a435f84ad81a47888cae1dea Author: Glen Barber AuthorDate: 2021-03-04 14:22:45 +0000 Commit: Glen Barber CommitDate: 2021-03-04 14:25:18 +0000 release: sprinkle UNAME_r hacks following c883b6fd8ccd Pass UNAME_r override to make(1) for ports builds when building ports for another branch. MFC after: 3 days MFC with: 0be274d37379, 80ab50e1de19, c883b6fd8ccd Sponsored by: Rubicon Communications, LLC ("Netgate") --- release/Makefile.azure | 2 +- release/Makefile.ec2 | 2 +- release/Makefile.gce | 2 +- release/Makefile.vagrant | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/release/Makefile.azure b/release/Makefile.azure index de95a944f9c7..32e91833b766 100644 --- a/release/Makefile.azure +++ b/release/Makefile.azure @@ -39,7 +39,7 @@ azure-check-depends: . endif env ASSUME_ALWAYS_YES=yes pkg install -y www/npm . else - make -C ${PORTSDIR}/www/npm BATCH=1 all install clean + env UNAME_r=${UNAME_r} make -C ${PORTSDIR}/www/npm BATCH=1 all install clean . endif . endif npm install -g azure-cli diff --git a/release/Makefile.ec2 b/release/Makefile.ec2 index 63552494db95..171de4ee2fa0 100644 --- a/release/Makefile.ec2 +++ b/release/Makefile.ec2 @@ -33,7 +33,7 @@ CW_EC2_PORTINSTALL= cw-ec2-portinstall: .if exists(${PORTSDIR}/net/bsdec2-image-upload/Makefile) - env - PATH=$$PATH make -C ${PORTSDIR}/net/bsdec2-image-upload BATCH=1 all install clean + env - UNAME_r=${UNAME_r} PATH=$$PATH make -C ${PORTSDIR}/net/bsdec2-image-upload BATCH=1 all install clean .else . if !exists(/usr/local/sbin/pkg-static) env ASSUME_ALWAYS_YES=yes pkg bootstrap -y diff --git a/release/Makefile.gce b/release/Makefile.gce index 106804de61e3..fac6918eab34 100644 --- a/release/Makefile.gce +++ b/release/Makefile.gce @@ -48,7 +48,7 @@ gce-check-depends: . endif env ASSUME_ALWAYS_YES=yes pkg install -y net/google-cloud-sdk . else - make -C ${PORTSDIR}/net/google-cloud-sdk BATCH=1 all install clean + env UNAME_r=${UNAME_r} make -C ${PORTSDIR}/net/google-cloud-sdk BATCH=1 all install clean . endif .endif diff --git a/release/Makefile.vagrant b/release/Makefile.vagrant index 4abcaa891ed3..d49eedacb6c9 100644 --- a/release/Makefile.vagrant +++ b/release/Makefile.vagrant @@ -58,7 +58,7 @@ vagrant-check-depends: . endif env ASSUME_ALWAYS_YES=yes pkg install -y curl . else - make -C ${PORTSDIR}/ftp/curl BATCH=1 all install clean + env UNAME_r=${UNAME_r} make -C ${PORTSDIR}/ftp/curl BATCH=1 all install clean . endif .endif From owner-dev-commits-src-main@freebsd.org Thu Mar 4 14:31:32 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BFBCE54BB94; Thu, 4 Mar 2021 14:31:32 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mx.blih.net (mx.blih.net [212.83.155.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mx.blih.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DrtbQ5rNXz3r3f; Thu, 4 Mar 2021 14:31:30 +0000 (UTC) (envelope-from manu@bidouilliste.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bidouilliste.com; s=mx; t=1614868281; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oWD396mLPxuM0jE7LZLMGvkx/KbG2Ev00kEHXdG5mHA=; b=ptT5Uh3L0XqXvmhPdCJZbYsqSnAejG0sKVLwW7he5L6TXJOLY5OM5Pa+edCxso3IVRuj7c KQlsjhLWcp/vVq+ezHQlao6XYTTG9Kge9aU7ktnMQM6iPGXvPh6uYPQvWE2LYuO8VqeIA0 96xnkngDFIGh8gpBDohBzU80Hb/5XfY= Received: from amy (lfbn-idf2-1-644-4.w86-247.abo.wanadoo.fr [86.247.100.4]) by mx.blih.net (OpenSMTPD) with ESMTPSA id f5d8143d (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 4 Mar 2021 14:31:21 +0000 (UTC) Date: Thu, 4 Mar 2021 15:31:21 +0100 From: Emmanuel Vadot To: Nathan Whitehorn Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 1ca8842f3ad9 - main - Use makefs(8) in release VM-image generation instead of md(4) and newfs. Message-Id: <20210304153121.f06b268899a145ce97b21784@bidouilliste.com> In-Reply-To: <202102250225.11P2PE1I011966@gitrepo.freebsd.org> References: <202102250225.11P2PE1I011966@gitrepo.freebsd.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd14.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4DrtbQ5rNXz3r3f X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bidouilliste.com header.s=mx header.b=ptT5Uh3L; dmarc=pass (policy=none) header.from=bidouilliste.com; spf=pass (mx1.freebsd.org: domain of manu@bidouilliste.com designates 212.83.155.74 as permitted sender) smtp.mailfrom=manu@bidouilliste.com X-Spamd-Result: default: False [-3.50 / 15.00]; RCVD_TLS_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[bidouilliste.com:s=mx]; FREEFALL_USER(0.00)[manu]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; MV_CASE(0.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; R_SPF_ALLOW(-0.20)[+mx]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; SPAMHAUS_ZRD(0.00)[212.83.155.74:from:127.0.2.255]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; DKIM_TRACE(0.00)[bidouilliste.com:+]; DMARC_POLICY_ALLOW(-0.50)[bidouilliste.com,none]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_DBL_DONT_QUERY_IPS(0.00)[212.83.155.74:from]; ASN(0.00)[asn:12876, ipnet:212.83.128.0/19, country:FR]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[dev-commits-src-all,dev-commits-src-main] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2021 14:31:32 -0000 On Thu, 25 Feb 2021 02:25:14 GMT Nathan Whitehorn wrote: > The branch main has been updated by nwhitehorn: > > URL: https://cgit.FreeBSD.org/src/commit/?id=1ca8842f3ad9725863c9affc044d1974a51818a9 > > commit 1ca8842f3ad9725863c9affc044d1974a51818a9 > Author: Nathan Whitehorn > AuthorDate: 2021-02-25 02:16:56 +0000 > Commit: Nathan Whitehorn > CommitDate: 2021-02-25 02:16:56 +0000 > > Use makefs(8) in release VM-image generation instead of md(4) and newfs. > > Using makefs instead reduces the privileges needed to build VM images, > simplifies the script (no need to copy files to a fresh image at the end), > and improves portability by allowing generation of cross-endian images. > As a result of the last, this patch also adds support for generation of > powerpc64 and powerpc64le VM images. > > No other changes to the output. Tested and working for both amd64 and > powerpc64 targets. > > Reviewed by: gjb > Differential Revision: https://reviews.freebsd.org/D28912 > --- > release/scripts/mk-vmimage.sh | 2 - > release/tools/vmimage.subr | 177 ++++++++++++++++++------------------------ > 2 files changed, 77 insertions(+), 102 deletions(-) > > diff --git a/release/scripts/mk-vmimage.sh b/release/scripts/mk-vmimage.sh > index cf795e04655b..d5985ceb0d25 100755 > --- a/release/scripts/mk-vmimage.sh > +++ b/release/scripts/mk-vmimage.sh > @@ -93,8 +93,6 @@ main() { > . "${VMCONFIG}" > fi > > - ROOTLABEL="gpt" > - > vm_create_base > vm_install_base > vm_extra_install_base > diff --git a/release/tools/vmimage.subr b/release/tools/vmimage.subr > index 7bd971013656..6e0c1ea633e2 100644 > --- a/release/tools/vmimage.subr > +++ b/release/tools/vmimage.subr > @@ -12,70 +12,17 @@ scriptdir=$(dirname $(realpath $0)) > export PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin" > trap "cleanup" INT QUIT TRAP ABRT TERM > > -write_partition_layout() { > - if [ -z "${NOSWAP}" ]; then > - SWAPOPT="-p freebsd-swap/swapfs::${SWAPSIZE}" > - fi > - > - BOOTFILES="$(env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ > - WITH_UNIFIED_OBJDIR=yes \ > - make -C ${WORLDDIR}/stand -V .OBJDIR)" > - BOOTFILES="$(realpath ${BOOTFILES})" > - > - case "${TARGET}:${TARGET_ARCH}" in > - amd64:amd64 | i386:i386) > - ESP=yes > - SCHEME=gpt > - BOOTPARTS="-b ${BOOTFILES}/i386/pmbr/pmbr \ > - -p freebsd-boot/bootfs:=${BOOTFILES}/i386/gptboot/gptboot" > - ROOTFSPART="-p freebsd-ufs/rootfs:=${VMBASE}" > - ;; > - arm64:aarch64 | riscv:riscv64*) > - ESP=yes > - SCHEME=gpt > - BOOTPARTS= > - ROOTFSPART="-p freebsd-ufs/rootfs:=${VMBASE}" > - ;; > - powerpc:powerpc*) > - ESP=no > - SCHEME=apm > - BOOTPARTS="-p apple-boot/bootfs:=${BOOTFILES}/powerpc/boot1.chrp/boot1.hfs" > - ROOTFSPART="-p freebsd-ufs/rootfs:=${VMBASE}" > - ;; > - *) > - echo "vmimage.subr: unsupported target '${TARGET}:${TARGET_ARCH}'" >&2 > - exit 1 > - ;; > - esac > - > - if [ ${ESP} = "yes" ]; then > - # Create an ESP > - espfilename=$(mktemp /tmp/efiboot.XXXXXX) > - make_esp_file ${espfilename} ${fat32min} ${BOOTFILES}/efi/loader_lua/loader_lua.efi > - BOOTPARTS="${BOOTPARTS} -p efi/efiesp:=${espfilename}" > - > - # Add this to fstab, requires temporarily remounting the fs > - mddev=$(mdconfig -f ${VMBASE}) > - mount /dev/${mddev} ${DESTDIR} > - mkdir -p ${DESTDIR}/boot/efi > - echo "/dev/${ROOTLABEL}/efiesp /boot/efi msdosfs rw 2 2" \ > - >> ${DESTDIR}/etc/fstab > - umount ${DESTDIR} > - mdconfig -d -u ${mddev} > - fi > - > - mkimg -s ${SCHEME} -f ${VMFORMAT} \ > - ${BOOTPARTS} \ > - ${SWAPOPT} \ > - ${ROOTFSPART} \ > - -o ${VMIMAGE} > - > - if [ ${ESP} = "yes" ]; then > - rm ${espfilename} > - fi > - > - return 0 > -} > +# Platform-specific large-scale setup > +# Most platforms use GPT, so put that as default, then special cases > +PARTSCHEME=gpt > +ROOTLABEL="gpt" > +case "${TARGET}:${TARGET_ARCH}" in > + powerpc:powerpc*) > + PARTSCHEME=mbr > + ROOTLABEL="ufs" > + NOSWAP=yes # Can't label swap partition with MBR, so no swap > + ;; > +esac > > err() { > printf "${@}\n" > @@ -87,10 +34,6 @@ cleanup() { > if [ -c "${DESTDIR}/dev/null" ]; then > umount_loop ${DESTDIR}/dev 2>/dev/null > fi > - umount_loop ${DESTDIR} > - if [ ! -z "${mddev}" ]; then > - mdconfig -d -u ${mddev} > - fi > > return 0 > } > @@ -100,42 +43,12 @@ vm_create_base() { > # written to the formatted disk image with mkimg(1). > > mkdir -p ${DESTDIR} > - truncate -s ${VMSIZE} ${VMBASE} > - mddev=$(mdconfig -f ${VMBASE}) > - newfs -L rootfs /dev/${mddev} > - mount /dev/${mddev} ${DESTDIR} > > return 0 > } > > vm_copy_base() { > - # Creates a new UFS root filesystem and copies the contents of the > - # current root filesystem into it. This produces a "clean" disk > - # image without any remnants of files which were created temporarily > - # during image-creation and have since been deleted (e.g., downloaded > - # package archives). > - > - mkdir -p ${DESTDIR}/old > - mdold=$(mdconfig -f ${VMBASE}) > - mount /dev/${mdold} ${DESTDIR}/old > - > - truncate -s ${VMSIZE} ${VMBASE}.tmp > - mkdir -p ${DESTDIR}/new > - mdnew=$(mdconfig -f ${VMBASE}.tmp) > - newfs -L rootfs /dev/${mdnew} > - mount /dev/${mdnew} ${DESTDIR}/new > - > - tar -cf- -C ${DESTDIR}/old . | tar -xUf- -C ${DESTDIR}/new > - > - umount_loop /dev/${mdold} > - rmdir ${DESTDIR}/old > - mdconfig -d -u ${mdold} > - > - umount_loop /dev/${mdnew} > - rmdir ${DESTDIR}/new > - tunefs -n enable /dev/${mdnew} > - mdconfig -d -u ${mdnew} > - mv ${VMBASE}.tmp ${VMBASE} > + # Defunct > } > > vm_install_base() { > @@ -276,7 +189,71 @@ vm_create_disk() { > echo "Creating image... Please wait." > echo > > - write_partition_layout || return 1 > + if [ -z "${NOSWAP}" ]; then > + SWAPOPT="-p freebsd-swap/swapfs::${SWAPSIZE}" > + fi > + > + BOOTFILES="$(env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ > + WITH_UNIFIED_OBJDIR=yes \ > + make -C ${WORLDDIR}/stand -V .OBJDIR)" > + BOOTFILES="$(realpath ${BOOTFILES})" > + > + case "${TARGET}:${TARGET_ARCH}" in > + amd64:amd64 | i386:i386) > + ESP=yes > + BOOTPARTS="-b ${BOOTFILES}/i386/pmbr/pmbr \ > + -p freebsd-boot/bootfs:=${BOOTFILES}/i386/gptboot/gptboot" > + ROOTFSPART="-p freebsd-ufs/rootfs:=${VMBASE}" > + MAKEFSARGS="-B little" > + ;; > + arm64:aarch64 | riscv:riscv64*) > + ESP=yes > + BOOTPARTS= > + ROOTFSPART="-p freebsd-ufs/rootfs:=${VMBASE}" > + MAKEFSARGS="-B little" > + ;; > + powerpc:powerpc*) > + ESP=no > + BOOTPARTS="-p prepboot:=${BOOTFILES}/powerpc/boot1.chrp/boot1.elf -a 1" > + ROOTFSPART="-p freebsd:=${VMBASE}" > + if [ ${TARGET_ARCH} = powerpc64le ]; then > + MAKEFSARGS="-B little" > + else > + MAKEFSARGS="-B big" > + fi > + ;; > + *) > + echo "vmimage.subr: unsupported target '${TARGET}:${TARGET_ARCH}'" >&2 > + exit 1 > + ;; > + esac > + > + if [ ${ESP} = "yes" ]; then > + # Create an ESP > + espfilename=$(mktemp /tmp/efiboot.XXXXXX) > + make_esp_file ${espfilename} ${fat32min} ${BOOTFILES}/efi/loader_lua/loader_lua.efi > + BOOTPARTS="${BOOTPARTS} -p efi/efiesp:=${espfilename}" > + > + # Add this to fstab > + mkdir -p ${DESTDIR}/boot/efi > + echo "/dev/${ROOTLABEL}/efiesp /boot/efi msdosfs rw 2 2" \ > + >> ${DESTDIR}/etc/fstab > + fi > + > + echo "Building filesystem... Please wait." > + makefs ${MAKEFSARGS} -o label=rootfs -o version=2 -o softupdates=1 \ > + -s ${VMSIZE} ${VMBASE} ${DESTDIR} There should be some -f usage here to reserve some inodes. I'm not remembering the details exactly (same for bapt) but when we were at Gandi we revert using makefs and went back to use mdconfig/newfs because of some problems related to inodes number that -f couldn't fix. I haven't tested myself but I think that the VM image are busted with that change if they do growfs as makefs by default use the same number of inodes as the number of files in the image. Cheers, > + echo "Building final disk image... Please wait." > + mkimg -s ${PARTSCHEME} -f ${VMFORMAT} \ > + ${BOOTPARTS} \ > + ${SWAPOPT} \ > + ${ROOTFSPART} \ > + -o ${VMIMAGE} > + > + if [ ${ESP} = "yes" ]; then > + rm ${espfilename} > + fi > > return 0 > } -- Emmanuel Vadot From owner-dev-commits-src-main@freebsd.org Thu Mar 4 14:46:53 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D850A54D0EC; Thu, 4 Mar 2021 14:46:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Drtx93yfyz3sYR; Thu, 4 Mar 2021 14:46:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 783691F03D; Thu, 4 Mar 2021 14:46:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 124EkrBG019178; Thu, 4 Mar 2021 14:46:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 124EkrKc019177; Thu, 4 Mar 2021 14:46:53 GMT (envelope-from git) Date: Thu, 4 Mar 2021 14:46:53 GMT Message-Id: <202103041446.124EkrKc019177@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: f05b724ecb31 - main - Modernize geom_stats_snapshot_get MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f05b724ecb310fb91da1947ae6c68647f58f5f12 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2021 14:46:54 -0000 The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=f05b724ecb310fb91da1947ae6c68647f58f5f12 commit f05b724ecb310fb91da1947ae6c68647f58f5f12 Author: Alan Somers AuthorDate: 2021-03-03 20:06:38 +0000 Commit: Alan Somers CommitDate: 2021-03-04 14:45:48 +0000 Modernize geom_stats_snapshot_get * A logically useless memset() is used to fault in some memory pages. Change it to explicit_bzero so the compiler won't eliminate it. * Eliminate the second memset. It made sense in the days of the Big Kernel Lock, but not in the days of fine-grained SMP and especially not in the days of VDSO. MFC after: 2 weeks Sponsored by: Axcient Reviewed by: phk Differential Revision: https://reviews.freebsd.org/D29047 --- lib/libgeom/geom_stats.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/libgeom/geom_stats.c b/lib/libgeom/geom_stats.c index 450ee491ea1c..7c9191e29686 100644 --- a/lib/libgeom/geom_stats.c +++ b/lib/libgeom/geom_stats.c @@ -136,9 +136,8 @@ geom_stats_snapshot_get(void) free(sp); return (NULL); } - memset(sp->ptr, 0, pagesize * npages); /* page in, cache */ + explicit_bzero(sp->ptr, pagesize * npages); /* page in, cache */ clock_gettime(CLOCK_REALTIME, &sp->time); - memset(sp->ptr, 0, pagesize * npages); /* page in, cache */ memcpy(sp->ptr, statp, pagesize * npages); sp->pages = npages; sp->perpage = spp; From owner-dev-commits-src-main@freebsd.org Thu Mar 4 14:49:57 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2779054D793; Thu, 4 Mar 2021 14:49:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Drv0j0Yfpz3sx8; Thu, 4 Mar 2021 14:49:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 05F041EC7E; Thu, 4 Mar 2021 14:49:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 124EnuSD019746; Thu, 4 Mar 2021 14:49:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 124EnuIH019745; Thu, 4 Mar 2021 14:49:56 GMT (envelope-from git) Date: Thu, 4 Mar 2021 14:49:56 GMT Message-Id: <202103041449.124EnuIH019745@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 23553d6b940f - main - Fix creating the early arm64 level 2 blocks MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 23553d6b940f959f47045b544eefcdddf5db0949 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2021 14:49:57 -0000 The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=23553d6b940f959f47045b544eefcdddf5db0949 commit 23553d6b940f959f47045b544eefcdddf5db0949 Author: Andrew Turner AuthorDate: 2021-03-04 14:00:19 +0000 Commit: Andrew Turner CommitDate: 2021-03-04 14:39:12 +0000 Fix creating the early arm64 level 2 blocks In 48ba9b2669e6 we switched from creating level 1 blocks to smaller level 2 blocks when creating the early arm64 page tables. On issue was that they had a different meaning for register x7. The former used it to hold page table attributes, while the latter held just the memory type. This caused these attributes to be incorrectly shifted. Fix this by changing the meaning of x7 to hold the block attributes and fix the only caller that used the old meaning. Most hardware seems to have handled the bits being off however qemu failed to boot as reserved bits that should be zero were being set and qemu fails to clear these when translating from a virtual address to a physical address. Sponsored by: Innovate UK --- sys/arm64/arm64/locore.S | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/arm64/arm64/locore.S b/sys/arm64/arm64/locore.S index 4d356e8897f0..bd013a870e34 100644 --- a/sys/arm64/arm64/locore.S +++ b/sys/arm64/arm64/locore.S @@ -430,7 +430,7 @@ common: /* Create the kernel space L2 table */ mov x6, x26 - mov x7, #VM_MEMATTR_WRITE_BACK + mov x7, #(ATTR_S1_IDX(VM_MEMATTR_WRITE_BACK)) mov x8, #(KERNBASE & L2_BLOCK_MASK) mov x9, x28 bl build_l2_block_pagetable @@ -600,7 +600,7 @@ LEND(link_l1_pagetable) /* * Builds count 2 MiB page table entry * x6 = L2 table - * x7 = Type (0 = Device, 1 = Normal) + * x7 = Block attributes * x8 = VA start * x9 = PA start (trashed) * x10 = Entry count (trashed) @@ -615,8 +615,7 @@ LENTRY(build_l2_block_pagetable) and x11, x11, #Ln_ADDR_MASK /* Build the L2 block entry */ - lsl x12, x7, #2 - orr x12, x12, #L2_BLOCK + orr x12, x7, #L2_BLOCK orr x12, x12, #(ATTR_DEFAULT) orr x12, x12, #(ATTR_S1_UXN) From owner-dev-commits-src-main@freebsd.org Thu Mar 4 14:56:20 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9529354D961; Thu, 4 Mar 2021 14:56:20 +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 4Drv8422VFz3t5Y; Thu, 4 Mar 2021 14:56:19 +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 124EuBZN056046; Thu, 4 Mar 2021 06:56:11 -0800 (PST) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 124EuB88056045; Thu, 4 Mar 2021 06:56:11 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202103041456.124EuB88056045@gndrsh.dnsmgr.net> Subject: Re: git: 2c26d77d989a - main - Remove /boot/efi from mtree, missed in 0b7472b3d8d2. In-Reply-To: <6e52fee6-a2fd-584f-757e-e77a8f8ea8eb@freebsd.org> To: Nathan Whitehorn Date: Thu, 4 Mar 2021 06:56:11 -0800 (PST) CC: Warner Losh , Brandon Bergren , "Rodney W. Grimes" , Ed Maste , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org 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: 4Drv8422VFz3t5Y X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2021 14:56:20 -0000 > On 3/3/21 10:38 AM, Warner Losh wrote: > > > > > > On Wed, Mar 3, 2021 at 7:13 AM Nathan Whitehorn > > > wrote: > > > > > > > > On 3/3/21 9:05 AM, Brandon Bergren wrote: > > > On Wed, Mar 3, 2021, at 6:53 AM, Rodney W. Grimes wrote: > > >> What am I missing here?? One place I am being told this is run in > > >> an environment that may not even be an EFI booted system, and in > > >> another place it is being used as a test if something is mounted > > >> on it, which should only be true on an EFI booted system. > > > That the script in question is a generic script that runs as > > part of bsdinstall on every platform and has to be universal. > > > > > > The actual *problem* here is that > > usr.sbin/bsdinstall/scripts/bootconfig has a default case that is > > >? ? ? ? ? ? ? *)? ? ? ? ? die "Unsupported arch $(uname -m) for > > UEFI install" > > > > > > which then causes the main script to bail out, leaving the > > system in a half-installed state. > > > > > > If that had just been an exit 0 this would have never been a > > problem, I suppose. > > > > > > Before the original change that broke this, there was a check > > that the script was not running on powerpc or mips platforms > > before running the efi bits, but this got taken out. > > > > > > > Well, incidentally. The bootconfig script needs to know if there > > is an > > ESP it should configure, but the signalling mechanism (the > > presence of > > the ESP mount point) was being broken by mtree making that directory > > unconditionally even on systems that don't use EFI. So then > > bootconfig > > tried to set it up, but failed later on, because there was no EFI > > loader > > to set up. The mtree change makes the ESP mount point only exist on > > systems with an ESP. > > > > > > So you made a unilateral change, without discussion of the bigger > > design, to something without even asking the original person who made > > the change to mtree about it for what sounds like an obscure case in > > the installer that could be solved in a different way? It's trivial > > enough to look at the boot method sysctl and skip the EFI update if we > > didn't boot EFI (and if by change that's not on all systems, it's easy > > enough to add it on all systems). I have no notion about why that > > wasn't considered, at least, before jumping in and taking people by > > surprise. I still do not understand why machdep.bootmethod=EFI was rejected? Is this value not present on ALL platforms that boot in EFI mode? if exist(machdep.bootmethod) && machdep.bootmethod=EFI seems to me to be the best and valid way to make this decision. If that has issues working on a platform we need to fix that issue and not do all this other stuff. > > > > Next time, talk to people first. That's the whole point of having > > review tools, mailing list and git blame. > > > > Warner > > This method of testing was in the original review here posted on Feb. > 23: https://reviews.freebsd.org/D28897 > > The description of the test procedure you're objecting to was even in > the summary! Then we had a discussion by email about the change to mtree > on the committers list on Feb. 28 to resolve a bug affecting PowerPC in > the patch reviewed and approved by you. I then waited several days and > had a long thread for several days on the mailing list about the > approach. coming up with this short patch -- again, as a bug fix to a > reviewed approach. > > We can change the logic -- that's fine! But, to paraphrase, the reason > we have reviews is so people like you can look at the review and note > these kinds of problems when they are reviewed, not after the commit > goes in. There's a significant amount of whiplash when you do get > patches reviewed, approved, and then the person who reviewed and > approved them accuses you of "taking people by surprise". > > The installer *does* mount the partition in advance, so checking whether > there is a mounted file system is a perfectly reasonable test to do. We > could also check fstab. I would like to understand what is actually > wrong here first, though. Especially after this misfire -- which is > problematic for reasons that are still not clear to me, since there are > a number of standard directories in hier(7) not in mtree -- I want to > make sure we actually do have consensus about what is changing and why. These *should* be fixed. ALL directories that are part of a finished FreeBSD system should be present both in hier.7 and in the mtree files, deviating from that should only be allowed if there is some really really grand reasons. If the reason is "architecture foo does not have directory /bar/zap" one could and should create an arch specific mtree file that covers these, having these mkdir's (prefer to see all those changed to install -d's) scattered around all over, IMHO creates maintance and inconsistency issues. > -Nathan -- Rod Grimes rgrimes@freebsd.org From owner-dev-commits-src-main@freebsd.org Thu Mar 4 15:02:43 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3C9B554DCC7; Thu, 4 Mar 2021 15:02:43 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mx.blih.net (mx.blih.net [212.83.155.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mx.blih.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DrvHQ3KmZz3v3C; Thu, 4 Mar 2021 15:02:42 +0000 (UTC) (envelope-from manu@bidouilliste.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bidouilliste.com; s=mx; t=1614870160; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OyN3uMdcH4fbGG7IPk/Vt3Y50tpTcG79lvTU3xGJdpw=; b=n7lLD1/zWRAmUbHl2KBNU9TkD+mQHMnYwu8xLj8sY8no6rbqB4fcfZKbtAohZwsbAm80tu cVh4mtJQevDNWfd8n6k+lRR91Rw+8wdgmyxQcupt+O/mjaqJIaJigE6b01garCryL1B/pw MeG4qfVdx4Y38lTWCyu3IAFTpcJB8GU= Received: from amy (lfbn-idf2-1-644-4.w86-247.abo.wanadoo.fr [86.247.100.4]) by mx.blih.net (OpenSMTPD) with ESMTPSA id d14b9341 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 4 Mar 2021 15:02:40 +0000 (UTC) Date: Thu, 4 Mar 2021 16:02:40 +0100 From: Emmanuel Vadot To: rgrimes@freebsd.org Cc: "Rodney W. Grimes" , Nathan Whitehorn , Warner Losh , Brandon Bergren , Ed Maste , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 2c26d77d989a - main - Remove /boot/efi from mtree, missed in 0b7472b3d8d2. Message-Id: <20210304160240.494a85605396c0751d7313da@bidouilliste.com> In-Reply-To: <202103041456.124EuB88056045@gndrsh.dnsmgr.net> References: <6e52fee6-a2fd-584f-757e-e77a8f8ea8eb@freebsd.org> <202103041456.124EuB88056045@gndrsh.dnsmgr.net> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd14.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4DrvHQ3KmZz3v3C X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2021 15:02:43 -0000 On Thu, 4 Mar 2021 06:56:11 -0800 (PST) "Rodney W. Grimes" wrote: > > On 3/3/21 10:38 AM, Warner Losh wrote: > > > > > > > > > On Wed, Mar 3, 2021 at 7:13 AM Nathan Whitehorn > > > > wrote: > > > > > > > > > > > > On 3/3/21 9:05 AM, Brandon Bergren wrote: > > > > On Wed, Mar 3, 2021, at 6:53 AM, Rodney W. Grimes wrote: > > > >> What am I missing here?? One place I am being told this is run in > > > >> an environment that may not even be an EFI booted system, and in > > > >> another place it is being used as a test if something is mounted > > > >> on it, which should only be true on an EFI booted system. > > > > That the script in question is a generic script that runs as > > > part of bsdinstall on every platform and has to be universal. > > > > > > > > The actual *problem* here is that > > > usr.sbin/bsdinstall/scripts/bootconfig has a default case that is > > > >? ? ? ? ? ? ? *)? ? ? ? ? die "Unsupported arch $(uname -m) for > > > UEFI install" > > > > > > > > which then causes the main script to bail out, leaving the > > > system in a half-installed state. > > > > > > > > If that had just been an exit 0 this would have never been a > > > problem, I suppose. > > > > > > > > Before the original change that broke this, there was a check > > > that the script was not running on powerpc or mips platforms > > > before running the efi bits, but this got taken out. > > > > > > > > > > Well, incidentally. The bootconfig script needs to know if there > > > is an > > > ESP it should configure, but the signalling mechanism (the > > > presence of > > > the ESP mount point) was being broken by mtree making that directory > > > unconditionally even on systems that don't use EFI. So then > > > bootconfig > > > tried to set it up, but failed later on, because there was no EFI > > > loader > > > to set up. The mtree change makes the ESP mount point only exist on > > > systems with an ESP. > > > > > > > > > So you made a unilateral change, without discussion of the bigger > > > design, to something without even asking the original person who made > > > the change to mtree about it for what sounds like an obscure case in > > > the installer that could be solved in a different way? It's trivial > > > enough to look at the boot method sysctl and skip the EFI update if we > > > didn't boot EFI (and if by change that's not on all systems, it's easy > > > enough to add it on all systems). I have no notion about why that > > > wasn't considered, at least, before jumping in and taking people by > > > surprise. > > I still do not understand why machdep.bootmethod=EFI was rejected? > Is this value not present on ALL platforms that boot in EFI mode? > if exist(machdep.bootmethod) && machdep.bootmethod=EFI seems to > me to be the best and valid way to make this decision. If that > has issues working on a platform we need to fix that issue and not > do all this other stuff. We need to install and create the efi dir even if the installer is booted in CSM mode, so a user can switch to full uefi mode after and still can boot the FreeBSD that was installed. (The same thing must be done for bios boot code). > > > > > > Next time, talk to people first. That's the whole point of having > > > review tools, mailing list and git blame. > > > > > > Warner > > > > This method of testing was in the original review here posted on Feb. > > 23: https://reviews.freebsd.org/D28897 > > > > The description of the test procedure you're objecting to was even in > > the summary! Then we had a discussion by email about the change to mtree > > on the committers list on Feb. 28 to resolve a bug affecting PowerPC in > > the patch reviewed and approved by you. I then waited several days and > > had a long thread for several days on the mailing list about the > > approach. coming up with this short patch -- again, as a bug fix to a > > reviewed approach. > > > > We can change the logic -- that's fine! But, to paraphrase, the reason > > we have reviews is so people like you can look at the review and note > > these kinds of problems when they are reviewed, not after the commit > > goes in. There's a significant amount of whiplash when you do get > > patches reviewed, approved, and then the person who reviewed and > > approved them accuses you of "taking people by surprise". > > > > The installer *does* mount the partition in advance, so checking whether > > there is a mounted file system is a perfectly reasonable test to do. We > > could also check fstab. I would like to understand what is actually > > wrong here first, though. Especially after this misfire -- which is > > problematic for reasons that are still not clear to me, since there are > > a number of standard directories in hier(7) not in mtree -- I want to > > make sure we actually do have consensus about what is changing and why. > > These *should* be fixed. ALL directories that are part of a finished > FreeBSD system should be present both in hier.7 and in the mtree files, > deviating from that should only be allowed if there is some really > really grand reasons. If the reason is "architecture foo does not > have directory /bar/zap" one could and should create an arch specific > mtree file that covers these, having these mkdir's (prefer to see > all those changed to install -d's) scattered around all over, IMHO > creates maintance and inconsistency issues. > > > -Nathan > -- > Rod Grimes rgrimes@freebsd.org -- Emmanuel Vadot From owner-dev-commits-src-main@freebsd.org Thu Mar 4 15:07:14 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8B6FA54E02B; Thu, 4 Mar 2021 15:07:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DrvNf3cZXz3vHw; Thu, 4 Mar 2021 15:07:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6E5861F594; Thu, 4 Mar 2021 15:07:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 124F7EAP046475; Thu, 4 Mar 2021 15:07:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 124F7EXu046474; Thu, 4 Mar 2021 15:07:14 GMT (envelope-from git) Date: Thu, 4 Mar 2021 15:07:14 GMT Message-Id: <202103041507.124F7EXu046474@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 5e6989ba4f26 - main - link_elf_obj: Handle init_array sections in KLDs MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5e6989ba4f26acafc77baa6055c0a9e7fe683514 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2021 15:07:14 -0000 The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=5e6989ba4f26acafc77baa6055c0a9e7fe683514 commit 5e6989ba4f26acafc77baa6055c0a9e7fe683514 Author: Mark Johnston AuthorDate: 2021-03-04 15:02:47 +0000 Commit: Mark Johnston CommitDate: 2021-03-04 15:07:10 +0000 link_elf_obj: Handle init_array sections in KLDs Reuse existing handling for .ctors, print a warning if multiple constructor sections are present. Destructors are not handled as of yet. This is required for KASAN. Reviewed by: kib MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D29049 --- sys/kern/link_elf_obj.c | 43 ++++++++++++++++++++++++++++++++++++------- 1 file changed, 36 insertions(+), 7 deletions(-) diff --git a/sys/kern/link_elf_obj.c b/sys/kern/link_elf_obj.c index 6b5a6df0a56f..337588bd5c00 100644 --- a/sys/kern/link_elf_obj.c +++ b/sys/kern/link_elf_obj.c @@ -386,6 +386,8 @@ link_elf_link_preload(linker_class_t cls, const char *filename, #ifdef __amd64__ case SHT_X86_64_UNWIND: #endif + case SHT_INIT_ARRAY: + case SHT_FINI_ARRAY: /* Ignore sections not loaded by the loader. */ if (shdr[i].sh_addr == 0) break; @@ -470,6 +472,7 @@ link_elf_link_preload(linker_class_t cls, const char *filename, #ifdef __amd64__ case SHT_X86_64_UNWIND: #endif + case SHT_FINI_ARRAY: if (shdr[i].sh_addr == 0) break; ef->progtab[pb].addr = (void *)shdr[i].sh_addr; @@ -479,6 +482,10 @@ link_elf_link_preload(linker_class_t cls, const char *filename, else if (shdr[i].sh_type == SHT_X86_64_UNWIND) ef->progtab[pb].name = "<>"; #endif + else if (shdr[i].sh_type == SHT_INIT_ARRAY) + ef->progtab[pb].name = "<>"; + else if (shdr[i].sh_type == SHT_FINI_ARRAY) + ef->progtab[pb].name = "<>"; else ef->progtab[pb].name = "<>"; ef->progtab[pb].size = shdr[i].sh_size; @@ -525,10 +532,17 @@ link_elf_link_preload(linker_class_t cls, const char *filename, vnet_data_copy(vnet_data, shdr[i].sh_size); ef->progtab[pb].addr = vnet_data; #endif - } else if (ef->progtab[pb].name != NULL && - !strcmp(ef->progtab[pb].name, ".ctors")) { - lf->ctors_addr = ef->progtab[pb].addr; - lf->ctors_size = shdr[i].sh_size; + } else if ((ef->progtab[pb].name != NULL && + strcmp(ef->progtab[pb].name, ".ctors") == 0) || + shdr[i].sh_type == SHT_INIT_ARRAY) { + if (lf->ctors_addr != 0) { + printf( + "%s: multiple ctor sections in %s\n", + __func__, filename); + } else { + lf->ctors_addr = ef->progtab[pb].addr; + lf->ctors_size = shdr[i].sh_size; + } } /* Update all symbol values with the offset. */ @@ -773,6 +787,8 @@ link_elf_load_file(linker_class_t cls, const char *filename, #ifdef __amd64__ case SHT_X86_64_UNWIND: #endif + case SHT_INIT_ARRAY: + case SHT_FINI_ARRAY: if ((shdr[i].sh_flags & SHF_ALLOC) == 0) break; ef->nprogtab++; @@ -894,6 +910,8 @@ link_elf_load_file(linker_class_t cls, const char *filename, #ifdef __amd64__ case SHT_X86_64_UNWIND: #endif + case SHT_INIT_ARRAY: + case SHT_FINI_ARRAY: if ((shdr[i].sh_flags & SHF_ALLOC) == 0) break; alignmask = shdr[i].sh_addralign - 1; @@ -971,6 +989,8 @@ link_elf_load_file(linker_class_t cls, const char *filename, #ifdef __amd64__ case SHT_X86_64_UNWIND: #endif + case SHT_INIT_ARRAY: + case SHT_FINI_ARRAY: if ((shdr[i].sh_flags & SHF_ALLOC) == 0) break; alignmask = shdr[i].sh_addralign - 1; @@ -979,9 +999,18 @@ link_elf_load_file(linker_class_t cls, const char *filename, if (ef->shstrtab != NULL && shdr[i].sh_name != 0) { ef->progtab[pb].name = ef->shstrtab + shdr[i].sh_name; - if (!strcmp(ef->progtab[pb].name, ".ctors")) { - lf->ctors_addr = (caddr_t)mapbase; - lf->ctors_size = shdr[i].sh_size; + if (!strcmp(ef->progtab[pb].name, ".ctors") || + shdr[i].sh_type == SHT_INIT_ARRAY) { + if (lf->ctors_addr != 0) { + printf( + "%s: multiple ctor sections in %s\n", + __func__, filename); + } else { + lf->ctors_addr = + (caddr_t)mapbase; + lf->ctors_size = + shdr[i].sh_size; + } } } else if (shdr[i].sh_type == SHT_PROGBITS) ef->progtab[pb].name = "<>"; From owner-dev-commits-src-main@freebsd.org Thu Mar 4 15:17:38 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5526A54ECA5; Thu, 4 Mar 2021 15:17:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Drvcf21Tjz4RKS; Thu, 4 Mar 2021 15:17:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 37BB91F844; Thu, 4 Mar 2021 15:17:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 124FHcI8059656; Thu, 4 Mar 2021 15:17:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 124FHcwK059655; Thu, 4 Mar 2021 15:17:38 GMT (envelope-from git) Date: Thu, 4 Mar 2021 15:17:38 GMT Message-Id: <202103041517.124FHcwK059655@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michal Meloun Subject: git: f97f57b51855 - main - simple_mfd: switch to controllable locking for syscon provider. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mmel X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f97f57b51855cecb9b497a90dfed06dac2c21111 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2021 15:17:38 -0000 The branch main has been updated by mmel: URL: https://cgit.FreeBSD.org/src/commit/?id=f97f57b51855cecb9b497a90dfed06dac2c21111 commit f97f57b51855cecb9b497a90dfed06dac2c21111 Author: Michal Meloun AuthorDate: 2021-03-04 14:09:32 +0000 Commit: Michal Meloun CommitDate: 2021-03-04 15:12:39 +0000 simple_mfd: switch to controllable locking for syscon provider. MFC after 3 weeks --- sys/dev/fdt/simple_mfd.c | 40 ++++++++++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/sys/dev/fdt/simple_mfd.c b/sys/dev/fdt/simple_mfd.c index 752740cf705e..aedada3079e8 100644 --- a/sys/dev/fdt/simple_mfd.c +++ b/sys/dev/fdt/simple_mfd.c @@ -73,9 +73,9 @@ static int simple_mfd_syscon_modify_4(struct syscon *syscon, bus_size_t offset, #define SYSCON_ASSERT_UNLOCKED(_sc) mtx_assert(&(_sc)->mtx, MA_NOTOWNED); static syscon_method_t simple_mfd_syscon_methods[] = { - SYSCONMETHOD(syscon_read_4, simple_mfd_syscon_read_4), - SYSCONMETHOD(syscon_write_4, simple_mfd_syscon_write_4), - SYSCONMETHOD(syscon_modify_4, simple_mfd_syscon_modify_4), + SYSCONMETHOD(syscon_unlocked_read_4, simple_mfd_syscon_read_4), + SYSCONMETHOD(syscon_unlocked_write_4, simple_mfd_syscon_write_4), + SYSCONMETHOD(syscon_unlocked_modify_4, simple_mfd_syscon_modify_4), SYSCONMETHOD_END }; @@ -89,10 +89,8 @@ simple_mfd_syscon_read_4(struct syscon *syscon, bus_size_t offset) uint32_t val; sc = device_get_softc(syscon->pdev); - - SYSCON_LOCK(sc); + SYSCON_ASSERT_LOCKED(sc);; val = bus_read_4(sc->mem_res, offset); - SYSCON_UNLOCK(sc); return (val); } @@ -103,10 +101,8 @@ simple_mfd_syscon_write_4(struct syscon *syscon, bus_size_t offset, struct simple_mfd_softc *sc; sc = device_get_softc(syscon->pdev); - - SYSCON_LOCK(sc); + SYSCON_ASSERT_LOCKED(sc); bus_write_4(sc->mem_res, offset, val); - SYSCON_UNLOCK(sc); return (0); } @@ -118,15 +114,14 @@ simple_mfd_syscon_modify_4(struct syscon *syscon, bus_size_t offset, uint32_t val; sc = device_get_softc(syscon->pdev); - - SYSCON_LOCK(sc); + SYSCON_ASSERT_LOCKED(sc); val = bus_read_4(sc->mem_res, offset); val &= ~clear_bits; val |= set_bits; bus_write_4(sc->mem_res, offset, val); - SYSCON_UNLOCK(sc); return (0); } + static int simple_mfd_syscon_get_handle(device_t dev, struct syscon **syscon) { @@ -139,6 +134,24 @@ simple_mfd_syscon_get_handle(device_t dev, struct syscon **syscon) return (0); } +static void +simple_mfd_syscon_lock(device_t dev) +{ + struct simple_mfd_softc *sc; + + sc = device_get_softc(dev); + SYSCON_LOCK(sc); +} + +static void +simple_mfd_syscon_unlock(device_t dev) +{ + struct simple_mfd_softc *sc; + + sc = device_get_softc(dev); + SYSCON_UNLOCK(sc); +} + static int simple_mfd_probe(device_t dev) { @@ -293,6 +306,9 @@ simple_mfd_add_device(device_t dev, phandle_t node, u_int order, static device_method_t simple_mfd_methods[] = { /* syscon interface */ DEVMETHOD(syscon_get_handle, simple_mfd_syscon_get_handle), + DEVMETHOD(syscon_device_lock, simple_mfd_syscon_lock), + DEVMETHOD(syscon_device_unlock, simple_mfd_syscon_unlock), + /* Device interface */ DEVMETHOD(device_probe, simple_mfd_probe), DEVMETHOD(device_attach, simple_mfd_attach), From owner-dev-commits-src-main@freebsd.org Thu Mar 4 16:55:07 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4EFB2551C4D; Thu, 4 Mar 2021 16:55:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Drxn71qdTz4Y64; Thu, 4 Mar 2021 16:55:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 31B9620BBD; Thu, 4 Mar 2021 16:55:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 124Gt7jx090376; Thu, 4 Mar 2021 16:55:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 124Gt763090375; Thu, 4 Mar 2021 16:55:07 GMT (envelope-from git) Date: Thu, 4 Mar 2021 16:55:07 GMT Message-Id: <202103041655.124Gt763090375@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michal Meloun Subject: git: a5dce53b75d8 - main - mvebu_gpio: Multiple fixes. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mmel X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a5dce53b75d8750ba95623ad2dbffac4acfd3545 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2021 16:55:07 -0000 The branch main has been updated by mmel: URL: https://cgit.FreeBSD.org/src/commit/?id=a5dce53b75d8750ba95623ad2dbffac4acfd3545 commit a5dce53b75d8750ba95623ad2dbffac4acfd3545 Author: Michal Meloun AuthorDate: 2021-03-03 17:28:45 +0000 Commit: Michal Meloun CommitDate: 2021-03-04 16:54:40 +0000 mvebu_gpio: Multiple fixes. - gpio register access primitives - locking in interrupt path - cleanup In cooperation with: mw Reviewed by: mw (initial version) MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D29044 Differential Revision: https://reviews.freebsd.org/D28911 --- sys/arm/mv/mvebu_gpio.c | 60 ++++++++++++++++++++++++++++++------------------- 1 file changed, 37 insertions(+), 23 deletions(-) diff --git a/sys/arm/mv/mvebu_gpio.c b/sys/arm/mv/mvebu_gpio.c index f0471b8d019c..c38fbceebf24 100644 --- a/sys/arm/mv/mvebu_gpio.c +++ b/sys/arm/mv/mvebu_gpio.c @@ -83,9 +83,6 @@ __FBSDID("$FreeBSD$"); #define MV_GPIO_MAX_NIRQS 4 #define MV_GPIO_MAX_NPINS 32 -#define RD4(sc, reg) SYSCON_READ_4((sc)->syscon, (reg)) -#define WR4(sc, reg, val) SYSCON_WRITE_4((sc)->syscon, (reg), (val)) - struct mvebu_gpio_irqsrc { struct intr_irqsrc isrc; u_int irq; @@ -127,14 +124,11 @@ static inline void gpio_write(struct mvebu_gpio_softc *sc, bus_size_t reg, struct gpio_pin *pin, uint32_t val) { - uint32_t tmp; int bit; bit = GPIO_BIT(pin->gp_pin); - tmp = 0x100 << bit; /* mask */ - tmp |= (val & 1) << bit; /* value */ SYSCON_WRITE_4(sc->syscon, sc->offset + GPIO_REGNUM(pin->gp_pin) + reg, - tmp); + (val & 1) << bit); } static inline uint32_t @@ -146,9 +140,21 @@ gpio_read(struct mvebu_gpio_softc *sc, bus_size_t reg, struct gpio_pin *pin) bit = GPIO_BIT(pin->gp_pin); val = SYSCON_READ_4(sc->syscon, sc->offset + GPIO_REGNUM(pin->gp_pin) + reg); + return (val >> bit) & 1; } +static inline void +gpio_modify(struct mvebu_gpio_softc *sc, bus_size_t reg, + struct gpio_pin *pin, uint32_t val) +{ + int bit; + + bit = GPIO_BIT(pin->gp_pin); + SYSCON_MODIFY_4(sc->syscon, sc->offset + GPIO_REGNUM(pin->gp_pin) + reg, + 1 << bit, (val & 1) << bit); +} + static void mvebu_gpio_pin_configure(struct mvebu_gpio_softc *sc, struct gpio_pin *pin, unsigned int flags) @@ -305,15 +311,14 @@ mvebu_gpio_pin_toggle(device_t dev, uint32_t pin) */ static inline void intr_modify(struct mvebu_gpio_softc *sc, bus_addr_t reg, - struct mvebu_gpio_irqsrc *mgi, uint32_t val, uint32_t mask) + struct mvebu_gpio_irqsrc *mgi, uint32_t val) { int bit; bit = GPIO_BIT(mgi->irq); - GPIO_LOCK(sc); - val = SYSCON_MODIFY_4(sc->syscon, - sc->offset + GPIO_REGNUM(mgi->irq) + reg, val, mask); - GPIO_UNLOCK(sc); + SYSCON_MODIFY_4(sc->syscon, + sc->offset + GPIO_REGNUM(mgi->irq) + reg, 1 << bit, + (val & 1) << bit); } static inline void @@ -322,18 +327,23 @@ mvebu_gpio_isrc_mask(struct mvebu_gpio_softc *sc, { if (mgi->is_level) - intr_modify(sc, GPIO_INT_LEVEL_MASK, mgi, val, 1); + intr_modify(sc, GPIO_INT_LEVEL_MASK, mgi, val); else - intr_modify(sc, GPIO_INT_MASK, mgi, val, 1); + intr_modify(sc, GPIO_INT_MASK, mgi, val); } static inline void mvebu_gpio_isrc_eoi(struct mvebu_gpio_softc *sc, struct mvebu_gpio_irqsrc *mgi) { + int bit; - if (!mgi->is_level) - intr_modify(sc, GPIO_INT_CAUSE, mgi, 0, 1); + if (!mgi->is_level) { + bit = GPIO_BIT(mgi->irq); + SYSCON_WRITE_4(sc->syscon, + sc->offset + GPIO_REGNUM(mgi->irq) + GPIO_INT_CAUSE, + ~(1 << bit)); + } } static int @@ -596,8 +606,11 @@ mvebu_gpio_pic_setup_intr(device_t dev, struct intr_irqsrc *isrc, mgi->is_level = level; mgi->is_inverted = inverted; - intr_modify(sc, GPIO_DATA_IN_POL, mgi, inverted ? 1 : 0, 1); + + GPIO_LOCK(sc); + intr_modify(sc, GPIO_DATA_IN_POL, mgi, inverted ? 1 : 0); mvebu_gpio_pic_enable_intr(dev, isrc); + GPIO_UNLOCK(sc); return (0); } @@ -641,12 +654,13 @@ mvebu_gpio_intr(void *arg) lvl &= gpio_read(sc, GPIO_INT_LEVEL_MASK, &sc->gpio_pins[i]); edge = gpio_read(sc, GPIO_DATA_IN, &sc->gpio_pins[i]); edge &= gpio_read(sc, GPIO_INT_LEVEL_MASK, &sc->gpio_pins[i]); - if (edge == 0 || lvl == 0) + if (edge == 0 && lvl == 0) continue; mgi = &sc->isrcs[i]; if (!mgi->is_level) mvebu_gpio_isrc_eoi(sc, mgi); + if (intr_isrc_dispatch(&mgi->isrc, tf) != 0) { mvebu_gpio_isrc_mask(sc, mgi, 0); if (mgi->is_level) @@ -776,11 +790,11 @@ mvebu_gpio_attach(device_t dev) snprintf(pin->gp_name, GPIOMAXNAME, "gpio%d", i); /* Init HW */ - gpio_write(sc, GPIO_INT_MASK, pin, 0); - gpio_write(sc, GPIO_INT_LEVEL_MASK, pin, 0); - gpio_write(sc, GPIO_INT_CAUSE, pin, 0); - gpio_write(sc, GPIO_DATA_IN_POL, pin, 1); - gpio_write(sc, GPIO_BLINK_ENA, pin, 0); + gpio_modify(sc, GPIO_INT_MASK, pin, 0); + gpio_modify(sc, GPIO_INT_LEVEL_MASK, pin, 0); + gpio_modify(sc, GPIO_INT_CAUSE, pin, 0); + gpio_modify(sc, GPIO_DATA_IN_POL, pin, 0); + gpio_modify(sc, GPIO_BLINK_ENA, pin, 0); } if (sc->irq_res[0] != NULL) { From owner-dev-commits-src-main@freebsd.org Thu Mar 4 15:12:21 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DB1EC54E1E3; Thu, 4 Mar 2021 15:12:21 +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 4DrvVY1cBvz3vtG; Thu, 4 Mar 2021 15:12:20 +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 124FC9rx056115; Thu, 4 Mar 2021 07:12:09 -0800 (PST) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 124FC8KV056114; Thu, 4 Mar 2021 07:12:08 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202103041512.124FC8KV056114@gndrsh.dnsmgr.net> Subject: Re: git: 2c26d77d989a - main - Remove /boot/efi from mtree, missed in 0b7472b3d8d2. In-Reply-To: <20210304160240.494a85605396c0751d7313da@bidouilliste.com> To: Emmanuel Vadot Date: Thu, 4 Mar 2021 07:12:08 -0800 (PST) CC: rgrimes@freebsd.org, "Rodney W. Grimes" , Nathan Whitehorn , Warner Losh , Brandon Bergren , Ed Maste , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org 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: 4DrvVY1cBvz3vtG X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Mailman-Approved-At: Thu, 04 Mar 2021 18:19:27 +0000 X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2021 15:12:21 -0000 > On Thu, 4 Mar 2021 06:56:11 -0800 (PST) > "Rodney W. Grimes" wrote: > > > > On 3/3/21 10:38 AM, Warner Losh wrote: > > > > > > > > > > > > On Wed, Mar 3, 2021 at 7:13 AM Nathan Whitehorn > > > > > wrote: > > > > > > > > > > > > > > > > On 3/3/21 9:05 AM, Brandon Bergren wrote: > > > > > On Wed, Mar 3, 2021, at 6:53 AM, Rodney W. Grimes wrote: > > > > >> What am I missing here?? One place I am being told this is run in > > > > >> an environment that may not even be an EFI booted system, and in > > > > >> another place it is being used as a test if something is mounted > > > > >> on it, which should only be true on an EFI booted system. > > > > > That the script in question is a generic script that runs as > > > > part of bsdinstall on every platform and has to be universal. > > > > > > > > > > The actual *problem* here is that > > > > usr.sbin/bsdinstall/scripts/bootconfig has a default case that is > > > > >? ? ? ? ? ? ? *)? ? ? ? ? die "Unsupported arch $(uname -m) for > > > > UEFI install" > > > > > > > > > > which then causes the main script to bail out, leaving the > > > > system in a half-installed state. > > > > > > > > > > If that had just been an exit 0 this would have never been a > > > > problem, I suppose. > > > > > > > > > > Before the original change that broke this, there was a check > > > > that the script was not running on powerpc or mips platforms > > > > before running the efi bits, but this got taken out. > > > > > > > > > > > > > Well, incidentally. The bootconfig script needs to know if there > > > > is an > > > > ESP it should configure, but the signalling mechanism (the > > > > presence of > > > > the ESP mount point) was being broken by mtree making that directory > > > > unconditionally even on systems that don't use EFI. So then > > > > bootconfig > > > > tried to set it up, but failed later on, because there was no EFI > > > > loader > > > > to set up. The mtree change makes the ESP mount point only exist on > > > > systems with an ESP. > > > > > > > > > > > > So you made a unilateral change, without discussion of the bigger > > > > design, to something without even asking the original person who made > > > > the change to mtree about it for what sounds like an obscure case in > > > > the installer that could be solved in a different way? It's trivial > > > > enough to look at the boot method sysctl and skip the EFI update if we > > > > didn't boot EFI (and if by change that's not on all systems, it's easy > > > > enough to add it on all systems). I have no notion about why that > > > > wasn't considered, at least, before jumping in and taking people by > > > > surprise. > > > > I still do not understand why machdep.bootmethod=EFI was rejected? > > Is this value not present on ALL platforms that boot in EFI mode? > > if exist(machdep.bootmethod) && machdep.bootmethod=EFI seems to > > me to be the best and valid way to make this decision. If that > > has issues working on a platform we need to fix that issue and not > > do all this other stuff. > > We need to install and create the efi dir even if the installer is > booted in CSM mode, so a user can switch to full uefi mode after and > still can boot the FreeBSD that was installed. (The same thing must be > done for bios boot code). Ah, yes, ok, I see that issue, but isnt that driven by the fact the user has selected GPT (EFI) in the disk menu, so could be drive by an installer variable like any other aspect of the installer? Passing around the users install parameters via the file system is fragile as noted else where, this information should be clearly avaliable within the installer script itself. > > > > > > > > > Next time, talk to people first. That's the whole point of having > > > > review tools, mailing list and git blame. > > > > > > > > Warner > > > > > > This method of testing was in the original review here posted on Feb. > > > 23: https://reviews.freebsd.org/D28897 > > > > > > The description of the test procedure you're objecting to was even in > > > the summary! Then we had a discussion by email about the change to mtree > > > on the committers list on Feb. 28 to resolve a bug affecting PowerPC in > > > the patch reviewed and approved by you. I then waited several days and > > > had a long thread for several days on the mailing list about the > > > approach. coming up with this short patch -- again, as a bug fix to a > > > reviewed approach. > > > > > > We can change the logic -- that's fine! But, to paraphrase, the reason > > > we have reviews is so people like you can look at the review and note > > > these kinds of problems when they are reviewed, not after the commit > > > goes in. There's a significant amount of whiplash when you do get > > > patches reviewed, approved, and then the person who reviewed and > > > approved them accuses you of "taking people by surprise". > > > > > > The installer *does* mount the partition in advance, so checking whether > > > there is a mounted file system is a perfectly reasonable test to do. We > > > could also check fstab. I would like to understand what is actually > > > wrong here first, though. Especially after this misfire -- which is > > > problematic for reasons that are still not clear to me, since there are > > > a number of standard directories in hier(7) not in mtree -- I want to > > > make sure we actually do have consensus about what is changing and why. > > > > These *should* be fixed. ALL directories that are part of a finished > > FreeBSD system should be present both in hier.7 and in the mtree files, > > deviating from that should only be allowed if there is some really > > really grand reasons. If the reason is "architecture foo does not > > have directory /bar/zap" one could and should create an arch specific > > mtree file that covers these, having these mkdir's (prefer to see > > all those changed to install -d's) scattered around all over, IMHO > > creates maintance and inconsistency issues. > > > > > -Nathan > > -- > > Rod Grimes rgrimes@freebsd.org > -- > Emmanuel Vadot -- Rod Grimes rgrimes@freebsd.org From owner-dev-commits-src-main@freebsd.org Thu Mar 4 18:44:05 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AE1A7555373; Thu, 4 Mar 2021 18:44:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ds0Bs4XpQz4hCR; Thu, 4 Mar 2021 18:44:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8EAA222596; Thu, 4 Mar 2021 18:44:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 124Ii5cd034930; Thu, 4 Mar 2021 18:44:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 124Ii5sX034929; Thu, 4 Mar 2021 18:44:05 GMT (envelope-from git) Date: Thu, 4 Mar 2021 18:44:05 GMT Message-Id: <202103041844.124Ii5sX034929@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: 0072e5e0f3a0 - main - sys/arm64/arm64/vfp.c: Fix -Wunused and -Wpointer-sign warnings MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0072e5e0f3a0bb3aa06708ba64497ef75021d431 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2021 18:44:05 -0000 The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=0072e5e0f3a0bb3aa06708ba64497ef75021d431 commit 0072e5e0f3a0bb3aa06708ba64497ef75021d431 Author: Alex Richardson AuthorDate: 2021-03-04 14:55:29 +0000 Commit: Alex Richardson CommitDate: 2021-03-04 18:25:44 +0000 sys/arm64/arm64/vfp.c: Fix -Wunused and -Wpointer-sign warnings These are off by default but were flagged by my IDE while adding some debugging printfs for D29060. --- sys/arm64/arm64/vfp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/arm64/arm64/vfp.c b/sys/arm64/arm64/vfp.c index 62244ddc80e8..23c782c6dccb 100644 --- a/sys/arm64/arm64/vfp.c +++ b/sys/arm64/arm64/vfp.c @@ -102,7 +102,7 @@ vfp_discard(struct thread *td) static void vfp_store(struct vfpstate *state) { - __int128_t *vfp_state; + __uint128_t *vfp_state; uint64_t fpcr, fpsr; vfp_state = state->vfp_regs; @@ -134,7 +134,7 @@ vfp_store(struct vfpstate *state) static void vfp_restore(struct vfpstate *state) { - __int128_t *vfp_state; + __uint128_t *vfp_state; uint64_t fpcr, fpsr; vfp_state = state->vfp_regs; @@ -357,7 +357,7 @@ fpu_kern_leave(struct thread *td, struct fpu_kern_ctx *ctx) } int -fpu_kern_thread(u_int flags) +fpu_kern_thread(u_int flags __unused) { struct pcb *pcb = curthread->td_pcb; @@ -372,7 +372,7 @@ fpu_kern_thread(u_int flags) } int -is_fpu_kern_thread(u_int flags) +is_fpu_kern_thread(u_int flags __unused) { struct pcb *curpcb; From owner-dev-commits-src-main@freebsd.org Thu Mar 4 18:44:06 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E01A2555493; Thu, 4 Mar 2021 18:44:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ds0Bt5qHlz4hJ6; Thu, 4 Mar 2021 18:44:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B8F7622418; Thu, 4 Mar 2021 18:44:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 124Ii6gI034950; Thu, 4 Mar 2021 18:44:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 124Ii6w0034949; Thu, 4 Mar 2021 18:44:06 GMT (envelope-from git) Date: Thu, 4 Mar 2021 18:44:06 GMT Message-Id: <202103041844.124Ii6w0034949@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: b2c8cbf992cb - main - Remove unnecessary semicolon from CRITICAL_ASSERT() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b2c8cbf992cb0b51118beae9c304580705ae00c9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2021 18:44:07 -0000 The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=b2c8cbf992cb0b51118beae9c304580705ae00c9 commit b2c8cbf992cb0b51118beae9c304580705ae00c9 Author: Alex Richardson AuthorDate: 2021-03-04 15:06:32 +0000 Commit: Alex Richardson CommitDate: 2021-03-04 18:26:50 +0000 Remove unnecessary semicolon from CRITICAL_ASSERT() This fixes off-by-default "empty statement" compiler warnings. --- sys/sys/systm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/systm.h b/sys/sys/systm.h index 72a10c401af9..369b8bdedb51 100644 --- a/sys/sys/systm.h +++ b/sys/sys/systm.h @@ -193,7 +193,7 @@ void kassert_panic(const char *fmt, ...) __printflike(1, 2); * Assert that a thread is in critical(9) section. */ #define CRITICAL_ASSERT(td) \ - KASSERT((td)->td_critnest >= 1, ("Not in critical section")); + KASSERT((td)->td_critnest >= 1, ("Not in critical section")) /* * If we have already panic'd and this is the thread that called From owner-dev-commits-src-main@freebsd.org Thu Mar 4 18:44:08 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 11502555504; Thu, 4 Mar 2021 18:44:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ds0Bv6vRQz4hFv; Thu, 4 Mar 2021 18:44:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DD29D2251F; Thu, 4 Mar 2021 18:44:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 124Ii7n6034970; Thu, 4 Mar 2021 18:44:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 124Ii7AK034969; Thu, 4 Mar 2021 18:44:07 GMT (envelope-from git) Date: Thu, 4 Mar 2021 18:44:07 GMT Message-Id: <202103041844.124Ii7AK034969@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: 172a624f0c9f - main - Silence annoying and incorrect non-default linker warning with GCC MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 172a624f0c9fbc47d74fd5178d46f771f82dc6a0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2021 18:44:08 -0000 The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=172a624f0c9fbc47d74fd5178d46f771f82dc6a0 commit 172a624f0c9fbc47d74fd5178d46f771f82dc6a0 Author: Alex Richardson AuthorDate: 2021-03-04 18:27:37 +0000 Commit: Alex Richardson CommitDate: 2021-03-04 18:27:39 +0000 Silence annoying and incorrect non-default linker warning with GCC The CROSS_TOOLCHAIN GCC .mk files include -B${CROSS_BINUTILS_PREFIX}, so GCC will select the right linker and we don't need to warn. While here also apply 17b8b8fb5fc4acc832dabfe7ef11e3e1d399ad0f to kern.mk. Test Plan: no more warning printed with CROSS_TOOLCHAIN=mips-gcc6 Reviewed By: jhb Differential Revision: https://reviews.freebsd.org/D29015 --- share/mk/bsd.sys.mk | 4 ++++ sys/conf/kern.mk | 16 ++++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index 497283fc95da..fad487cf5630 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -306,9 +306,13 @@ LDFLAGS+= -fuse-ld=${LD:[1]:S/^ld.//1W} .else # GCC does not support an absolute path for -fuse-ld so we just print this # warning instead and let the user add the required symlinks. +# However, we can avoid this warning if -B is set appropriately (e.g. for +# CROSS_TOOLCHAIN=...-gcc). +.if !(${LD:[1]:T} == "ld" && ${CC:tw:M-B${LD:[1]:H}/}) .warning LD (${LD}) is not the default linker for ${CC} but -fuse-ld= is not supported .endif .endif +.endif # Tell bmake not to mistake standard targets for things to be searched for # or expect to ever be up-to-date. diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index 8f0163a3d0a0..8cc79e6645ad 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -280,19 +280,23 @@ CFLAGS+= -std=${CSTD} # Please keep this if in sync with bsd.sys.mk .if ${LD} != "ld" && (${CC:[1]:H} != ${LD:[1]:H} || ${LD:[1]:T} != "ld") # Add -fuse-ld=${LD} if $LD is in a different directory or not called "ld". -# Note: Clang 12+ will prefer --ld-path= over -fuse-ld=. .if ${COMPILER_TYPE} == "clang" -# Note: unlike bsd.sys.mk we can't use LDFLAGS here since that is used for the -# flags required when linking the kernel. We don't need those flags when -# building the vdsos. However, we do need -fuse-ld, so use ${CCLDFLAGS} instead. -# Note: Clang does not like relative paths in -fuse-ld so we map ld.lld -> lld. -CCLDFLAGS+= -fuse-ld=${LD:[1]:S/^ld.//1W} +# Note: Clang does not like relative paths for ld so we map ld.lld -> lld. +.if ${COMPILER_VERSION} >= 120000 +LDFLAGS+= --ld-path=${LD:[1]:S/^ld.//1W} +.else +LDFLAGS+= -fuse-ld=${LD:[1]:S/^ld.//1W} +.endif .else # GCC does not support an absolute path for -fuse-ld so we just print this # warning instead and let the user add the required symlinks. +# However, we can avoid this warning if -B is set appropriately (e.g. for +# CROSS_TOOLCHAIN=...-gcc). +.if !(${LD:[1]:T} == "ld" && ${CC:tw:M-B${LD:[1]:H}/}) .warning LD (${LD}) is not the default linker for ${CC} but -fuse-ld= is not supported .endif .endif +.endif # Set target-specific linker emulation name. LD_EMULATION_aarch64=aarch64elf From owner-dev-commits-src-main@freebsd.org Thu Mar 4 18:44:10 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0499A55541C; Thu, 4 Mar 2021 18:44:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ds0Bx1Wqcz4h4k; Thu, 4 Mar 2021 18:44:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0E2C02268C; Thu, 4 Mar 2021 18:44:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 124Ii80W034988; Thu, 4 Mar 2021 18:44:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 124Ii8AU034987; Thu, 4 Mar 2021 18:44:08 GMT (envelope-from git) Date: Thu, 4 Mar 2021 18:44:08 GMT Message-Id: <202103041844.124Ii8AU034987@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: 6019514b0b53 - main - truss: split counting of syscalls and syscall calling convention MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6019514b0b53c3fc151868b88357405b6d67f308 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2021 18:44:11 -0000 The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=6019514b0b53c3fc151868b88357405b6d67f308 commit 6019514b0b53c3fc151868b88357405b6d67f308 Author: Alex Richardson AuthorDate: 2021-03-04 18:28:25 +0000 Commit: Alex Richardson CommitDate: 2021-03-04 18:30:02 +0000 truss: split counting of syscalls and syscall calling convention This change is a refactoring cleanup to improve support for compat32 syscalls (and compat64 on CHERI systems). Each process ABI now has it's own struct sycall instead of using one global list. The list of all syscalls is replaced with a list of seen syscalls. Looking up the syscall argument passing convention now interates over the fixed-size array instead of using a link-list that's populated on startup so we no longer need the init_syscall() function. The actual functional changes are in D27625. Reviewed By: jhb Differential Revision: https://reviews.freebsd.org/D27636 --- usr.bin/truss/main.c | 1 - usr.bin/truss/setup.c | 19 ++++++----- usr.bin/truss/syscall.h | 25 +++++++++----- usr.bin/truss/syscalls.c | 85 +++++++++++++++++++++++------------------------- 4 files changed, 67 insertions(+), 63 deletions(-) diff --git a/usr.bin/truss/main.c b/usr.bin/truss/main.c index c10301b6680d..1a3aae75be88 100644 --- a/usr.bin/truss/main.c +++ b/usr.bin/truss/main.c @@ -87,7 +87,6 @@ main(int ac, char **av) trussinfo->strsize = 32; trussinfo->curthread = NULL; LIST_INIT(&trussinfo->proclist); - init_syscalls(); while ((c = getopt(ac, av, "p:o:facedDs:SH")) != -1) { switch (c) { case 'p': /* specified pid */ diff --git a/usr.bin/truss/setup.c b/usr.bin/truss/setup.c index d21ec133f483..2ea1bce8919b 100644 --- a/usr.bin/truss/setup.c +++ b/usr.bin/truss/setup.c @@ -463,8 +463,8 @@ enter_syscall(struct trussinfo *info, struct threadinfo *t, fprintf(info->outfile, "-- UNKNOWN %s SYSCALL %d --\n", t->proc->abi->type, t->cs.number); - t->cs.nargs = sc->nargs; - assert(sc->nargs <= nitems(t->cs.s_args)); + t->cs.nargs = sc->decode.nargs; + assert(sc->decode.nargs <= nitems(t->cs.s_args)); t->cs.sc = sc; @@ -480,11 +480,12 @@ enter_syscall(struct trussinfo *info, struct threadinfo *t, #endif for (i = 0; i < t->cs.nargs; i++) { #if DEBUG - fprintf(stderr, "0x%lx%s", t->cs.args[sc->args[i].offset], + fprintf(stderr, "0x%lx%s", + t->cs.args[sc->decode.args[i].offset], i < (t->cs.nargs - 1) ? "," : ""); #endif - if (!(sc->args[i].type & OUT)) { - t->cs.s_args[i] = print_arg(&sc->args[i], + if (!(sc->decode.args[i].type & OUT)) { + t->cs.s_args[i] = print_arg(&sc->decode.args[i], t->cs.args, NULL, info); } } @@ -542,19 +543,19 @@ exit_syscall(struct trussinfo *info, struct ptrace_lwpinfo *pl) * Here, we only look for arguments that have OUT masked in -- * otherwise, they were handled in enter_syscall(). */ - for (i = 0; i < sc->nargs; i++) { + for (i = 0; i < sc->decode.nargs; i++) { char *temp; - if (sc->args[i].type & OUT) { + if (sc->decode.args[i].type & OUT) { /* * If an error occurred, then don't bother * getting the data; it may not be valid. */ if (psr.sr_error != 0) { asprintf(&temp, "0x%lx", - t->cs.args[sc->args[i].offset]); + t->cs.args[sc->decode.args[i].offset]); } else { - temp = print_arg(&sc->args[i], + temp = print_arg(&sc->decode.args[i], t->cs.args, psr.sr_retval, info); } t->cs.s_args[i] = temp; diff --git a/usr.bin/truss/syscall.h b/usr.bin/truss/syscall.h index af918fed4f1b..fc1630677242 100644 --- a/usr.bin/truss/syscall.h +++ b/usr.bin/truss/syscall.h @@ -218,18 +218,28 @@ enum Argtype { _Static_assert(ARG_MASK > MAX_ARG_TYPE, "ARG_MASK overlaps with Argtype values"); -struct syscall_args { +struct syscall_arg { enum Argtype type; int offset; }; +struct syscall_decode { + const char *name; /* Name for calling convention lookup. */ + /* + * Syscall return type: + * 0: no return value (e.g. exit) + * 1: normal return value (a single int/long/pointer) + * 2: off_t return value (two values for 32-bit ABIs) + */ + u_int ret_type; + u_int nargs; /* number of meaningful arguments */ + struct syscall_arg args[10]; /* Hopefully no syscalls with > 10 args */ +}; + struct syscall { STAILQ_ENTRY(syscall) entries; - const char *name; - u_int ret_type; /* 0, 1, or 2 return values */ - u_int nargs; /* actual number of meaningful arguments */ - /* Hopefully, no syscalls with > 10 args */ - struct syscall_args args[10]; + const char *name; /* Name to be displayed, might be malloc()'d */ + struct syscall_decode decode; struct timespec time; /* Time spent for this call */ int ncalls; /* Number of calls */ int nerror; /* Number of calls that returned with error */ @@ -237,7 +247,7 @@ struct syscall { }; struct syscall *get_syscall(struct threadinfo *, u_int, u_int); -char *print_arg(struct syscall_args *, unsigned long*, register_t *, +char *print_arg(struct syscall_arg *, unsigned long *, register_t *, struct trussinfo *); /* @@ -280,7 +290,6 @@ struct linux_socketcall_args { char args_l_[PADL_(l_ulong)]; l_ulong args; char args_r_[PADR_(l_ulong)]; }; -void init_syscalls(void); void print_syscall(struct trussinfo *); void print_syscall_ret(struct trussinfo *, int, register_t *); void print_summary(struct trussinfo *trussinfo); diff --git a/usr.bin/truss/syscalls.c b/usr.bin/truss/syscalls.c index f52a82ed97c0..91ddc65e457f 100644 --- a/usr.bin/truss/syscalls.c +++ b/usr.bin/truss/syscalls.c @@ -47,8 +47,10 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include +#include #include #define _WANT_FREEBSD11_STAT #include @@ -66,8 +68,6 @@ __FBSDID("$FreeBSD$"); #define _WANT_KERNEL_ERRNO #include #include -#include -#include #include #include #include @@ -85,8 +85,13 @@ __FBSDID("$FreeBSD$"); /* * This should probably be in its own file, sorted alphabetically. + * + * Note: We only scan this table on the initial syscall number to calling + * convention lookup, i.e. once each time a new syscall is encountered. This + * is unlikely to be a performance issue, but if it is we could sort this array + * and use a binary search instead. */ -static struct syscall decoded_syscalls[] = { +static const struct syscall_decode decoded_syscalls[] = { /* Native ABI */ { .name = "__acl_aclcheck_fd", .ret_type = 1, .nargs = 3, .args = { { Int, 0 }, { Acltype, 1 }, { Ptr, 2 } } }, @@ -706,10 +711,8 @@ static struct syscall decoded_syscalls[] = { { .name = "cloudabi_sys_thread_exit", .ret_type = 1, .nargs = 2, .args = { { Ptr, 0 }, { CloudABIMFlags, 1 } } }, { .name = "cloudabi_sys_thread_yield", .ret_type = 1, .nargs = 0 }, - - { .name = 0 }, }; -static STAILQ_HEAD(, syscall) syscalls; +static STAILQ_HEAD(, syscall) seen_syscalls; /* Xlat idea taken from strace */ struct xlat { @@ -969,7 +972,7 @@ print_mask_arg32(bool (*decoder)(FILE *, uint32_t, uint32_t *), FILE *fp, * decoding arguments. */ static void -quad_fixup(struct syscall *sc) +quad_fixup(struct syscall_decode *sc) { int offset, prev; u_int i; @@ -1007,20 +1010,6 @@ quad_fixup(struct syscall *sc) } #endif -void -init_syscalls(void) -{ - struct syscall *sc; - - STAILQ_INIT(&syscalls); - for (sc = decoded_syscalls; sc->name != NULL; sc++) { -#ifndef __LP64__ - quad_fixup(sc); -#endif - STAILQ_INSERT_HEAD(&syscalls, sc, entries); - } -} - static struct syscall * find_syscall(struct procabi *abi, u_int number) { @@ -1040,6 +1029,11 @@ add_syscall(struct procabi *abi, u_int number, struct syscall *sc) { struct extra_syscall *es; +#ifndef __LP64__ + /* FIXME: should be based on syscall ABI not truss ABI */ + quad_fixup(&sc->decode); +#endif + if (number < nitems(abi->syscalls)) { assert(abi->syscalls[number] == NULL); abi->syscalls[number] = sc; @@ -1049,6 +1043,8 @@ add_syscall(struct procabi *abi, u_int number, struct syscall *sc) es->number = number; STAILQ_INSERT_TAIL(&abi->extra_syscalls, es, entries); } + + STAILQ_INSERT_HEAD(&seen_syscalls, sc, entries); } /* @@ -1059,24 +1055,28 @@ struct syscall * get_syscall(struct threadinfo *t, u_int number, u_int nargs) { struct syscall *sc; + const char *sysdecode_name; const char *name; - char *new_name; u_int i; sc = find_syscall(t->proc->abi, number); if (sc != NULL) return (sc); - name = sysdecode_syscallname(t->proc->abi->abi, number); - if (name == NULL) { - asprintf(&new_name, "#%d", number); - name = new_name; - } else - new_name = NULL; - STAILQ_FOREACH(sc, &syscalls, entries) { - if (strcmp(name, sc->name) == 0) { + /* Memory is not explicitly deallocated, it's released on exit(). */ + sysdecode_name = sysdecode_syscallname(t->proc->abi->abi, number); + if (sysdecode_name == NULL) + asprintf(__DECONST(char **, &name), "#%d", number); + else + name = sysdecode_name; + + sc = calloc(1, sizeof(*sc)); + sc->name = name; + + for (i = 0; i < nitems(decoded_syscalls); i++) { + if (strcmp(name, decoded_syscalls[i].name) == 0) { + sc->decode = decoded_syscalls[i]; add_syscall(t->proc->abi, number, sc); - free(new_name); return (sc); } } @@ -1086,21 +1086,15 @@ get_syscall(struct threadinfo *t, u_int number, u_int nargs) fprintf(stderr, "unknown syscall %s -- setting args to %d\n", name, nargs); #endif - - sc = calloc(1, sizeof(struct syscall)); - sc->name = name; - if (new_name != NULL) - sc->unknown = true; - sc->ret_type = 1; - sc->nargs = nargs; + sc->unknown = sysdecode_name == NULL; + sc->decode.ret_type = 1; /* Assume 1 return value. */ + sc->decode.nargs = nargs; for (i = 0; i < nargs; i++) { - sc->args[i].offset = i; + sc->decode.args[i].offset = i; /* Treat all unknown arguments as LongHex. */ - sc->args[i].type = LongHex; + sc->decode.args[i].type = LongHex; } - STAILQ_INSERT_HEAD(&syscalls, sc, entries); add_syscall(t->proc->abi, number, sc); - return (sc); } @@ -1717,7 +1711,7 @@ print_sysctl(FILE *fp, int *oid, size_t len) * an array of all of the system call arguments. */ char * -print_arg(struct syscall_args *sc, unsigned long *args, register_t *retval, +print_arg(struct syscall_arg *sc, unsigned long *args, register_t *retval, struct trussinfo *trussinfo) { FILE *fp; @@ -2992,7 +2986,7 @@ print_syscall_ret(struct trussinfo *trussinfo, int error, register_t *retval) strerror(error)); } #ifndef __LP64__ - else if (sc->ret_type == 2) { + else if (sc->decode.ret_type == 2) { off_t off; #if _BYTE_ORDER == _LITTLE_ENDIAN @@ -3019,7 +3013,7 @@ print_summary(struct trussinfo *trussinfo) fprintf(trussinfo->outfile, "%-20s%15s%8s%8s\n", "syscall", "seconds", "calls", "errors"); ncall = nerror = 0; - STAILQ_FOREACH(sc, &syscalls, entries) + STAILQ_FOREACH(sc, &seen_syscalls, entries) { if (sc->ncalls) { fprintf(trussinfo->outfile, "%-20s%5jd.%09ld%8d%8d\n", sc->name, (intmax_t)sc->time.tv_sec, @@ -3028,6 +3022,7 @@ print_summary(struct trussinfo *trussinfo) ncall += sc->ncalls; nerror += sc->nerror; } + } fprintf(trussinfo->outfile, "%20s%15s%8s%8s\n", "", "-------------", "-------", "-------"); fprintf(trussinfo->outfile, "%-20s%5jd.%09ld%8d%8d\n", From owner-dev-commits-src-main@freebsd.org Thu Mar 4 18:57:59 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8E6485557C3; Thu, 4 Mar 2021 18:57:59 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ds0Vv3cxpz4jBQ; Thu, 4 Mar 2021 18:57:59 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from comporellon.tachypleus.net (unknown [IPv6:2601:405:4a00:acd:5d1e:c500:751e:7e8c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: nwhitehorn/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 14AD42F8E3; Thu, 4 Mar 2021 18:57:59 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Subject: Re: git: 2c26d77d989a - main - Remove /boot/efi from mtree, missed in 0b7472b3d8d2. To: rgrimes@freebsd.org, Emmanuel Vadot Cc: "Rodney W. Grimes" , Warner Losh , Brandon Bergren , Ed Maste , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202103041512.124FC8KV056114@gndrsh.dnsmgr.net> From: Nathan Whitehorn Message-ID: <11c7fc3b-3b94-c56f-5755-44a5cb7ab884@freebsd.org> Date: Thu, 4 Mar 2021 13:57:58 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: <202103041512.124FC8KV056114@gndrsh.dnsmgr.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2021 18:57:59 -0000 On 3/4/21 10:12 AM, Rodney W. Grimes wrote: >> On Thu, 4 Mar 2021 06:56:11 -0800 (PST) >> "Rodney W. Grimes" wrote: >> >>>> On 3/3/21 10:38 AM, Warner Losh wrote: >>>>> >>>>> On Wed, Mar 3, 2021 at 7:13 AM Nathan Whitehorn >>>>> > wrote: >>>>> >>>>> >>>>> >>>>> On 3/3/21 9:05 AM, Brandon Bergren wrote: >>>>> > On Wed, Mar 3, 2021, at 6:53 AM, Rodney W. Grimes wrote: >>>>> >> What am I missing here?? One place I am being told this is run in >>>>> >> an environment that may not even be an EFI booted system, and in >>>>> >> another place it is being used as a test if something is mounted >>>>> >> on it, which should only be true on an EFI booted system. >>>>> > That the script in question is a generic script that runs as >>>>> part of bsdinstall on every platform and has to be universal. >>>>> > >>>>> > The actual *problem* here is that >>>>> usr.sbin/bsdinstall/scripts/bootconfig has a default case that is >>>>> >? ? ? ? ? ? ? *)? ? ? ? ? die "Unsupported arch $(uname -m) for >>>>> UEFI install" >>>>> > >>>>> > which then causes the main script to bail out, leaving the >>>>> system in a half-installed state. >>>>> > >>>>> > If that had just been an exit 0 this would have never been a >>>>> problem, I suppose. >>>>> > >>>>> > Before the original change that broke this, there was a check >>>>> that the script was not running on powerpc or mips platforms >>>>> before running the efi bits, but this got taken out. >>>>> > >>>>> >>>>> Well, incidentally. The bootconfig script needs to know if there >>>>> is an >>>>> ESP it should configure, but the signalling mechanism (the >>>>> presence of >>>>> the ESP mount point) was being broken by mtree making that directory >>>>> unconditionally even on systems that don't use EFI. So then >>>>> bootconfig >>>>> tried to set it up, but failed later on, because there was no EFI >>>>> loader >>>>> to set up. The mtree change makes the ESP mount point only exist on >>>>> systems with an ESP. >>>>> >>>>> >>>>> So you made a unilateral change, without discussion of the bigger >>>>> design, to something without even asking the original person who made >>>>> the change to mtree about it for what sounds like an obscure case in >>>>> the installer that could be solved in a different way? It's trivial >>>>> enough to look at the boot method sysctl and skip the EFI update if we >>>>> didn't boot EFI (and if by change that's not on all systems, it's easy >>>>> enough to add it on all systems). I have no notion about why that >>>>> wasn't considered, at least, before jumping in and taking people by >>>>> surprise. >>> I still do not understand why machdep.bootmethod=EFI was rejected? >>> Is this value not present on ALL platforms that boot in EFI mode? >>> if exist(machdep.bootmethod) && machdep.bootmethod=EFI seems to >>> me to be the best and valid way to make this decision. If that >>> has issues working on a platform we need to fix that issue and not >>> do all this other stuff. >> We need to install and create the efi dir even if the installer is >> booted in CSM mode, so a user can switch to full uefi mode after and >> still can boot the FreeBSD that was installed. (The same thing must be >> done for bios boot code). > Ah, yes, ok, I see that issue, but isnt that driven by the fact > the user has selected GPT (EFI) in the disk menu, so could be > drive by an installer variable like any other aspect of the > installer? Passing around the users install parameters via > the file system is fragile as noted else where, this information > should be clearly avaliable within the installer script itself. > > The installer does not maintain state internally and system configuration is decoupled from partition editing to avoid precisely the kind of fragility you are worried about. -Nathan From owner-dev-commits-src-main@freebsd.org Thu Mar 4 19:29:07 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 116CF556B53; Thu, 4 Mar 2021 19:29:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ds1Bq018gz4ljm; Thu, 4 Mar 2021 19:29:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E784022BFA; Thu, 4 Mar 2021 19:29:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 124JT6EZ088794; Thu, 4 Mar 2021 19:29:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 124JT6oD088793; Thu, 4 Mar 2021 19:29:06 GMT (envelope-from git) Date: Thu, 4 Mar 2021 19:29:06 GMT Message-Id: <202103041929.124JT6oD088793@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 466df976babe - main - jail(8): reset to root cpuset before attaching to run commands MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 466df976babed65f8a8de9e36d7f016a444609af Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2021 19:29:07 -0000 The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=466df976babed65f8a8de9e36d7f016a444609af commit 466df976babed65f8a8de9e36d7f016a444609af Author: Kyle Evans AuthorDate: 2021-03-04 19:28:53 +0000 Commit: Kyle Evans CommitDate: 2021-03-04 19:28:53 +0000 jail(8): reset to root cpuset before attaching to run commands Recent changes have made it such that attaching to a jail will augment the attaching process' cpu mask with the jail's cpuset. While this is convenient for allowing the administrator to cpuset arbitrary programs that will attach to a jail, this is decidedly not convenient for executing long-running daemons during jail creation. This change inserts a reset of the process cpuset to the root cpuset between the fork and attach to execute a command. This allows commands executed to have the widest mask possible, and the administrator can cpuset(1) it back down inside the jail as needed. With this applied, one should be able to change a jail's cpuset at exec.poststart in addition to exec.created. The former was made difficult if jail(8) itself was running with a constrained set, as then some processes may have been spawned inside the jail with a non-root set. The latter is the preferred option so that processes starting in the jail are constrained appropriately up front. Note that all system commands are still run with the process' initial cpuset applied. PR: 253724 MFC after: 3 days Reviewed by: jamie Differential Revision: https://reviews.freebsd.org/D29008 --- usr.sbin/jail/command.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/usr.sbin/jail/command.c b/usr.sbin/jail/command.c index a5c1839849fd..c1d418d6cc69 100644 --- a/usr.sbin/jail/command.c +++ b/usr.sbin/jail/command.c @@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include @@ -84,6 +85,20 @@ static struct cfstring dummystring = { .len = 1 }; static struct phhead phash[PHASH_SIZE]; static int kq; +static cpusetid_t +root_cpuset_id(void) +{ + static cpusetid_t setid = CPUSET_INVALID; + static int error; + + /* Only try to get the cpuset once. */ + if (error == 0 && setid == CPUSET_INVALID) + error = cpuset_getid(CPU_LEVEL_ROOT, CPU_WHICH_PID, -1, &setid); + if (error != 0) + return (CPUSET_INVALID); + return (setid); +} + /* * Run the next command associated with a jail. */ @@ -283,6 +298,7 @@ run_command(struct cfjail *j) enum intparam comparam; size_t comlen; pid_t pid; + cpusetid_t setid; int argc, bg, clean, consfd, down, fib, i, injail, sjuser, timeout; #if defined(INET) || defined(INET6) char *addr, *extrap, *p, *val; @@ -632,6 +648,10 @@ run_command(struct cfjail *j) injail = comparam == IP_EXEC_START || comparam == IP_COMMAND || comparam == IP_EXEC_STOP; + if (injail) + setid = root_cpuset_id(); + else + setid = CPUSET_INVALID; clean = bool_param(j->intparams[IP_EXEC_CLEAN]); username = string_param(j->intparams[injail ? IP_EXEC_JAIL_USER : IP_EXEC_SYSTEM_USER]); @@ -700,6 +720,19 @@ run_command(struct cfjail *j) jail_warnx(j, "setfib: %s", strerror(errno)); exit(1); } + + /* + * We wouldn't have specialized our affinity, so just setid to + * root. We do this prior to attaching to avoid the kernel + * having to create a transient cpuset that we'll promptly + * free up with a reset to the jail's cpuset. + * + * This is just a best-effort to use as wide of mask as + * possible. + */ + if (setid != CPUSET_INVALID) + (void)cpuset_setid(CPU_WHICH_PID, -1, setid); + if (jail_attach(j->jid) < 0) { jail_warnx(j, "jail_attach: %s", strerror(errno)); exit(1); From owner-dev-commits-src-main@freebsd.org Thu Mar 4 19:57:04 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D85F0557AD4; Thu, 4 Mar 2021 19:57:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ds1q45F94z4pJG; Thu, 4 Mar 2021 19:57:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A59872336F; Thu, 4 Mar 2021 19:57:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 124Jv4mt027842; Thu, 4 Mar 2021 19:57:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 124Jv4kR027841; Thu, 4 Mar 2021 19:57:04 GMT (envelope-from git) Date: Thu, 4 Mar 2021 19:57:04 GMT Message-Id: <202103041957.124Jv4kR027841@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: f19323847ca8 - main - pf: Retrieve DSCP value from the IPv6 header MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f19323847ca894af8a58839f6a2a41691a8e2245 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2021 19:57:05 -0000 The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=f19323847ca894af8a58839f6a2a41691a8e2245 commit f19323847ca894af8a58839f6a2a41691a8e2245 Author: Kristof Provost AuthorDate: 2021-03-03 20:33:42 +0000 Commit: Kristof Provost CommitDate: 2021-03-04 19:56:48 +0000 pf: Retrieve DSCP value from the IPv6 header Teach pf to read the DSCP value from the IPv6 header so that we can match on them. Reviewed by: donner MFC after: 2 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D29048 --- sys/netpfil/pf/pf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 86354e69d11f..f71f89187b58 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -6384,7 +6384,7 @@ pf_test6(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, struct inpcb pd.sidx = (dir == PF_IN) ? 0 : 1; pd.didx = (dir == PF_IN) ? 1 : 0; pd.af = AF_INET6; - pd.tos = 0; + pd.tos = (ntohl(h->ip6_flow) >> 20) & 0xfc; pd.tot_len = ntohs(h->ip6_plen) + sizeof(struct ip6_hdr); off = ((caddr_t)h - m->m_data) + sizeof(struct ip6_hdr); From owner-dev-commits-src-main@freebsd.org Thu Mar 4 19:57:06 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5576F557D17; Thu, 4 Mar 2021 19:57:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ds1q570zSz4pJP; Thu, 4 Mar 2021 19:57:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D942D23262; Thu, 4 Mar 2021 19:57:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 124Jv5dZ027865; Thu, 4 Mar 2021 19:57:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 124Jv5FZ027864; Thu, 4 Mar 2021 19:57:05 GMT (envelope-from git) Date: Thu, 4 Mar 2021 19:57:05 GMT Message-Id: <202103041957.124Jv5FZ027864@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: bb4a7d94b99f - main - net: Introduce IPV6_DSCP(), IPV6_ECN() and IPV6_TRAFFIC_CLASS() macros MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bb4a7d94b99fbf7f59c876ffff8ded5f6a5b5c3e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2021 19:57:06 -0000 The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=bb4a7d94b99fbf7f59c876ffff8ded5f6a5b5c3e commit bb4a7d94b99fbf7f59c876ffff8ded5f6a5b5c3e Author: Kristof Provost AuthorDate: 2021-03-04 10:26:40 +0000 Commit: Kristof Provost CommitDate: 2021-03-04 19:56:48 +0000 net: Introduce IPV6_DSCP(), IPV6_ECN() and IPV6_TRAFFIC_CLASS() macros Introduce convenience macros to retrieve the DSCP, ECN or traffic class bits from an IPv6 header. Use them where appropriate. Reviewed by: ae (previous version), rscheff, tuexen, rgrimes MFC after: 2 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D29056 --- sys/net/altq/altq_subr.c | 2 +- sys/net/if_stf.c | 4 ++-- sys/netinet/ip6.h | 4 ++++ sys/netinet/tcp_input.c | 2 +- sys/netinet/tcp_lro.c | 2 +- sys/netinet/tcp_stacks/rack_bbr_common.c | 2 +- sys/netinet6/frag6.c | 5 ++--- sys/netinet6/in6_gif.c | 2 +- sys/netinet6/ip6_output.c | 4 ++-- sys/netinet6/sctp6_usrreq.c | 2 +- sys/netpfil/pf/pf.c | 2 +- 11 files changed, 17 insertions(+), 14 deletions(-) diff --git a/sys/net/altq/altq_subr.c b/sys/net/altq/altq_subr.c index 14d9916011da..39f91c4daf63 100644 --- a/sys/net/altq/altq_subr.c +++ b/sys/net/altq/altq_subr.c @@ -1087,7 +1087,7 @@ altq_extractflow(m, af, flow, filt_bmask) fin6->fi6_family = AF_INET6; fin6->fi6_proto = ip6->ip6_nxt; - fin6->fi6_tclass = (ntohl(ip6->ip6_flow) >> 20) & 0xff; + fin6->fi6_tclass = IPV6_TRAFFIC_CLASS(ip6); fin6->fi6_flowlabel = ip6->ip6_flow & htonl(0x000fffff); fin6->fi6_src = ip6->ip6_src; diff --git a/sys/net/if_stf.c b/sys/net/if_stf.c index c3f26db3f6e6..40f8a6f3a30a 100644 --- a/sys/net/if_stf.c +++ b/sys/net/if_stf.c @@ -455,7 +455,7 @@ stf_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, } } ip6 = mtod(m, struct ip6_hdr *); - tos = (ntohl(ip6->ip6_flow) >> 20) & 0xff; + tos = IPV6_TRAFFIC_CLASS(ip6); /* * Pickup the right outer dst addr from the list of candidates. @@ -665,7 +665,7 @@ in_stf_input(struct mbuf *m, int off, int proto, void *arg) return (IPPROTO_DONE); } - itos = (ntohl(ip6->ip6_flow) >> 20) & 0xff; + itos = IPV6_TRAFFIC_CLASS(ip6); if ((ifp->if_flags & IFF_LINK1) != 0) ip_ecn_egress(ECN_ALLOWED, &otos, &itos); else diff --git a/sys/netinet/ip6.h b/sys/netinet/ip6.h index 44c46fd3b71d..1bc79a98e689 100644 --- a/sys/netinet/ip6.h +++ b/sys/netinet/ip6.h @@ -106,6 +106,10 @@ struct ip6_hdr { #endif #define IPV6_FLOWLABEL_LEN 20 +#define IPV6_TRAFFIC_CLASS(ip6) ((ntohl((ip6)->ip6_flow) >> 20) & 0xff) +#define IPV6_DSCP(ip6) ((ntohl((ip6)->ip6_flow) >> 20) & 0xfc) +#define IPV6_ECN(ip6) ((ntohl((ip6)->ip6_flow) >> 20) & 0x03) + /* * Extension Headers */ diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index eda41d36ab88..89e70df48774 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -688,7 +688,7 @@ tcp_input(struct mbuf **mp, int *offp, int proto) /* XXX stat */ goto drop; } - iptos = (ntohl(ip6->ip6_flow) >> 20) & 0xff; + iptos = IPV6_TRAFFIC_CLASS(ip6); } #endif #if defined(INET) && defined(INET6) diff --git a/sys/netinet/tcp_lro.c b/sys/netinet/tcp_lro.c index b4d64b8a6893..62f6ad57c0f5 100644 --- a/sys/netinet/tcp_lro.c +++ b/sys/netinet/tcp_lro.c @@ -1546,7 +1546,7 @@ tcp_lro_rx2(struct lro_ctrl *lc, struct mbuf *m, uint32_t csum, int use_hash) return (error); tcp_data_len = ntohs(ip6->ip6_plen); #ifdef TCPHPTS - iptos = (ntohl(ip6->ip6_flow) >> 20) & 0xff; + iptos = IPV6_TRAFFIC_CLASS(ip6); #endif ip_len = sizeof(*ip6) + tcp_data_len; break; diff --git a/sys/netinet/tcp_stacks/rack_bbr_common.c b/sys/netinet/tcp_stacks/rack_bbr_common.c index e73a3e60fd64..b86a5d85fc76 100644 --- a/sys/netinet/tcp_stacks/rack_bbr_common.c +++ b/sys/netinet/tcp_stacks/rack_bbr_common.c @@ -334,7 +334,7 @@ skip_vnet: m_freem(m); goto skipped_pkt; } - iptos = (ntohl(ip6->ip6_flow) >> 20) & 0xff; + iptos = IPV6_TRAFFIC_CLASS(ip6); break; } #endif diff --git a/sys/netinet6/frag6.c b/sys/netinet6/frag6.c index f227930743b7..1903b01e03d4 100644 --- a/sys/netinet6/frag6.c +++ b/sys/netinet6/frag6.c @@ -554,8 +554,7 @@ frag6_input(struct mbuf **mp, int *offp, int proto) q6->ip6q_ttl = IPV6_FRAGTTL; q6->ip6q_src = ip6->ip6_src; q6->ip6q_dst = ip6->ip6_dst; - q6->ip6q_ecn = - (ntohl(ip6->ip6_flow) >> 20) & IPTOS_ECN_MASK; + q6->ip6q_ecn = IPV6_ECN(ip6); q6->ip6q_unfrglen = -1; /* The 1st fragment has not arrived. */ /* Add the fragemented packet to the bucket. */ @@ -688,7 +687,7 @@ frag6_input(struct mbuf **mp, int *offp, int proto) * if CE is set, do not lose CE. * Drop if CE and not-ECT are mixed for the same packet. */ - ecn = (ntohl(ip6->ip6_flow) >> 20) & IPTOS_ECN_MASK; + ecn = IPV6_ECN(ip6); ecn0 = q6->ip6q_ecn; if (ecn == IPTOS_ECN_CE) { if (ecn0 == IPTOS_ECN_NOTECT) { diff --git a/sys/netinet6/in6_gif.c b/sys/netinet6/in6_gif.c index 33cc06d065b8..54cb81c6130f 100644 --- a/sys/netinet6/in6_gif.c +++ b/sys/netinet6/in6_gif.c @@ -344,7 +344,7 @@ in6_gif_input(struct mbuf *m, int off, int proto, void *arg) gifp = GIF2IFP(sc); if ((gifp->if_flags & IFF_UP) != 0) { ip6 = mtod(m, struct ip6_hdr *); - ecn = (ntohl(ip6->ip6_flow) >> 20) & 0xff; + ecn = IPV6_TRAFFIC_CLASS(ip6); m_adj(m, off); gif_input(m, gifp, proto, ecn); } else { diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c index 58334788b05b..2b49a9f7c351 100644 --- a/sys/netinet6/ip6_output.c +++ b/sys/netinet6/ip6_output.c @@ -656,9 +656,9 @@ again: if (opt && opt->ip6po_tclass >= 0) { int mask = 0; - if ((ip6->ip6_flow & htonl(0xfc << 20)) == 0) + if (IPV6_DSCP(ip6) == 0) mask |= 0xfc; - if ((ip6->ip6_flow & htonl(0x03 << 20)) == 0) + if (IPV6_ECN(ip6) == 0) mask |= 0x03; if (mask != 0) ip6->ip6_flow |= htonl((opt->ip6po_tclass & mask) << 20); diff --git a/sys/netinet6/sctp6_usrreq.c b/sys/netinet6/sctp6_usrreq.c index b544d2975c6a..fcf15e4f81bf 100644 --- a/sys/netinet6/sctp6_usrreq.c +++ b/sys/netinet6/sctp6_usrreq.c @@ -141,7 +141,7 @@ sctp6_input_with_port(struct mbuf **i_pak, int *offp, uint16_t port) if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) { goto out; } - ecn_bits = ((ntohl(ip6->ip6_flow) >> 20) & 0x000000ff); + ecn_bits = IPV6_TRAFFIC_CLASS(ip6); if (m->m_pkthdr.csum_flags & CSUM_SCTP_VALID) { SCTP_STAT_INCR(sctps_recvhwcrc); compute_crc = 0; diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index f71f89187b58..c131f810b0ec 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -6384,7 +6384,7 @@ pf_test6(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, struct inpcb pd.sidx = (dir == PF_IN) ? 0 : 1; pd.didx = (dir == PF_IN) ? 1 : 0; pd.af = AF_INET6; - pd.tos = (ntohl(h->ip6_flow) >> 20) & 0xfc; + pd.tos = IPV6_DSCP(h); pd.tot_len = ntohs(h->ip6_plen) + sizeof(struct ip6_hdr); off = ((caddr_t)h - m->m_data) + sizeof(struct ip6_hdr); From owner-dev-commits-src-main@freebsd.org Thu Mar 4 19:58:35 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C458D557DF7; Thu, 4 Mar 2021 19:58:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ds1rq53wqz4phT; Thu, 4 Mar 2021 19:58:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A0A842337F; Thu, 4 Mar 2021 19:58:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 124JwZN2028193; Thu, 4 Mar 2021 19:58:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 124JwZIT028192; Thu, 4 Mar 2021 19:58:35 GMT (envelope-from git) Date: Thu, 4 Mar 2021 19:58:35 GMT Message-Id: <202103041958.124JwZIT028192@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 448732b8e2d9 - main - altq: Increase maximum number of CBQ and HFSC classes MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 448732b8e2d9bf4e2656a2e5a9e88cc58b88d4f4 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2021 19:58:35 -0000 The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=448732b8e2d9bf4e2656a2e5a9e88cc58b88d4f4 commit 448732b8e2d9bf4e2656a2e5a9e88cc58b88d4f4 Author: Kristof Provost AuthorDate: 2021-03-03 10:06:49 +0000 Commit: Kristof Provost CommitDate: 2021-03-04 19:58:22 +0000 altq: Increase maximum number of CBQ and HFSC classes In some configurations we need more classes than ALTQ supports by default. Increase the maximum number of classes we allow. This will only cost us a comparatively trivial amount of memory, so there's little reason not to do so. If ever we find we want even more we may want to consider turning these defines into a tunable, but for now do the easy thing. Reviewed by: donner@ MFC after: 2 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D29034 --- sys/net/altq/altq_cbq.h | 2 +- sys/net/altq/altq_hfsc.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/net/altq/altq_cbq.h b/sys/net/altq/altq_cbq.h index a319edb72e97..70c07c11d86d 100644 --- a/sys/net/altq/altq_cbq.h +++ b/sys/net/altq/altq_cbq.h @@ -119,7 +119,7 @@ typedef struct _cbq_class_stats_ { #define CBQ_TIMEOUT 10 #define CBQ_LS_TIMEOUT (20 * hz / 1000) -#define CBQ_MAX_CLASSES 256 +#define CBQ_MAX_CLASSES 2048 /* * Define State structures. diff --git a/sys/net/altq/altq_hfsc.h b/sys/net/altq/altq_hfsc.h index 9a4f14ae8fdc..6a3f2205c972 100644 --- a/sys/net/altq/altq_hfsc.h +++ b/sys/net/altq/altq_hfsc.h @@ -60,7 +60,7 @@ struct service_curve_v1 { /* special class handles */ #define HFSC_NULLCLASS_HANDLE 0 -#define HFSC_MAX_CLASSES 64 +#define HFSC_MAX_CLASSES 2048 /* hfsc class flags */ #define HFCF_RED 0x0001 /* use RED */ From owner-dev-commits-src-main@freebsd.org Thu Mar 4 20:05:44 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 76353557E7B; Thu, 4 Mar 2021 20:05:44 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ds2142sPfz4q3S; Thu, 4 Mar 2021 20:05:44 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from comporellon.tachypleus.net (unknown [IPv6:2601:405:4a00:acd:5d1e:c500:751e:7e8c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: nwhitehorn/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 0B3D25B6; Thu, 4 Mar 2021 20:05:44 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) To: Warner Losh Cc: Brandon Bergren , "Rodney W. Grimes" , Ed Maste , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202103031253.123CrxKG051357@gndrsh.dnsmgr.net> <14d09680-1036-4a7e-8a0e-c3063cac8bc9@www.fastmail.com> <6e52fee6-a2fd-584f-757e-e77a8f8ea8eb@freebsd.org> <91a51b75-9872-d202-53c0-fa1a21dc9cb3@freebsd.org> From: Nathan Whitehorn Subject: Re: git: 2c26d77d989a - main - Remove /boot/efi from mtree, missed in 0b7472b3d8d2. Message-ID: <5c413c07-ad22-01e1-ee45-35fbc04a4875@freebsd.org> Date: Thu, 4 Mar 2021 15:05:43 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Content-Language: en-US X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2021 20:05:44 -0000 On 3/3/21 5:25 PM, Warner Losh wrote: > > > On Wed, Mar 3, 2021 at 10:21 AM Nathan Whitehorn=20 > > wrote: > > > > On 3/3/21 11:53 AM, Warner Losh wrote: > > > > [clipping non-technical pre-history] > > > Thanks. re-reading it now, I think I was more grumpy than warranted.=20 > And for that I apologize. Thanks for omitting it from the rest of the=20 > thread. No worries, this happens, especially with the pandemic. I know I've=20 definitely been more prickly this year than normal... > > > >=C2=A0 =C2=A0 =C2=A0The installer *does* mount the partition in ad= vance, so checking > >=C2=A0 =C2=A0 =C2=A0whether > >=C2=A0 =C2=A0 =C2=A0there is a mounted file system is a perfectly = reasonable test to > >=C2=A0 =C2=A0 =C2=A0do. We > >=C2=A0 =C2=A0 =C2=A0could also check fstab. I would like to unders= tand what is > actually > >=C2=A0 =C2=A0 =C2=A0wrong here first, though. Especially after thi= s misfire -- > which is > >=C2=A0 =C2=A0 =C2=A0problematic for reasons that are still not cle= ar to me, since > >=C2=A0 =C2=A0 =C2=A0there are > >=C2=A0 =C2=A0 =C2=A0a number of standard directories in hier(7) no= t in mtree -- > I want to > >=C2=A0 =C2=A0 =C2=A0make sure we actually do have consensus about = what is > changing and > >=C2=A0 =C2=A0 =C2=A0why. > > > > > > At the top level, we default to having directories in mtree unles= s > > there's a good reason not to. We disagree as to whether the > installer > > should take the presence or absence of the directory as a strong > > enough reason to do something. I don't think that's a good reason= =2E > > > > But leaving that aside, let's say we=C2=A0wanted to reuse the ins= tall > boot > > part of the installer to update boot blocks as part of > installworld. > > If we can talk through that example w/o it in mtree, then we can > leave > > it out. The last time I worked through this, though, I thought I'= d > > talked myself into needing it. > > > Looking at bootconfig, we could use machdep.bootmethod to > determine if > > we need to update the ESP. If we didn't use that, then the ESP > > shouldn't be touched. This is, at the moment, x86 centric, but > could > > trivially be added to architectures (I'm happy to add it). This > would > > prevent the 'false positive' that's possible in cases where we've= > > installed UEFI then downgraded to BIOS because of some problem > (though > > purely in the context of the installer, I guess this isn't an > issue). > > Even with your approach, we'd bogusly update an ESP (though one > could > > argue you might want that). We could also change the code so that= > > 'unsupported' architectures just didn't update. This is why I thi= nk > > it's a bit fragile to rely only on the directory being present. I= t > > should have something mounted there. If you wanted to mkfs_dos=C2= =A0+ > mkdir > > efi at the top level, you could check for that directory if you > were > > looking for a flag, though that would still update on a BIOS > boot the > > ESP, and prevent false positives if run as part of an update. > > I think we would *want* to update an ESP that is mounted but not > currently being used. If I set up a dual BIOS/EFI-boot system for > some > reason and happened to install an update while booted from BIOS, I > would > be deeply astonished if my configured-by-the-installer EFI bootload= er > did not also get updated. > > > Yea, it's unclear to me what POLA here is, to be honest. Some of that=20 > is driven by a deep desire not to accidentally update USB drives that=20 > have a bootable image on them as well, so that may overly color my=20 > thinking. Agreed on all counts here. > (As an aside, I would also much rather the installer use an update > utility to set up the ESP than have the update utility use the > installer.) > > > Agreed. We can work towards that after the release. It would be better = > if we could accumulate the scripts from a number of different places,=20 > find a good way to make them callable from those places more easily=20 > and start to move that tribal knowledge back into the base system=20 > where it belongs, imho. Baptiste raised an important point years ago=20 > that we also need to think about doing that with a way to 'plug in'=20 > $NEWEST_CLOUD's packages, containers, layout such that they could=20 > provide the details and then the automation would just work with them=20 > too: image building, release customization, boot block update, etc. > > So here's a proposal, now that everyone is in the CC list: > - We add /boot/efi back to mtree, even though I find it kind of > weird to > have it there I think we're too close to the release to have a > conclusion on this. > - We have the installer check for either the ESP directory being an= > active mountpoint or being in the in-progress fstab, whichever is > easiest to implement (they are equivalent for the installer). > > > I'm OK with both of these points. If others are opposed to the first=20 > one, I'm willing to see how people react to it in the upgrade path=20 > before changing it again. We should get closure on Ed's proposed=20 > change here. I think it's good and should go in right after your=20 > changes. I'd start on your changes, and give people until the morning=20 > to pipe up with any objections. Here's a patch to do this: https://reviews.freebsd.org/D29068 It takes several hours to do the full test of building world, building=20 release ISOs, and running them through qemu, so it will be a while yet=20 before I feel comfortable committing. But it's a two-line diff and the=20 pieces worked independently, so the chances it works are pretty high.=20 Comments appreciated. > If that seems OK, I'll post another review for the change. > > > A long-term project I've had has been to try to update the boot > blocks > > as part of installworld or maybe as part of installboot. We have > > really poor reuse as a project in this area. Every little > > orchestration thing wrote its own thing, and all of them have > done it > > badly. I was hoping to be able to reuse this code, or modify the > > installer to use whatever we come up with there. As part of that,= I > > had talked myself into thinking we always needed /boot/efi, but I= 'm > > having trouble reconstructing why that is now though I know it > had to > > do with installed systems and bootstrapping issues... I know I wa= s > > worried about questions about 'why isn't /boot/efi on the system = by > > default so I can mount it' for people that have upgraded, but I > recall > > there was more to it than that. With it in mtree, an installworld= > > (even w/o an ESP update) would create it and people could mount > it w/o > > having to mkdir which they might make as $SOMETHING_ELSE. So I > guess > > that's a bit of a weak reason to absolutely require it in mtree. > > Thanks a lot for the explanation. I'm agreed entirely about the > problem > and the difficulty -- hopefully this set of changes helps at least.= > > > It does. It starts to get people to use the same mount point for the=20 > ESP and we can then constrain the problem a bit and where we can't=20 > constrain it we can parameterize it. > > As for mtree, I was imagining this as something like /home, which > is a > standard part of the system but isn't part of mtree since it > depends on > local-system policy. It's also different from /home in that we > *do* want > it to be a standard place for updates, of course. I think there's > really > not a ton of precedent either way: we don't have any other mount > points > in there for file systems that may or may not exist depending on > circumstances, as far as I can tell. My worry with having it in > mtree is > that having it exist but potentially be a directory rather than an > actual ESP requires that update tools be a little smarter and error= s > will be a little less obvious, since updates that don't pay enough > attention will be a bit more likely to splat files there assuming > there > is an ESP even if makes no sense. It's a weak consideration either > way, > I think. > > > Yea. After a few hours of reflection, I've found that I could go=20 > either way and am having trouble understanding why I was so dead set=20 > this morning on a particular way. Chalk it up to me being a little=20 > extra grumpy at surprise changes. > > This one seems less like local policy than /home, but there's still a=20 > local aspect: Do I mount by default, and where. I think we should=20 > always, though, have a fstab entry as we'll need to update it from=20 > time to time. Even Windows has a nominal drive that it uses to mount=20 > the ESP, even if it isn't mounted by default. That's used to update it = > when scripts and such need to do that (or if you're the victim of an=20 > upgrade script that did too much that now needs to be undone). I think = > we should be similar in that regard. This would also let us take the=20 > automation of updates to the next level if we can rely on some basic=20 > things. That makes sense to me. There's also still the issue of non-EFI systems, = that differ only by install-time configuration from non-EFI systems. One = of my worries of having /boot/efi always exist is that a non-EFI system=20 may try to "update" the EFI by poking around in the empty /boot/efi and=20 think it has updated/installed something useful but has in reality done=20 nothing. But it's a tricky situation all around. -Nathan > > Warner > > > > > > Warner > > From owner-dev-commits-src-main@freebsd.org Thu Mar 4 20:12:36 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4F781558A96; Thu, 4 Mar 2021 20:12:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ds2901n4Lz4rcx; Thu, 4 Mar 2021 20:12:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2FFAA237B4; Thu, 4 Mar 2021 20:12:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 124KCaxT054788; Thu, 4 Mar 2021 20:12:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 124KCaUT054787; Thu, 4 Mar 2021 20:12:36 GMT (envelope-from git) Date: Thu, 4 Mar 2021 20:12:36 GMT Message-Id: <202103042012.124KCaUT054787@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 19587d742264 - main - clang: Fix -gz=zlib options for linker MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 19587d742264c5caec33d218e9cea6eb78f6c6bb Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2021 20:12:36 -0000 The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=19587d742264c5caec33d218e9cea6eb78f6c6bb commit 19587d742264c5caec33d218e9cea6eb78f6c6bb Author: Ed Maste AuthorDate: 2021-03-03 01:35:57 +0000 Commit: Ed Maste CommitDate: 2021-03-04 20:10:03 +0000 clang: Fix -gz=zlib options for linker Clang commit ccb4124a4172bf2cb2e1cd7c253f0f1654fce294: Fix -gz=zlib options for linker gcc translates -gz=zlib to --compress-debug-options=zlib for both assembler and linker but clang only does this for assembler. The linker needs --compress-debug-options=zlib option to compress the debug sections in the generated executable or shared library. Due to this bug, -gz=zlib has no effect on the generated executable or shared library. This patch fixes that. Clang commit 462cf39a5c180621b56f7602270ce33eb7b68d23: [Driver] Fix -gz=zlib options for linker also on FreeBSD ccb4124a4172 fixed translating -gz=zlib to --compress-debug-sections for linker invocation for several ToolChains, but omitted FreeBSD. Approved by: dim MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D29028 --- .../clang/lib/Driver/ToolChains/AMDGPU.cpp | 1 + .../clang/lib/Driver/ToolChains/CommonArgs.cpp | 18 ++++++++++++++++++ .../clang/lib/Driver/ToolChains/CommonArgs.h | 4 ++++ .../clang/lib/Driver/ToolChains/FreeBSD.cpp | 1 + .../llvm-project/clang/lib/Driver/ToolChains/Gnu.cpp | 1 + .../llvm-project/clang/lib/Driver/ToolChains/HIP.cpp | 2 ++ 6 files changed, 27 insertions(+) diff --git a/contrib/llvm-project/clang/lib/Driver/ToolChains/AMDGPU.cpp b/contrib/llvm-project/clang/lib/Driver/ToolChains/AMDGPU.cpp index bc6d1fcd4a00..10ae76cb4161 100644 --- a/contrib/llvm-project/clang/lib/Driver/ToolChains/AMDGPU.cpp +++ b/contrib/llvm-project/clang/lib/Driver/ToolChains/AMDGPU.cpp @@ -350,6 +350,7 @@ void amdgpu::Linker::ConstructJob(Compilation &C, const JobAction &JA, std::string Linker = getToolChain().GetProgramPath(getShortName()); ArgStringList CmdArgs; + addLinkerCompressDebugSectionsOption(getToolChain(), Args, CmdArgs); AddLinkerInputs(getToolChain(), Inputs, Args, CmdArgs, JA); CmdArgs.push_back("-shared"); CmdArgs.push_back("-o"); diff --git a/contrib/llvm-project/clang/lib/Driver/ToolChains/CommonArgs.cpp b/contrib/llvm-project/clang/lib/Driver/ToolChains/CommonArgs.cpp index 6b6e276b8ce7..535154e492a7 100644 --- a/contrib/llvm-project/clang/lib/Driver/ToolChains/CommonArgs.cpp +++ b/contrib/llvm-project/clang/lib/Driver/ToolChains/CommonArgs.cpp @@ -214,6 +214,24 @@ void tools::AddLinkerInputs(const ToolChain &TC, const InputInfoList &Inputs, } } +void tools::addLinkerCompressDebugSectionsOption( + const ToolChain &TC, const llvm::opt::ArgList &Args, + llvm::opt::ArgStringList &CmdArgs) { + // GNU ld supports --compress-debug-sections=none|zlib|zlib-gnu|zlib-gabi + // whereas zlib is an alias to zlib-gabi. Therefore -gz=none|zlib|zlib-gnu + // are translated to --compress-debug-sections=none|zlib|zlib-gnu. + // -gz is not translated since ld --compress-debug-sections option requires an + // argument. + if (const Arg *A = Args.getLastArg(options::OPT_gz_EQ)) { + StringRef V = A->getValue(); + if (V == "none" || V == "zlib" || V == "zlib-gnu") + CmdArgs.push_back(Args.MakeArgString("--compress-debug-sections=" + V)); + else + TC.getDriver().Diag(diag::err_drv_unsupported_option_argument) + << A->getOption().getName() << V; + } +} + void tools::AddTargetFeature(const ArgList &Args, std::vector &Features, OptSpecifier OnOpt, OptSpecifier OffOpt, diff --git a/contrib/llvm-project/clang/lib/Driver/ToolChains/CommonArgs.h b/contrib/llvm-project/clang/lib/Driver/ToolChains/CommonArgs.h index 29dedec9b09c..0028ea0ca337 100644 --- a/contrib/llvm-project/clang/lib/Driver/ToolChains/CommonArgs.h +++ b/contrib/llvm-project/clang/lib/Driver/ToolChains/CommonArgs.h @@ -27,6 +27,10 @@ void AddLinkerInputs(const ToolChain &TC, const InputInfoList &Inputs, const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs, const JobAction &JA); +void addLinkerCompressDebugSectionsOption(const ToolChain &TC, + const llvm::opt::ArgList &Args, + llvm::opt::ArgStringList &CmdArgs); + void claimNoWarnArgs(const llvm::opt::ArgList &Args); bool addSanitizerRuntimes(const ToolChain &TC, const llvm::opt::ArgList &Args, diff --git a/contrib/llvm-project/clang/lib/Driver/ToolChains/FreeBSD.cpp b/contrib/llvm-project/clang/lib/Driver/ToolChains/FreeBSD.cpp index 909ac5e99212..6d8e25470e28 100644 --- a/contrib/llvm-project/clang/lib/Driver/ToolChains/FreeBSD.cpp +++ b/contrib/llvm-project/clang/lib/Driver/ToolChains/FreeBSD.cpp @@ -283,6 +283,7 @@ void freebsd::Linker::ConstructJob(Compilation &C, const JobAction &JA, bool NeedsSanitizerDeps = addSanitizerRuntimes(ToolChain, Args, CmdArgs); bool NeedsXRayDeps = addXRayRuntime(ToolChain, Args, CmdArgs); + addLinkerCompressDebugSectionsOption(ToolChain, Args, CmdArgs); AddLinkerInputs(ToolChain, Inputs, Args, CmdArgs, JA); if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nodefaultlibs)) { diff --git a/contrib/llvm-project/clang/lib/Driver/ToolChains/Gnu.cpp b/contrib/llvm-project/clang/lib/Driver/ToolChains/Gnu.cpp index c8a7fce07ef1..23e7a70f2fa7 100644 --- a/contrib/llvm-project/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/contrib/llvm-project/clang/lib/Driver/ToolChains/Gnu.cpp @@ -568,6 +568,7 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA, bool NeedsSanitizerDeps = addSanitizerRuntimes(ToolChain, Args, CmdArgs); bool NeedsXRayDeps = addXRayRuntime(ToolChain, Args, CmdArgs); + addLinkerCompressDebugSectionsOption(ToolChain, Args, CmdArgs); AddLinkerInputs(ToolChain, Inputs, Args, CmdArgs, JA); // The profile runtime also needs access to system libraries. getToolChain().addProfileRTLibs(Args, CmdArgs); diff --git a/contrib/llvm-project/clang/lib/Driver/ToolChains/HIP.cpp b/contrib/llvm-project/clang/lib/Driver/ToolChains/HIP.cpp index 7d17f809690e..228d970c4043 100644 --- a/contrib/llvm-project/clang/lib/Driver/ToolChains/HIP.cpp +++ b/contrib/llvm-project/clang/lib/Driver/ToolChains/HIP.cpp @@ -88,6 +88,8 @@ void AMDGCN::Linker::constructLldCommand(Compilation &C, const JobAction &JA, if (C.getDriver().isSaveTempsEnabled()) LldArgs.push_back("-save-temps"); + addLinkerCompressDebugSectionsOption(TC, Args, LldArgs); + LldArgs.append({"-o", Output.getFilename()}); for (auto Input : Inputs) LldArgs.push_back(Input.getFilename()); From owner-dev-commits-src-main@freebsd.org Thu Mar 4 21:00:07 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D1B4155A1F8; Thu, 4 Mar 2021 21:00:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ds3Cq5bk7z4vJR; Thu, 4 Mar 2021 21:00:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A99E823E60; Thu, 4 Mar 2021 21:00:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 124L0739012202; Thu, 4 Mar 2021 21:00:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 124L076x012199; Thu, 4 Mar 2021 21:00:07 GMT (envelope-from git) Date: Thu, 4 Mar 2021 21:00:07 GMT Message-Id: <202103042100.124L076x012199@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 0d3b3beeb253 - main - riscv: fix errors in some atomic type aliases MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0d3b3beeb253e09b2b6b3805065594aecc7e2c2f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Mar 2021 21:00:07 -0000 The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=0d3b3beeb253e09b2b6b3805065594aecc7e2c2f commit 0d3b3beeb253e09b2b6b3805065594aecc7e2c2f Author: Mitchell Horne AuthorDate: 2021-03-04 17:52:45 +0000 Commit: Mitchell Horne CommitDate: 2021-03-04 20:59:58 +0000 riscv: fix errors in some atomic type aliases This appears to be a copy-and-paste error that has simply been overlooked. The tree contains only two calls to any of the affected variants, but recent additions to the test suite started exercising the call to atomic_clear_rel_int() in ng_leave_write(), reliably causing panics. Apparently, the issue was inherited from the arm64 atomic header. That instance was addressed in c90baf6817a0, but the fix did not make its way to RISC-V. Note that the particular test case ng_macfilter_test:main still appears to fail on this platform, but this change reduces the panic to a timeout. PR: 253237 Reported by: Jenkins, arichardson Reviewed by: kp, arichardson MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D29064 --- sys/riscv/include/atomic.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/riscv/include/atomic.h b/sys/riscv/include/atomic.h index d08047593861..d743fce6f1ff 100644 --- a/sys/riscv/include/atomic.h +++ b/sys/riscv/include/atomic.h @@ -288,7 +288,7 @@ atomic_store_rel_32(volatile uint32_t *p, uint32_t val) #define atomic_subtract_acq_int atomic_subtract_acq_32 #define atomic_add_rel_int atomic_add_rel_32 -#define atomic_clear_rel_int atomic_add_rel_32 +#define atomic_clear_rel_int atomic_clear_rel_32 #define atomic_cmpset_rel_int atomic_cmpset_rel_32 #define atomic_fcmpset_rel_int atomic_fcmpset_rel_32 #define atomic_set_rel_int atomic_set_rel_32 @@ -490,7 +490,7 @@ atomic_store_rel_64(volatile uint64_t *p, uint64_t val) } #define atomic_add_acq_long atomic_add_acq_64 -#define atomic_clear_acq_long atomic_add_acq_64 +#define atomic_clear_acq_long atomic_clear_acq_64 #define atomic_cmpset_acq_long atomic_cmpset_acq_64 #define atomic_fcmpset_acq_long atomic_fcmpset_acq_64 #define atomic_load_acq_long atomic_load_acq_64 @@ -498,7 +498,7 @@ atomic_store_rel_64(volatile uint64_t *p, uint64_t val) #define atomic_subtract_acq_long atomic_subtract_acq_64 #define atomic_add_acq_ptr atomic_add_acq_64 -#define atomic_clear_acq_ptr atomic_add_acq_64 +#define atomic_clear_acq_ptr atomic_clear_acq_64 #define atomic_cmpset_acq_ptr atomic_cmpset_acq_64 #define atomic_fcmpset_acq_ptr atomic_fcmpset_acq_64 #define atomic_load_acq_ptr atomic_load_acq_64 From owner-dev-commits-src-main@freebsd.org Fri Mar 5 03:46:33 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3317E5645C2; Fri, 5 Mar 2021 03:46:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DsDDn0ysDz3L8B; Fri, 5 Mar 2021 03:46:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 145B21753; Fri, 5 Mar 2021 03:46:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1253kWLq050047; Fri, 5 Mar 2021 03:46:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1253kW7I050046; Fri, 5 Mar 2021 03:46:32 GMT (envelope-from git) Date: Fri, 5 Mar 2021 03:46:32 GMT Message-Id: <202103050346.1253kW7I050046@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: ff6a7e4ba6bf - main - ktls: Fix CBC encryption when input and output iov sizes are different MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ff6a7e4ba6bf8be9ead9e1bc5537709243390654 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2021 03:46:33 -0000 The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ff6a7e4ba6bf8be9ead9e1bc5537709243390654 commit ff6a7e4ba6bf8be9ead9e1bc5537709243390654 Author: Mark Johnston AuthorDate: 2021-03-05 03:45:40 +0000 Commit: Mark Johnston CommitDate: 2021-03-05 03:45:40 +0000 ktls: Fix CBC encryption when input and output iov sizes are different Reported by: gallatin Tested by: gallatin Fixes: 49f6925ca Differential Revision: https://reviews.freebsd.org/D29073 --- sys/opencrypto/ktls_ocf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/opencrypto/ktls_ocf.c b/sys/opencrypto/ktls_ocf.c index 31d787c2b61b..7414e26bb3e2 100644 --- a/sys/opencrypto/ktls_ocf.c +++ b/sys/opencrypto/ktls_ocf.c @@ -298,8 +298,8 @@ ktls_ocf_tls_cbc_encrypt(struct ktls_session *tls, memcpy(crp.crp_iv, hdr + 1, AES_BLOCK_LEN); crypto_use_uio(&crp, &uio); if (!inplace) { - memcpy(out_iov, outiov, sizeof(*iniov) * outiovcnt); - out_iov[outiovcnt] = iov[outiovcnt + 1]; + memcpy(out_iov, outiov, sizeof(*outiov) * outiovcnt); + out_iov[outiovcnt] = iov[iniovcnt + 1]; out_uio.uio_iov = out_iov; out_uio.uio_iovcnt = outiovcnt + 1; out_uio.uio_offset = 0; From owner-dev-commits-src-main@freebsd.org Fri Mar 5 06:29:34 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2BED5567EAF; Fri, 5 Mar 2021 06:29:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DsHrt0kpjz3jKt; Fri, 5 Mar 2021 06:29:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0BD84379F; Fri, 5 Mar 2021 06:29:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1256TXvF062152; Fri, 5 Mar 2021 06:29:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1256TXDc062151; Fri, 5 Mar 2021 06:29:33 GMT (envelope-from git) Date: Fri, 5 Mar 2021 06:29:33 GMT Message-Id: <202103050629.1256TXDc062151@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Wei Hu Subject: git: 80f39bd95f22 - main - Hyper-V: hn: Store host hash value in flowid MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: whu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 80f39bd95f22322152709ea5fae3a3c546044c9c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2021 06:29:34 -0000 The branch main has been updated by whu: URL: https://cgit.FreeBSD.org/src/commit/?id=80f39bd95f22322152709ea5fae3a3c546044c9c commit 80f39bd95f22322152709ea5fae3a3c546044c9c Author: Wei Hu AuthorDate: 2021-02-24 05:07:46 +0000 Commit: Wei Hu CommitDate: 2021-03-05 04:46:54 +0000 Hyper-V: hn: Store host hash value in flowid When rx packet contains hash value sent from host, store it in the mbuf's flowid field so when the same mbuf is on the tx path, the hash value can be used by the host to determine the outgoing network queue. MFC after: 2 weeks Sponsored by: Microsoft --- sys/dev/hyperv/netvsc/if_hn.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/sys/dev/hyperv/netvsc/if_hn.c b/sys/dev/hyperv/netvsc/if_hn.c index 5a57ea796d0e..9243ff226f5b 100644 --- a/sys/dev/hyperv/netvsc/if_hn.c +++ b/sys/dev/hyperv/netvsc/if_hn.c @@ -3077,13 +3077,24 @@ hn_encap(struct ifnet *ifp, struct hn_tx_ring *txr, struct hn_txdesc *txd, if (txr->hn_tx_flags & HN_TX_FLAG_HASHVAL) { /* - * Set the hash value for this packet, so that the host could - * dispatch the TX done event for this packet back to this TX - * ring's channel. + * Set the hash value for this packet. */ pi_data = hn_rndis_pktinfo_append(pkt, HN_RNDIS_PKT_LEN, HN_NDIS_HASH_VALUE_SIZE, HN_NDIS_PKTINFO_TYPE_HASHVAL); - *pi_data = txr->hn_tx_idx; + + if (M_HASHTYPE_ISHASH(m_head)) + /* + * The flowid field contains the hash value host + * set in the rx queue if it is a ip forwarding pkt. + * Set the same hash value so host can send on the + * cpu it was received. + */ + *pi_data = m_head->m_pkthdr.flowid; + else + /* + * Otherwise just put the tx queue index. + */ + *pi_data = txr->hn_tx_idx; } if (m_head->m_flags & M_VLANTAG) { From owner-dev-commits-src-main@freebsd.org Fri Mar 5 08:22:04 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9F276552902; Fri, 5 Mar 2021 08:22:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DsLLh3w1xz3pPf; Fri, 5 Mar 2021 08:22:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 793495179; Fri, 5 Mar 2021 08:22:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1258M4Un020586; Fri, 5 Mar 2021 08:22:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1258M414020585; Fri, 5 Mar 2021 08:22:04 GMT (envelope-from git) Date: Fri, 5 Mar 2021 08:22:04 GMT Message-Id: <202103050822.1258M414020585@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 29698ed90473 - main - pf: Mark struct pf_pdesc as kernel only MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 29698ed904737ebfd139a21e39e5421cf81badd8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2021 08:22:04 -0000 The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=29698ed904737ebfd139a21e39e5421cf81badd8 commit 29698ed904737ebfd139a21e39e5421cf81badd8 Author: Kristof Provost AuthorDate: 2021-03-03 09:28:14 +0000 Commit: Kristof Provost CommitDate: 2021-03-05 08:21:06 +0000 pf: Mark struct pf_pdesc as kernel only This structure is only used by the kernel module internally. It's not shared with user space, so hide it behind #ifdef _KERNEL. Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/net/pfvar.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index 9c8c642a6ace..3f2075b8f0e2 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -893,6 +893,7 @@ struct pfi_kkif { #define PFI_IFLAG_REFS 0x0001 /* has state references */ #define PFI_IFLAG_SKIP 0x0100 /* skip filtering on interface */ +#ifdef _KERNEL struct pf_pdesc { struct { int done; @@ -932,6 +933,7 @@ struct pf_pdesc { u_int8_t sidx; /* key index for source */ u_int8_t didx; /* key index for destination */ }; +#endif /* flags for RDR options */ #define PF_DPORT_RANGE 0x01 /* Dest port uses range */ From owner-dev-commits-src-main@freebsd.org Fri Mar 5 08:32:15 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C3662552A29; Fri, 5 Mar 2021 08:32:15 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DsLZR5Fnyz3pV1; Fri, 5 Mar 2021 08:32:15 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.codepro.be", Issuer "R3" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id 91957662D; Fri, 5 Mar 2021 08:32:15 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id 10010493ED; Fri, 5 Mar 2021 09:32:13 +0100 (CET) From: "Kristof Provost" To: "John Baldwin" Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: a079e38b08f2 - main - ossl: Add Poly1305 digest support. Date: Fri, 05 Mar 2021 09:32:12 +0100 X-Mailer: MailMate (1.13.2r5673) Message-ID: <4EB11ECA-1788-49D2-9362-09D955C8D695@FreeBSD.org> In-Reply-To: <202103032321.123NLOKb093507@gitrepo.freebsd.org> References: <202103032321.123NLOKb093507@gitrepo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; format=flowed Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2021 08:32:15 -0000 On 4 Mar 2021, at 0:21, John Baldwin wrote: > The branch main has been updated by jhb: > > URL: = > https://cgit.FreeBSD.org/src/commit/?id=3Da079e38b08f2f07c50ba915dae66d= 099559abdcc > > commit a079e38b08f2f07c50ba915dae66d099559abdcc > Author: John Baldwin > AuthorDate: 2021-03-03 23:17:29 +0000 > Commit: John Baldwin > CommitDate: 2021-03-03 23:20:57 +0000 > > ossl: Add Poly1305 digest support. > > Reviewed by: cem > Sponsored by: Netflix > Differential Revision: https://reviews.freebsd.org/D28754 It looks like this broke the LINT builds: linking kernel ld: error: duplicate symbol: Poly1305_Final >>> defined at ossl_poly1305.c >>> ossl_poly1305.o:(Poly1305_Final) >>> defined at xform_poly1305.c >>> xform_poly1305.o:(.text+0xA0) ld: error: duplicate symbol: Poly1305_Init >>> defined at ossl_poly1305.c >>> ossl_poly1305.o:(Poly1305_Init) >>> defined at xform_poly1305.c >>> xform_poly1305.o:(.text+0x0) ld: error: duplicate symbol: Poly1305_Update >>> defined at ossl_poly1305.c >>> ossl_poly1305.o:(Poly1305_Update) >>> defined at xform_poly1305.c >>> xform_poly1305.o:(.text+0x60) ld: warning: common OPENSSL_ia32cap_P is overridden ld: warning: common OPENSSL_ia32cap_P is overridden ld: warning: common OPENSSL_ia32cap_P is overridden ld: warning: common OPENSSL_ia32cap_P is overridden ld: warning: common OPENSSL_ia32cap_P is overridden *** [kernel] Error code 1 (See also = https://ci.freebsd.org/job/FreeBSD-main-aarch64-LINT/6074/console ) Best regards Kristof From owner-dev-commits-src-main@freebsd.org Fri Mar 5 08:41:59 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2169A552FA8; Fri, 5 Mar 2021 08:41:59 +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 4DsLnf4K4lz3qSS; Fri, 5 Mar 2021 08:41:58 +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 1258ftJG058855; Fri, 5 Mar 2021 00:41:55 -0800 (PST) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 1258ftai058854; Fri, 5 Mar 2021 00:41:55 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202103050841.1258ftai058854@gndrsh.dnsmgr.net> Subject: Re: git: 2c26d77d989a - main - Remove /boot/efi from mtree, missed in 0b7472b3d8d2. In-Reply-To: <5c413c07-ad22-01e1-ee45-35fbc04a4875@freebsd.org> To: Nathan Whitehorn Date: Fri, 5 Mar 2021 00:41:55 -0800 (PST) CC: Warner Losh , Brandon Bergren , "Rodney W. Grimes" , Ed Maste , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org 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: 4DsLnf4K4lz3qSS X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2021 08:41:59 -0000 > On 3/3/21 5:25 PM, Warner Losh wrote: > > > > > > On Wed, Mar 3, 2021 at 10:21 AM Nathan Whitehorn > > > wrote: > > > > > > > > On 3/3/21 11:53 AM, Warner Losh wrote: > > > > > > > [clipping non-technical pre-history] > > > > > > Thanks. re-reading it now, I think I was more grumpy than warranted. > > And for that I apologize. Thanks for omitting it from the rest of the > > thread. > > No worries, this happens, especially with the pandemic. I know I've > definitely been more prickly this year than normal... > > > > > > >? ? ?The installer *does* mount the partition in advance, so checking > > >? ? ?whether > > >? ? ?there is a mounted file system is a perfectly reasonable test to > > >? ? ?do. We > > >? ? ?could also check fstab. I would like to understand what is > > actually > > >? ? ?wrong here first, though. Especially after this misfire -- > > which is > > >? ? ?problematic for reasons that are still not clear to me, since > > >? ? ?there are > > >? ? ?a number of standard directories in hier(7) not in mtree -- > > I want to > > >? ? ?make sure we actually do have consensus about what is > > changing and > > >? ? ?why. > > > > > > > > > At the top level, we default to having directories in mtree unless > > > there's a good reason not to. We disagree as to whether the > > installer > > > should take the presence or absence of the directory as a strong > > > enough reason to do something. I don't think that's a good reason. > > > > > > But leaving that aside, let's say we?wanted to reuse the install > > boot > > > part of the installer to update boot blocks as part of > > installworld. > > > If we can talk through that example w/o it in mtree, then we can > > leave > > > it out. The last time I worked through this, though, I thought I'd > > > talked myself into needing it. > > > > > Looking at bootconfig, we could use machdep.bootmethod to > > determine if > > > we need to update the ESP. If we didn't use that, then the ESP > > > shouldn't be touched. This is, at the moment, x86 centric, but > > could > > > trivially be added to architectures (I'm happy to add it). This > > would > > > prevent the 'false positive' that's possible in cases where we've > > > installed UEFI then downgraded to BIOS because of some problem > > (though > > > purely in the context of the installer, I guess this isn't an > > issue). > > > Even with your approach, we'd bogusly update an ESP (though one > > could > > > argue you might want that). We could also change the code so that > > > 'unsupported' architectures just didn't update. This is why I think > > > it's a bit fragile to rely only on the directory being present. It > > > should have something mounted there. If you wanted to mkfs_dos?+ > > mkdir > > > efi at the top level, you could check for that directory if you > > were > > > looking for a flag, though that would still update on a BIOS > > boot the > > > ESP, and prevent false positives if run as part of an update. > > > > I think we would *want* to update an ESP that is mounted but not > > currently being used. If I set up a dual BIOS/EFI-boot system for > > some > > reason and happened to install an update while booted from BIOS, I > > would > > be deeply astonished if my configured-by-the-installer EFI bootloader > > did not also get updated. > > > > > > Yea, it's unclear to me what POLA here is, to be honest. Some of that > > is driven by a deep desire not to accidentally update USB drives that > > have a bootable image on them as well, so that may overly color my > > thinking. > > Agreed on all counts here. > > > (As an aside, I would also much rather the installer use an update > > utility to set up the ESP than have the update utility use the > > installer.) > > > > > > Agreed. We can work towards that after the release. It would be better > > if we could accumulate the scripts from a number of different places, > > find a good way to make them callable from those places more easily > > and start to move that tribal knowledge back into the base system > > where it belongs, imho. Baptiste raised an important point years ago > > that we also need to think about doing that with a way to 'plug in' > > $NEWEST_CLOUD's packages, containers, layout such that they could > > provide the details and then the automation would just work with them > > too: image building, release customization, boot block update, etc. > > > > So here's a proposal, now that everyone is in the CC list: > > - We add /boot/efi back to mtree, even though I find it kind of > > weird to > > have it there I think we're too close to the release to have a > > conclusion on this. > > - We have the installer check for either the ESP directory being an > > active mountpoint or being in the in-progress fstab, whichever is > > easiest to implement (they are equivalent for the installer). > > > > > > I'm OK with both of these points. If others are opposed to the first > > one, I'm willing to see how people react to it in the upgrade path > > before changing it again. We should get closure on Ed's proposed > > change here. I think it's good and should go in right after your > > changes. I'd start on your changes, and give people until the morning > > to pipe up with any objections. > Here's a patch to do this: > https://reviews.freebsd.org/D29068 > > It takes several hours to do the full test of building world, building > release ISOs, and running them through qemu, so it will be a while yet > before I feel comfortable committing. But it's a two-line diff and the > pieces worked independently, so the chances it works are pretty high. > Comments appreciated. > > > If that seems OK, I'll post another review for the change. > > > > > A long-term project I've had has been to try to update the boot > > blocks > > > as part of installworld or maybe as part of installboot. We have > > > really poor reuse as a project in this area. Every little > > > orchestration thing wrote its own thing, and all of them have > > done it > > > badly. I was hoping to be able to reuse this code, or modify the > > > installer to use whatever we come up with there. As part of that, I > > > had talked myself into thinking we always needed /boot/efi, but I'm > > > having trouble reconstructing why that is now though I know it > > had to > > > do with installed systems and bootstrapping issues... I know I was > > > worried about questions about 'why isn't /boot/efi on the system by > > > default so I can mount it' for people that have upgraded, but I > > recall > > > there was more to it than that. With it in mtree, an installworld > > > (even w/o an ESP update) would create it and people could mount > > it w/o > > > having to mkdir which they might make as $SOMETHING_ELSE. So I > > guess > > > that's a bit of a weak reason to absolutely require it in mtree. > > > > Thanks a lot for the explanation. I'm agreed entirely about the > > problem > > and the difficulty -- hopefully this set of changes helps at least. > > > > > > It does. It starts to get people to use the same mount point for the > > ESP and we can then constrain the problem a bit and where we can't > > constrain it we can parameterize it. > > > > As for mtree, I was imagining this as something like /home, which > > is a > > standard part of the system but isn't part of mtree since it > > depends on > > local-system policy. It's also different from /home in that we > > *do* want > > it to be a standard place for updates, of course. I think there's > > really > > not a ton of precedent either way: we don't have any other mount > > points > > in there for file systems that may or may not exist depending on > > circumstances, as far as I can tell. My worry with having it in > > mtree is > > that having it exist but potentially be a directory rather than an > > actual ESP requires that update tools be a little smarter and errors > > will be a little less obvious, since updates that don't pay enough > > attention will be a bit more likely to splat files there assuming > > there > > is an ESP even if makes no sense. It's a weak consideration either > > way, > > I think. > > > > > > Yea. After a few hours of reflection, I've found that I could go > > either way and am having trouble understanding why I was so dead set > > this morning on a particular way. Chalk it up to me being a little > > extra grumpy at surprise changes. > > > > This one seems less like local policy than /home, but there's still a > > local aspect: Do I mount by default, and where. I think we should > > always, though, have a fstab entry as we'll need to update it from > > time to time. Even Windows has a nominal drive that it uses to mount > > the ESP, even if it isn't mounted by default. That's used to update it > > when scripts and such need to do that (or if you're the victim of an > > upgrade script that did too much that now needs to be undone). I think > > we should be similar in that regard. This would also let us take the > > automation of updates to the next level if we can rely on some basic > > things. > > That makes sense to me. There's also still the issue of non-EFI systems, > that differ only by install-time configuration from non-EFI systems. One > of my worries of having /boot/efi always exist is that a non-EFI system > may try to "update" the EFI by poking around in the empty /boot/efi and > think it has updated/installed something useful but has in reality done > nothing. But it's a tricky situation all around. I would think that during an update, which for me implies a system that is booted and running, that the definative answer to "are we an EFI system that needs to update EFI code" is infact machdep.bootmethod=EFI. Existance/absence of a directory, or an entry in /etc/fstab is a poor quality indicator. Is it even possible to create a dual mode installed FreeBSD system that boots in either BIOS or EFI mode? I know we do that for the installed media, but that is hybrid media, and I do not think that the bsdinstall can create such an installation on a disk. > -Nathan > > Warner > > > Warner -- Rod Grimes rgrimes@freebsd.org From owner-dev-commits-src-main@freebsd.org Fri Mar 5 08:53:34 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C8204553919; Fri, 5 Mar 2021 08:53:34 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mx.blih.net (mx.blih.net [212.83.155.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mx.blih.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DsM3200mMz3rJ5; Fri, 5 Mar 2021 08:53:33 +0000 (UTC) (envelope-from manu@bidouilliste.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bidouilliste.com; s=mx; t=1614934411; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=k+JMNTn3thk5l1RTBuiFOxEOd+kqrT/KICi8iFnBwIA=; b=ptyf/M7sV40kA3QU1aWFNbjVC4xDq/Hp1GLTTmouGMuu/yicPFNVi9hXYh8J4a5OrDlwpY cK2x41doOMf6vFOPatMrgDU+7untlzwAtXEDC1hV0cvcQdHU2NdWRJKELOraZX33th4aoX p+FvS+mUqL3Lq+weZRgKMLbBieHmWNs= Received: from amy (lfbn-idf2-1-644-4.w86-247.abo.wanadoo.fr [86.247.100.4]) by mx.blih.net (OpenSMTPD) with ESMTPSA id 93120cc0 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 5 Mar 2021 08:53:31 +0000 (UTC) Date: Fri, 5 Mar 2021 09:53:31 +0100 From: Emmanuel Vadot To: rgrimes@freebsd.org Cc: "Rodney W. Grimes" , Nathan Whitehorn , Warner Losh , Brandon Bergren , Ed Maste , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 2c26d77d989a - main - Remove /boot/efi from mtree, missed in 0b7472b3d8d2. Message-Id: <20210305095331.5cbcc0897bdb1221b3440c81@bidouilliste.com> In-Reply-To: <202103050841.1258ftai058854@gndrsh.dnsmgr.net> References: <5c413c07-ad22-01e1-ee45-35fbc04a4875@freebsd.org> <202103050841.1258ftai058854@gndrsh.dnsmgr.net> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd14.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4DsM3200mMz3rJ5 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2021 08:53:34 -0000 On Fri, 5 Mar 2021 00:41:55 -0800 (PST) "Rodney W. Grimes" wrote: > > On 3/3/21 5:25 PM, Warner Losh wrote: > > > > > > > > > On Wed, Mar 3, 2021 at 10:21 AM Nathan Whitehorn > > > > wrote: > > > > > > > > > > > > On 3/3/21 11:53 AM, Warner Losh wrote: > > > > > > > > > > [clipping non-technical pre-history] > > > > > > > > > Thanks. re-reading it now, I think I was more grumpy than warranted. > > > And for that I apologize. Thanks for omitting it from the rest of the > > > thread. > > > > No worries, this happens, especially with the pandemic. I know I've > > definitely been more prickly this year than normal... > > > > > > > > > >? ? ?The installer *does* mount the partition in advance, so checking > > > >? ? ?whether > > > >? ? ?there is a mounted file system is a perfectly reasonable test to > > > >? ? ?do. We > > > >? ? ?could also check fstab. I would like to understand what is > > > actually > > > >? ? ?wrong here first, though. Especially after this misfire -- > > > which is > > > >? ? ?problematic for reasons that are still not clear to me, since > > > >? ? ?there are > > > >? ? ?a number of standard directories in hier(7) not in mtree -- > > > I want to > > > >? ? ?make sure we actually do have consensus about what is > > > changing and > > > >? ? ?why. > > > > > > > > > > > > At the top level, we default to having directories in mtree unless > > > > there's a good reason not to. We disagree as to whether the > > > installer > > > > should take the presence or absence of the directory as a strong > > > > enough reason to do something. I don't think that's a good reason. > > > > > > > > But leaving that aside, let's say we?wanted to reuse the install > > > boot > > > > part of the installer to update boot blocks as part of > > > installworld. > > > > If we can talk through that example w/o it in mtree, then we can > > > leave > > > > it out. The last time I worked through this, though, I thought I'd > > > > talked myself into needing it. > > > > > > > Looking at bootconfig, we could use machdep.bootmethod to > > > determine if > > > > we need to update the ESP. If we didn't use that, then the ESP > > > > shouldn't be touched. This is, at the moment, x86 centric, but > > > could > > > > trivially be added to architectures (I'm happy to add it). This > > > would > > > > prevent the 'false positive' that's possible in cases where we've > > > > installed UEFI then downgraded to BIOS because of some problem > > > (though > > > > purely in the context of the installer, I guess this isn't an > > > issue). > > > > Even with your approach, we'd bogusly update an ESP (though one > > > could > > > > argue you might want that). We could also change the code so that > > > > 'unsupported' architectures just didn't update. This is why I think > > > > it's a bit fragile to rely only on the directory being present. It > > > > should have something mounted there. If you wanted to mkfs_dos?+ > > > mkdir > > > > efi at the top level, you could check for that directory if you > > > were > > > > looking for a flag, though that would still update on a BIOS > > > boot the > > > > ESP, and prevent false positives if run as part of an update. > > > > > > I think we would *want* to update an ESP that is mounted but not > > > currently being used. If I set up a dual BIOS/EFI-boot system for > > > some > > > reason and happened to install an update while booted from BIOS, I > > > would > > > be deeply astonished if my configured-by-the-installer EFI bootloader > > > did not also get updated. > > > > > > > > > Yea, it's unclear to me what POLA here is, to be honest. Some of that > > > is driven by a deep desire not to accidentally update USB drives that > > > have a bootable image on them as well, so that may overly color my > > > thinking. > > > > Agreed on all counts here. > > > > > (As an aside, I would also much rather the installer use an update > > > utility to set up the ESP than have the update utility use the > > > installer.) > > > > > > > > > Agreed. We can work towards that after the release. It would be better > > > if we could accumulate the scripts from a number of different places, > > > find a good way to make them callable from those places more easily > > > and start to move that tribal knowledge back into the base system > > > where it belongs, imho. Baptiste raised an important point years ago > > > that we also need to think about doing that with a way to 'plug in' > > > $NEWEST_CLOUD's packages, containers, layout such that they could > > > provide the details and then the automation would just work with them > > > too: image building, release customization, boot block update, etc. > > > > > > So here's a proposal, now that everyone is in the CC list: > > > - We add /boot/efi back to mtree, even though I find it kind of > > > weird to > > > have it there I think we're too close to the release to have a > > > conclusion on this. > > > - We have the installer check for either the ESP directory being an > > > active mountpoint or being in the in-progress fstab, whichever is > > > easiest to implement (they are equivalent for the installer). > > > > > > > > > I'm OK with both of these points. If others are opposed to the first > > > one, I'm willing to see how people react to it in the upgrade path > > > before changing it again. We should get closure on Ed's proposed > > > change here. I think it's good and should go in right after your > > > changes. I'd start on your changes, and give people until the morning > > > to pipe up with any objections. > > Here's a patch to do this: > > https://reviews.freebsd.org/D29068 > > > > It takes several hours to do the full test of building world, building > > release ISOs, and running them through qemu, so it will be a while yet > > before I feel comfortable committing. But it's a two-line diff and the > > pieces worked independently, so the chances it works are pretty high. > > Comments appreciated. > > > > > If that seems OK, I'll post another review for the change. > > > > > > > A long-term project I've had has been to try to update the boot > > > blocks > > > > as part of installworld or maybe as part of installboot. We have > > > > really poor reuse as a project in this area. Every little > > > > orchestration thing wrote its own thing, and all of them have > > > done it > > > > badly. I was hoping to be able to reuse this code, or modify the > > > > installer to use whatever we come up with there. As part of that, I > > > > had talked myself into thinking we always needed /boot/efi, but I'm > > > > having trouble reconstructing why that is now though I know it > > > had to > > > > do with installed systems and bootstrapping issues... I know I was > > > > worried about questions about 'why isn't /boot/efi on the system by > > > > default so I can mount it' for people that have upgraded, but I > > > recall > > > > there was more to it than that. With it in mtree, an installworld > > > > (even w/o an ESP update) would create it and people could mount > > > it w/o > > > > having to mkdir which they might make as $SOMETHING_ELSE. So I > > > guess > > > > that's a bit of a weak reason to absolutely require it in mtree. > > > > > > Thanks a lot for the explanation. I'm agreed entirely about the > > > problem > > > and the difficulty -- hopefully this set of changes helps at least. > > > > > > > > > It does. It starts to get people to use the same mount point for the > > > ESP and we can then constrain the problem a bit and where we can't > > > constrain it we can parameterize it. > > > > > > As for mtree, I was imagining this as something like /home, which > > > is a > > > standard part of the system but isn't part of mtree since it > > > depends on > > > local-system policy. It's also different from /home in that we > > > *do* want > > > it to be a standard place for updates, of course. I think there's > > > really > > > not a ton of precedent either way: we don't have any other mount > > > points > > > in there for file systems that may or may not exist depending on > > > circumstances, as far as I can tell. My worry with having it in > > > mtree is > > > that having it exist but potentially be a directory rather than an > > > actual ESP requires that update tools be a little smarter and errors > > > will be a little less obvious, since updates that don't pay enough > > > attention will be a bit more likely to splat files there assuming > > > there > > > is an ESP even if makes no sense. It's a weak consideration either > > > way, > > > I think. > > > > > > > > > Yea. After a few hours of reflection, I've found that I could go > > > either way and am having trouble understanding why I was so dead set > > > this morning on a particular way. Chalk it up to me being a little > > > extra grumpy at surprise changes. > > > > > > This one seems less like local policy than /home, but there's still a > > > local aspect: Do I mount by default, and where. I think we should > > > always, though, have a fstab entry as we'll need to update it from > > > time to time. Even Windows has a nominal drive that it uses to mount > > > the ESP, even if it isn't mounted by default. That's used to update it > > > when scripts and such need to do that (or if you're the victim of an > > > upgrade script that did too much that now needs to be undone). I think > > > we should be similar in that regard. This would also let us take the > > > automation of updates to the next level if we can rely on some basic > > > things. > > > > That makes sense to me. There's also still the issue of non-EFI systems, > > that differ only by install-time configuration from non-EFI systems. One > > of my worries of having /boot/efi always exist is that a non-EFI system > > may try to "update" the EFI by poking around in the empty /boot/efi and > > think it has updated/installed something useful but has in reality done > > nothing. But it's a tricky situation all around. > > I would think that during an update, which for me implies a > system that is booted and running, that the definative answer > to "are we an EFI system that needs to update EFI code" is > infact machdep.bootmethod=EFI. Existance/absence of a directory, > or an entry in /etc/fstab is a poor quality indicator. No, again we should update every boot method for the arch so a user can change the machine boot method and still boot. > Is it even possible to create a dual mode installed FreeBSD > system that boots in either BIOS or EFI mode? I know we do that > for the installed media, but that is hybrid media, and I do > not think that the bsdinstall can create such an installation > on a disk. Of course it is, I use that on all my test machines and bsdinstall does that correctly. > > -Nathan > > > Warner > > > > Warner > -- > Rod Grimes rgrimes@freebsd.org -- Emmanuel Vadot From owner-dev-commits-src-main@freebsd.org Fri Mar 5 09:03:47 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AEF2F553BB2; Fri, 5 Mar 2021 09:03:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DsMGq4cl7z3rtw; Fri, 5 Mar 2021 09:03:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 91A40593D; Fri, 5 Mar 2021 09:03:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 12593lfe073769; Fri, 5 Mar 2021 09:03:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 12593lSp073768; Fri, 5 Mar 2021 09:03:47 GMT (envelope-from git) Date: Fri, 5 Mar 2021 09:03:47 GMT Message-Id: <202103050903.12593lSp073768@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andriy Gapon Subject: git: 5084dde5f087 - main - pchtherm: fix a wrong bit and a wrong register use MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: avg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5084dde5f087264cf9a826569d1152c65d88a0fe Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2021 09:03:47 -0000 The branch main has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=5084dde5f087264cf9a826569d1152c65d88a0fe commit 5084dde5f087264cf9a826569d1152c65d88a0fe Author: Michal Vanco AuthorDate: 2021-03-05 08:55:30 +0000 Commit: Andriy Gapon CommitDate: 2021-03-05 09:01:28 +0000 pchtherm: fix a wrong bit and a wrong register use Probably just copy-paste errors that slipped in. PR: 253915 Reported by: Michal Vanco MFC after: 1 week --- sys/dev/intel/pchtherm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/intel/pchtherm.c b/sys/dev/intel/pchtherm.c index 13f0abc54b63..31d06a1bc26a 100644 --- a/sys/dev/intel/pchtherm.c +++ b/sys/dev/intel/pchtherm.c @@ -163,7 +163,7 @@ static int pchtherm_attach(device_t dev) bus_write_1(sc->tbar, PCHTHERM_REG_TSEL, PCHTHERM_GEN_ENABLE); sc->enable = bus_read_1(sc->tbar, PCHTHERM_REG_TSEL); - if (!(sc->enable & PCHTHERM_REG_TSEL)){ + if (!(sc->enable & PCHTHERM_GEN_ENABLE)) { device_printf(dev, "Sensor enable failed\n"); return 0; } @@ -178,7 +178,7 @@ static int pchtherm_attach(device_t dev) if (bootverbose) { FLAG_PRINT(dev, "SMBus report", val); } - val = bus_read_1(sc->tbar, PCHTHERM_REG_TSC); + val = bus_read_1(sc->tbar, PCHTHERM_REG_TSMIC); if (bootverbose) { FLAG_PRINT(dev, "SMI on alert", val); } From owner-dev-commits-src-main@freebsd.org Fri Mar 5 11:23:57 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 202C75577C4; Fri, 5 Mar 2021 11:23:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DsQNY0Nhsz4X23; Fri, 5 Mar 2021 11:23:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 001667721; Fri, 5 Mar 2021 11:23:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 125BNuQk059015; Fri, 5 Mar 2021 11:23:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 125BNubR059014; Fri, 5 Mar 2021 11:23:56 GMT (envelope-from git) Date: Fri, 5 Mar 2021 11:23:56 GMT Message-Id: <202103051123.125BNubR059014@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Moeller Subject: git: c4ba4aa54718 - main - libifconfig: Overhaul ifconfig_media_* interfaces MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: freqlabs X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c4ba4aa547184ab401204096cdad9def4ab37964 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2021 11:23:57 -0000 The branch main has been updated by freqlabs: URL: https://cgit.FreeBSD.org/src/commit/?id=c4ba4aa547184ab401204096cdad9def4ab37964 commit c4ba4aa547184ab401204096cdad9def4ab37964 Author: Ryan Moeller AuthorDate: 2021-03-02 10:29:17 +0000 Commit: Ryan Moeller CommitDate: 2021-03-05 09:15:55 +0000 libifconfig: Overhaul ifconfig_media_* interfaces Define an ifmedia_t type to use for ifmedia words. Add ifconfig_media_lookup_* functions to lookup ifmedia words by name. Get media options as an array of option names rather than formatting it as a comma-delimited list into a buffer. Sprinkle const on static the static description tables for peace of mind. Don't need to zero memory allocated by calloc. Reviewed by: kp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D29029 --- lib/libifconfig/Makefile | 2 +- lib/libifconfig/Symbol.map | 9 +- lib/libifconfig/libifconfig.h | 69 +++++++- lib/libifconfig/libifconfig_media.c | 339 ++++++++++++++++++++++++------------ share/examples/libifconfig/status.c | 27 ++- 5 files changed, 324 insertions(+), 122 deletions(-) diff --git a/lib/libifconfig/Makefile b/lib/libifconfig/Makefile index 73dad36c1dc5..c6f006018427 100644 --- a/lib/libifconfig/Makefile +++ b/lib/libifconfig/Makefile @@ -7,7 +7,7 @@ INTERNALLIB= true LIBADD= m SHLIBDIR?= /lib -SHLIB_MAJOR= 1 +SHLIB_MAJOR= 2 VERSION_DEF= ${LIBCSRCDIR}/Versions.def SYMBOL_MAPS= ${.CURDIR}/Symbol.map diff --git a/lib/libifconfig/Symbol.map b/lib/libifconfig/Symbol.map index 235092376b11..2d80fb31652a 100644 --- a/lib/libifconfig/Symbol.map +++ b/lib/libifconfig/Symbol.map @@ -26,12 +26,17 @@ FBSD_1.6 { ifconfig_lagg_get_lagg_status; ifconfig_lagg_get_laggport_status; ifconfig_list_cloners; + ifconfig_media_get_downreason; ifconfig_media_get_mediareq; - ifconfig_media_get_options_string; + ifconfig_media_get_mode; + ifconfig_media_get_options; ifconfig_media_get_status; ifconfig_media_get_subtype; ifconfig_media_get_type; - ifconfig_media_get_downreason; + ifconfig_media_lookup_mode; + ifconfig_media_lookup_options; + ifconfig_media_lookup_subtype; + ifconfig_media_lookup_type; ifconfig_open; ifconfig_set_capability; ifconfig_set_description; diff --git a/lib/libifconfig/libifconfig.h b/lib/libifconfig/libifconfig.h index d8245ea13b23..e1cd6d1821a5 100644 --- a/lib/libifconfig/libifconfig.h +++ b/lib/libifconfig/libifconfig.h @@ -202,10 +202,73 @@ int ifconfig_get_ifstatus(ifconfig_handle_t *h, const char *name, */ int ifconfig_media_get_mediareq(ifconfig_handle_t *h, const char *name, struct ifmediareq **ifmr); -const char *ifconfig_media_get_type(int ifmw); -const char *ifconfig_media_get_subtype(int ifmw); + const char *ifconfig_media_get_status(const struct ifmediareq *ifmr); -void ifconfig_media_get_options_string(int ifmw, char *buf, size_t buflen); + +typedef int ifmedia_t; + +#define INVALID_IFMEDIA ((ifmedia_t)-1) + +/** Retrieve the name of a media type + * @param media The media to be named + * @return A pointer to the media type name, or NULL on failure + */ +const char *ifconfig_media_get_type(ifmedia_t media); + +/** Retrieve a media type by its name + * @param name The name of a media type + * @return The media type value, or INVALID_IFMEDIA on failure + */ +ifmedia_t ifconfig_media_lookup_type(const char *name); + +/** Retrieve the name of a media subtype + * @param media The media subtype to be named + * @return A pointer to the media subtype name, or NULL on failure + */ +const char *ifconfig_media_get_subtype(ifmedia_t media); + +/** Retrieve a media subtype by its name + * @param media The top level media type whose subtype we want + * @param name The name of a media subtype + * @return The media subtype value, or INVALID_IFMEDIA on failure + */ +ifmedia_t ifconfig_media_lookup_subtype(ifmedia_t media, const char *name); + +/** Retrieve the name of a media mode + * @param media The media mode to be named + * @return A pointer to the media mode name, or NULL on failure + */ +const char *ifconfig_media_get_mode(ifmedia_t media); + +/** Retrieve a media mode by its name + * @param media The top level media type whose mode we want + * @param name The name of a media mode + * @return The media mode value, or INVALID_IFMEDIA on failure + */ +ifmedia_t ifconfig_media_lookup_mode(ifmedia_t media, const char *name); + +/** Retrieve an array of media options + * @param media The media for which to obtain the options + * @return Pointer to an array of pointers to option names, + * terminated by a NULL pointer, or simply NULL on failure. + * The caller is responsible for freeing the array but not its + * contents. + */ +const char **ifconfig_media_get_options(ifmedia_t media); + +/** Retrieve an array of media options by names + * @param media The top level media type whose options we want + * @param opts Pointer to an array of string pointers naming options + * @param nopts Number of elements in the opts array + * @return Pointer to an array of media options, one for each option named + * in opts. NULL is returned instead with errno set to ENOMEM if + * allocating the return array fails or EINVAL if media is not + * valid. A media option in the array will be INVALID_IFMEDIA + * when lookup failed for the option named in that position in + * opts. The caller is responsible for freeing the array. + */ +ifmedia_t *ifconfig_media_lookup_options(ifmedia_t media, const char **opts, + size_t nopts); /** Retrieve the reason the interface is down * @param h An open ifconfig state object diff --git a/lib/libifconfig/libifconfig_media.c b/lib/libifconfig/libifconfig_media.c index d7ef507604be..e27f5900e3d3 100644 --- a/lib/libifconfig/libifconfig_media.c +++ b/lib/libifconfig/libifconfig_media.c @@ -45,6 +45,7 @@ #include #include #include +#include #include #include #include @@ -53,11 +54,9 @@ #include "libifconfig.h" #include "libifconfig_internal.h" - -static struct ifmedia_description *get_toptype_desc(int); -static struct ifmedia_type_to_subtype *get_toptype_ttos(int); -static struct ifmedia_description *get_subtype_desc(int, - struct ifmedia_type_to_subtype *ttos); +static const struct ifmedia_description *lookup_media_desc( + const struct ifmedia_description *, const char *); +static const struct ifmedia_type_to_subtype *get_toptype_ttos(ifmedia_t); #define IFM_OPMODE(x) \ ((x) & (IFM_IEEE80211_ADHOC | IFM_IEEE80211_HOSTAP | \ @@ -65,74 +64,100 @@ static struct ifmedia_description *get_subtype_desc(int, IFM_IEEE80211_MBSS)) #define IFM_IEEE80211_STA 0 -static struct ifmedia_description ifm_type_descriptions[] = +static const struct ifmedia_description + ifm_type_descriptions[] = IFM_TYPE_DESCRIPTIONS; -static struct ifmedia_description ifm_subtype_ethernet_descriptions[] = +static const struct ifmedia_description + ifm_subtype_ethernet_descriptions[] = IFM_SUBTYPE_ETHERNET_DESCRIPTIONS; -static struct ifmedia_description ifm_subtype_ethernet_aliases[] = +static const struct ifmedia_description + ifm_subtype_ethernet_aliases[] = IFM_SUBTYPE_ETHERNET_ALIASES; -static struct ifmedia_description ifm_subtype_ethernet_option_descriptions[] = +static const struct ifmedia_description + ifm_subtype_ethernet_option_descriptions[] = IFM_SUBTYPE_ETHERNET_OPTION_DESCRIPTIONS; -static struct ifmedia_description ifm_subtype_ieee80211_descriptions[] = +static const struct ifmedia_description + ifm_subtype_ieee80211_descriptions[] = IFM_SUBTYPE_IEEE80211_DESCRIPTIONS; -static struct ifmedia_description ifm_subtype_ieee80211_aliases[] = +static const struct ifmedia_description + ifm_subtype_ieee80211_aliases[] = IFM_SUBTYPE_IEEE80211_ALIASES; -static struct ifmedia_description ifm_subtype_ieee80211_option_descriptions[] = +static const struct ifmedia_description + ifm_subtype_ieee80211_option_descriptions[] = IFM_SUBTYPE_IEEE80211_OPTION_DESCRIPTIONS; -static struct ifmedia_description ifm_subtype_ieee80211_mode_descriptions[] = +static const struct ifmedia_description + ifm_subtype_ieee80211_mode_descriptions[] = IFM_SUBTYPE_IEEE80211_MODE_DESCRIPTIONS; -static struct ifmedia_description ifm_subtype_ieee80211_mode_aliases[] = +static const struct ifmedia_description + ifm_subtype_ieee80211_mode_aliases[] = IFM_SUBTYPE_IEEE80211_MODE_ALIASES; -static struct ifmedia_description ifm_subtype_atm_descriptions[] = +static const struct ifmedia_description + ifm_subtype_atm_descriptions[] = IFM_SUBTYPE_ATM_DESCRIPTIONS; -static struct ifmedia_description ifm_subtype_atm_aliases[] = +static const struct ifmedia_description + ifm_subtype_atm_aliases[] = IFM_SUBTYPE_ATM_ALIASES; -static struct ifmedia_description ifm_subtype_atm_option_descriptions[] = +static const struct ifmedia_description + ifm_subtype_atm_option_descriptions[] = IFM_SUBTYPE_ATM_OPTION_DESCRIPTIONS; -static struct ifmedia_description ifm_subtype_shared_descriptions[] = +static const struct ifmedia_description + ifm_subtype_shared_descriptions[] = IFM_SUBTYPE_SHARED_DESCRIPTIONS; -static struct ifmedia_description ifm_subtype_shared_aliases[] = +static const struct ifmedia_description + ifm_subtype_shared_aliases[] = IFM_SUBTYPE_SHARED_ALIASES; -static struct ifmedia_description ifm_shared_option_descriptions[] = +static const struct ifmedia_description + ifm_shared_option_descriptions[] = IFM_SHARED_OPTION_DESCRIPTIONS; -static struct ifmedia_description ifm_shared_option_aliases[] = +static const struct ifmedia_description + ifm_shared_option_aliases[] = IFM_SHARED_OPTION_ALIASES; +static const struct ifmedia_description * +lookup_media_desc(const struct ifmedia_description *desc, const char *name) +{ + + for (; desc->ifmt_string != NULL; ++desc) + if (strcasecmp(desc->ifmt_string, name) == 0) + return (desc); + return (NULL); +} + struct ifmedia_type_to_subtype { struct { - struct ifmedia_description *desc; - int alias; + const struct ifmedia_description *desc; + bool alias; } subtypes[5]; struct { - struct ifmedia_description *desc; - int alias; + const struct ifmedia_description *desc; + bool alias; } options[4]; struct { - struct ifmedia_description *desc; - int alias; + const struct ifmedia_description *desc; + bool alias; } modes[3]; }; /* must be in the same order as IFM_TYPE_DESCRIPTIONS */ -static struct ifmedia_type_to_subtype ifmedia_types_to_subtypes[] = +static const struct ifmedia_type_to_subtype ifmedia_types_to_subtypes[] = { { { @@ -192,83 +217,214 @@ static struct ifmedia_type_to_subtype ifmedia_types_to_subtypes[] = }, }; -static struct ifmedia_description * -get_toptype_desc(int ifmw) +static const struct ifmedia_type_to_subtype * +get_toptype_ttos(ifmedia_t media) { - struct ifmedia_description *desc; + const struct ifmedia_description *desc; + const struct ifmedia_type_to_subtype *ttos; - for (desc = ifm_type_descriptions; desc->ifmt_string != NULL; desc++) { - if (IFM_TYPE(ifmw) == desc->ifmt_word) { - break; - } + for (desc = ifm_type_descriptions, ttos = ifmedia_types_to_subtypes; + desc->ifmt_string != NULL; desc++, ttos++) { + if (IFM_TYPE(media) == desc->ifmt_word) + return (ttos); } - - return (desc); + errno = ENOENT; + return (NULL); } -static struct ifmedia_type_to_subtype * -get_toptype_ttos(int ifmw) +const char * +ifconfig_media_get_type(ifmedia_t media) { - struct ifmedia_description *desc; - struct ifmedia_type_to_subtype *ttos; + const struct ifmedia_description *desc; - for (desc = ifm_type_descriptions, ttos = ifmedia_types_to_subtypes; - desc->ifmt_string != NULL; desc++, ttos++) { - if (IFM_TYPE(ifmw) == desc->ifmt_word) { - break; - } + for (desc = ifm_type_descriptions; desc->ifmt_string != NULL; ++desc) { + if (IFM_TYPE(media) == desc->ifmt_word) + return (desc->ifmt_string); } + errno = ENOENT; + return (NULL); +} + +ifmedia_t +ifconfig_media_lookup_type(const char *name) +{ + const struct ifmedia_description *desc; - return (ttos); + desc = lookup_media_desc(ifm_type_descriptions, name); + return (desc == NULL ? INVALID_IFMEDIA : desc->ifmt_word); } -static struct ifmedia_description * -get_subtype_desc(int ifmw, - struct ifmedia_type_to_subtype *ttos) +const char * +ifconfig_media_get_subtype(ifmedia_t media) { - int i; - struct ifmedia_description *desc; + const struct ifmedia_description *desc; + const struct ifmedia_type_to_subtype *ttos; + + ttos = get_toptype_ttos(media); + if (ttos == NULL) { + errno = EINVAL; + return (NULL); + } - for (i = 0; ttos->subtypes[i].desc != NULL; i++) { - if (ttos->subtypes[i].alias) { + for (size_t i = 0; ttos->subtypes[i].desc != NULL; ++i) { + if (ttos->subtypes[i].alias) continue; - } for (desc = ttos->subtypes[i].desc; - desc->ifmt_string != NULL; desc++) { - if (IFM_SUBTYPE(ifmw) == desc->ifmt_word) { - return (desc); - } + desc->ifmt_string != NULL; ++desc) { + if (IFM_SUBTYPE(media) == desc->ifmt_word) + return (desc->ifmt_string); } } - + errno = ENOENT; return (NULL); } -const char * -ifconfig_media_get_type(int ifmw) +ifmedia_t +ifconfig_media_lookup_subtype(ifmedia_t media, const char *name) { - struct ifmedia_description *desc; + const struct ifmedia_description *desc; + const struct ifmedia_type_to_subtype *ttos; - /*int seen_option = 0, i;*/ + ttos = get_toptype_ttos(media); + if (ttos == NULL) { + errno = EINVAL; + return (INVALID_IFMEDIA); + } - /* Find the top-level interface type. */ - desc = get_toptype_desc(ifmw); - if (desc->ifmt_string == NULL) { - return (""); - } else { - return (desc->ifmt_string); + for (size_t i = 0; ttos->subtypes[i].desc != NULL; ++i) { + desc = lookup_media_desc(ttos->subtypes[i].desc, name); + if (desc != NULL) + return (desc->ifmt_word); } + errno = ENOENT; + return (INVALID_IFMEDIA); } const char * -ifconfig_media_get_subtype(int ifmw) +ifconfig_media_get_mode(ifmedia_t media) { - struct ifmedia_description *desc; - struct ifmedia_type_to_subtype *ttos; + const struct ifmedia_description *desc; + const struct ifmedia_type_to_subtype *ttos; + + ttos = get_toptype_ttos(media); + if (ttos == NULL) { + errno = EINVAL; + return (NULL); + } - ttos = get_toptype_ttos(ifmw); - desc = get_subtype_desc(ifmw, ttos); - return (desc->ifmt_string); + for (size_t i = 0; ttos->modes[i].desc != NULL; ++i) { + if (ttos->modes[i].alias) + continue; + for (desc = ttos->modes[i].desc; + desc->ifmt_string != NULL; ++desc) { + if (IFM_MODE(media) == desc->ifmt_word) + return (desc->ifmt_string); + } + } + errno = ENOENT; + return (NULL); +} + +ifmedia_t +ifconfig_media_lookup_mode(ifmedia_t media, const char *name) +{ + const struct ifmedia_description *desc; + const struct ifmedia_type_to_subtype *ttos; + + ttos = get_toptype_ttos(media); + if (ttos == NULL) { + errno = EINVAL; + return (INVALID_IFMEDIA); + } + + for (size_t i = 0; ttos->modes[i].desc != NULL; ++i) { + desc = lookup_media_desc(ttos->modes[i].desc, name); + if (desc != NULL) + return (desc->ifmt_word); + } + errno = ENOENT; + return (INVALID_IFMEDIA); +} + +const char ** +ifconfig_media_get_options(ifmedia_t media) +{ + const char **options; + const struct ifmedia_description *desc; + const struct ifmedia_type_to_subtype *ttos; + size_t n; + + ttos = get_toptype_ttos(media); + if (ttos == NULL) { + errno = EINVAL; + return (NULL); + } + + n = 0; + for (size_t i = 0; ttos->options[i].desc != NULL; ++i) { + if (ttos->options[i].alias) + continue; + for (desc = ttos->options[i].desc; + desc->ifmt_string != NULL; ++desc) { + if ((media & desc->ifmt_word) != 0) + ++n; + } + } + if (n == 0) { + errno = ENOENT; + return (NULL); + } + + options = calloc(n + 1, sizeof(*options)); + if (options == NULL) + return (NULL); + + options[n] = NULL; + n = 0; + for (size_t i = 0; ttos->options[i].desc != NULL; ++i) { + if (ttos->options[i].alias) + continue; + for (desc = ttos->options[i].desc; + desc->ifmt_string != NULL; ++desc) { + if ((media & desc->ifmt_word) != 0) { + options[n] = desc->ifmt_string; + ++n; + } + } + } + return (options); +} + +ifmedia_t * +ifconfig_media_lookup_options(ifmedia_t media, const char **opts, size_t nopts) +{ + ifmedia_t *options; + const struct ifmedia_description *desc, *opt; + const struct ifmedia_type_to_subtype *ttos; + + assert(opts != NULL); + assert(nopts > 0); + + ttos = get_toptype_ttos(media); + if (ttos == NULL) { + errno = EINVAL; + return (NULL); + } + + options = calloc(nopts, sizeof(*options)); + if (options == NULL) + return (NULL); + (void)memset(options, INVALID_IFMEDIA, nopts * sizeof(ifmedia_t)); + + for (size_t i = 0; ttos->options[i].desc != NULL; ++i) { + desc = ttos->options[i].desc; + for (size_t j = 0; j < nopts; ++j) { + opt = lookup_media_desc(desc, opts[j]); + if (opt != NULL) + options[j] = opt->ifmt_word; + } + } + return (options); } /*************************************************************************** @@ -295,7 +451,6 @@ ifconfig_media_get_mediareq(ifconfig_handle_t *h, const char *name, h->error.errcode = ENOMEM; return (-1); } - (void)memset(ms, 0, sizeof(*ms)); (void)strlcpy(ms->ifmr.ifm_name, name, sizeof(ms->ifmr.ifm_name)); /* @@ -363,36 +518,6 @@ ifconfig_media_get_status(const struct ifmediareq *ifmr) } } -void -ifconfig_media_get_options_string(int ifmw, char *buf, size_t buflen) -{ - struct ifmedia_type_to_subtype *ttos; - struct ifmedia_description *desc; - int i, seen_option = 0; - size_t len; - - assert(buflen > 0); - buf[0] = '\0'; - ttos = get_toptype_ttos(ifmw); - for (i = 0; ttos->options[i].desc != NULL; i++) { - if (ttos->options[i].alias) { - continue; - } - for (desc = ttos->options[i].desc; - desc->ifmt_string != NULL; desc++) { - if (ifmw & desc->ifmt_word) { - if (seen_option++) { - strlcat(buf, ",", buflen); - } - len = strlcat(buf, desc->ifmt_string, buflen); - assert(len < buflen); - buf += len; - buflen -= len; - } - } - } -} - int ifconfig_media_get_downreason(ifconfig_handle_t *h, const char *name, struct ifdownreason *ifdr) diff --git a/share/examples/libifconfig/status.c b/share/examples/libifconfig/status.c index 62fd3f35c8de..114cf7e87a68 100644 --- a/share/examples/libifconfig/status.c +++ b/share/examples/libifconfig/status.c @@ -406,7 +406,6 @@ print_media(ifconfig_handle_t *lifh, struct ifaddrs *ifa) * tables, finding an entry with the right media subtype */ struct ifmediareq *ifmr; - char opts[80]; if (ifconfig_media_get_mediareq(lifh, ifa->ifa_name, &ifmr) != 0) { if (ifconfig_err_errtype(lifh) != OK) { @@ -419,14 +418,19 @@ print_media(ifconfig_handle_t *lifh, struct ifaddrs *ifa) printf("\tmedia: %s %s", ifconfig_media_get_type(ifmr->ifm_current), ifconfig_media_get_subtype(ifmr->ifm_current)); if (ifmr->ifm_active != ifmr->ifm_current) { + const char **options; + printf(" (%s", ifconfig_media_get_subtype(ifmr->ifm_active)); - ifconfig_media_get_options_string(ifmr->ifm_active, opts, - sizeof(opts)); - if (opts[0] != '\0') { - printf(" <%s>)\n", opts); + options = ifconfig_media_get_options(ifmr->ifm_active); + if (options != NULL && options[0] != NULL) { + printf(" <%s", options[0]); + for (size_t i = 1; options[i] != NULL; ++i) + printf(",%s", options[i]); + printf(">)\n"); } else { printf(")\n"); } + free(options); } else { printf("\n"); } @@ -438,15 +442,20 @@ print_media(ifconfig_handle_t *lifh, struct ifaddrs *ifa) printf("\tsupported media:\n"); for (i = 0; i < ifmr->ifm_count; i++) { + const char **options; + printf("\t\tmedia %s", ifconfig_media_get_subtype(ifmr->ifm_ulist[i])); - ifconfig_media_get_options_string(ifmr->ifm_ulist[i], opts, - sizeof(opts)); - if (opts[0] != '\0') { - printf(" mediaopt %s\n", opts); + options = ifconfig_media_get_options(ifmr->ifm_ulist[i]); + if (options != NULL && options[0] != NULL) { + printf(" mediaopt %s", options[0]); + for (size_t i = 1; options[i] != NULL; ++i) + printf(",%s", options[i]); + printf("\n"); } else { printf("\n"); } + free(options); } free(ifmr); } From owner-dev-commits-src-main@freebsd.org Fri Mar 5 11:23:58 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 39A60557814; Fri, 5 Mar 2021 11:23:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DsQNZ18jNz4X4M; Fri, 5 Mar 2021 11:23:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1A787794E; Fri, 5 Mar 2021 11:23:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 125BNwOW059033; Fri, 5 Mar 2021 11:23:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 125BNwPv059032; Fri, 5 Mar 2021 11:23:58 GMT (envelope-from git) Date: Fri, 5 Mar 2021 11:23:58 GMT Message-Id: <202103051123.125BNwPv059032@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Moeller Subject: git: 2803fa471e77 - main - sbin/ifconfig: Get media status with libifconfig MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: freqlabs X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2803fa471e77dc8f227fe00bbf075de7feb10022 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2021 11:23:58 -0000 The branch main has been updated by freqlabs: URL: https://cgit.FreeBSD.org/src/commit/?id=2803fa471e77dc8f227fe00bbf075de7feb10022 commit 2803fa471e77dc8f227fe00bbf075de7feb10022 Author: Ryan Moeller AuthorDate: 2021-02-28 20:27:28 +0000 Commit: Ryan Moeller CommitDate: 2021-03-05 09:15:55 +0000 sbin/ifconfig: Get media status with libifconfig Code deduplication. Reviewed by: kp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D29030 --- sbin/ifconfig/ifconfig.h | 2 +- sbin/ifconfig/ifieee80211.c | 2 +- sbin/ifconfig/ifmedia.c | 673 ++++++++++++-------------------------------- 3 files changed, 176 insertions(+), 501 deletions(-) diff --git a/sbin/ifconfig/ifconfig.h b/sbin/ifconfig/ifconfig.h index 61b1137b47ba..ea541c5e9257 100644 --- a/sbin/ifconfig/ifconfig.h +++ b/sbin/ifconfig/ifconfig.h @@ -161,7 +161,7 @@ void sfp_status(int s, struct ifreq *ifr, int verbose); * XXX expose this so modules that neeed to know of any pending * operations on ifmedia can avoid cmd line ordering confusion. */ -struct ifmediareq *ifmedia_getstate(int s); +struct ifmediareq *ifmedia_getstate(void); void print_vhid(const struct ifaddrs *, const char *); diff --git a/sbin/ifconfig/ifieee80211.c b/sbin/ifconfig/ifieee80211.c index bb406469829a..cfaf163f5930 100644 --- a/sbin/ifconfig/ifieee80211.c +++ b/sbin/ifconfig/ifieee80211.c @@ -239,7 +239,7 @@ getchaninfo(int s) if (get80211(s, IEEE80211_IOC_CHANINFO, chaninfo, IEEE80211_CHANINFO_SIZE(MAXCHAN)) < 0) err(1, "unable to get channel information"); - ifmr = ifmedia_getstate(s); + ifmr = ifmedia_getstate(); gethtconf(s); getvhtconf(s); } diff --git a/sbin/ifconfig/ifmedia.c b/sbin/ifconfig/ifmedia.c index cd3600df454c..66eb40254889 100644 --- a/sbin/ifconfig/ifmedia.c +++ b/sbin/ifconfig/ifmedia.c @@ -86,201 +86,103 @@ #include #include +#include + #include "ifconfig.h" -static void domediaopt(const char *, int, int); -static int get_media_subtype(int, const char *); -static int get_media_mode(int, const char *); -static int get_media_options(int, const char *); -static int lookup_media_word(struct ifmedia_description *, const char *); -static void print_media_word(int, int); -static void print_media_word_ifconfig(int); - -static struct ifmedia_description *get_toptype_desc(int); -static struct ifmedia_type_to_subtype *get_toptype_ttos(int); -static struct ifmedia_description *get_subtype_desc(int, - struct ifmedia_type_to_subtype *ttos); - -#define IFM_OPMODE(x) \ - ((x) & (IFM_IEEE80211_ADHOC | IFM_IEEE80211_HOSTAP | \ - IFM_IEEE80211_IBSS | IFM_IEEE80211_WDS | IFM_IEEE80211_MONITOR | \ - IFM_IEEE80211_MBSS)) -#define IFM_IEEE80211_STA 0 +static void domediaopt(const char *, bool, int); +static ifmedia_t get_media_subtype(ifmedia_t, const char *); +static ifmedia_t get_media_mode(ifmedia_t, const char *); +static ifmedia_t get_media_options(ifmedia_t, const char *); +static void print_media(ifmedia_t, bool); +static void print_media_ifconfig(ifmedia_t); static void media_status(int s) { - struct ifmediareq ifmr; - struct ifdownreason ifdr; - int *media_list, i; - bool no_carrier, xmedia; - - (void) memset(&ifmr, 0, sizeof(ifmr)); - (void) strlcpy(ifmr.ifm_name, name, sizeof(ifmr.ifm_name)); - xmedia = true; + struct ifmediareq *ifmr; - /* - * Check if interface supports extended media types. - */ - if (ioctl(s, SIOCGIFXMEDIA, (caddr_t)&ifmr) < 0) - xmedia = false; - if (!xmedia && ioctl(s, SIOCGIFMEDIA, (caddr_t)&ifmr) < 0) { - /* - * Interface doesn't support SIOC{G,S}IFMEDIA. - */ + if (ifconfig_media_get_mediareq(lifh, name, &ifmr) == -1) return; - } - if (ifmr.ifm_count == 0) { + if (ifmr->ifm_count == 0) { warnx("%s: no media types?", name); - return; - } - - media_list = (int *)malloc(ifmr.ifm_count * sizeof(int)); - if (media_list == NULL) - err(1, "malloc"); - ifmr.ifm_ulist = media_list; - - if (xmedia) { - if (ioctl(s, SIOCGIFXMEDIA, (caddr_t)&ifmr) < 0) - err(1, "SIOCGIFXMEDIA"); - } else { - if (ioctl(s, SIOCGIFMEDIA, (caddr_t)&ifmr) < 0) - err(1, "SIOCGIFMEDIA"); + goto free; } printf("\tmedia: "); - print_media_word(ifmr.ifm_current, 1); - if (ifmr.ifm_active != ifmr.ifm_current) { + print_media(ifmr->ifm_current, true); + if (ifmr->ifm_active != ifmr->ifm_current) { putchar(' '); putchar('('); - print_media_word(ifmr.ifm_active, 0); + print_media(ifmr->ifm_active, false); putchar(')'); } putchar('\n'); - if (ifmr.ifm_status & IFM_AVALID) { - no_carrier = false; - printf("\tstatus: "); - switch (IFM_TYPE(ifmr.ifm_active)) { - case IFM_ETHER: - case IFM_ATM: - if (ifmr.ifm_status & IFM_ACTIVE) - printf("active"); - else - no_carrier = true; - break; - - case IFM_IEEE80211: - if (ifmr.ifm_status & IFM_ACTIVE) { - /* NB: only sta mode associates */ - if (IFM_OPMODE(ifmr.ifm_active) == IFM_IEEE80211_STA) - printf("associated"); - else - printf("running"); - } else - no_carrier = true; - break; - } - if (no_carrier) { - printf("no carrier"); - memset(&ifdr, 0, sizeof(ifdr)); - strlcpy(ifdr.ifdr_name, name, sizeof(ifdr.ifdr_name)); - if (ioctl(s, SIOCGIFDOWNREASON, (caddr_t)&ifdr) == 0) { - switch (ifdr.ifdr_reason) { - case IFDR_REASON_MSG: - printf(" (%s)", ifdr.ifdr_msg); - break; - case IFDR_REASON_VENDOR: - printf(" (vendor code %d)", - ifdr.ifdr_vendor); - break; - default: - break; - } + if (ifmr->ifm_status & IFM_AVALID) { + struct ifdownreason ifdr; + const char *status; + + status = ifconfig_media_get_status(ifmr); + printf("\tstatus: %s", status); + if (strcmp(status, "no carrier") == 0 && + ifconfig_media_get_downreason(lifh, name, &ifdr) == 0) { + switch (ifdr.ifdr_reason) { + case IFDR_REASON_MSG: + printf(" (%s)", ifdr.ifdr_msg); + break; + case IFDR_REASON_VENDOR: + printf(" (vendor code %d)", + ifdr.ifdr_vendor); + break; + default: + break; } } putchar('\n'); } - if (ifmr.ifm_count > 0 && supmedia) { + if (supmedia) { printf("\tsupported media:\n"); - for (i = 0; i < ifmr.ifm_count; i++) { + for (size_t i = 0; i < ifmr->ifm_count; ++i) { printf("\t\t"); - print_media_word_ifconfig(media_list[i]); + print_media_ifconfig(ifmr->ifm_ulist[i]); putchar('\n'); } } - - free(media_list); +free: + free(ifmr); } struct ifmediareq * -ifmedia_getstate(int s) +ifmedia_getstate(void) { - static struct ifmediareq *ifmr = NULL; - int *mwords; - int xmedia = 1; - - if (ifmr == NULL) { - ifmr = (struct ifmediareq *)malloc(sizeof(struct ifmediareq)); - if (ifmr == NULL) - err(1, "malloc"); - - (void) memset(ifmr, 0, sizeof(struct ifmediareq)); - (void) strlcpy(ifmr->ifm_name, name, - sizeof(ifmr->ifm_name)); - - ifmr->ifm_count = 0; - ifmr->ifm_ulist = NULL; - - /* - * We must go through the motions of reading all - * supported media because we need to know both - * the current media type and the top-level type. - */ - - if (ioctl(s, SIOCGIFXMEDIA, (caddr_t)ifmr) < 0) { - xmedia = 0; - } - if (xmedia == 0 && ioctl(s, SIOCGIFMEDIA, (caddr_t)ifmr) < 0) { - err(1, "SIOCGIFMEDIA"); - } + static struct ifmediareq *ifmr; - if (ifmr->ifm_count == 0) - errx(1, "%s: no media types?", name); - - mwords = (int *)malloc(ifmr->ifm_count * sizeof(int)); - if (mwords == NULL) - err(1, "malloc"); - - ifmr->ifm_ulist = mwords; - if (xmedia) { - if (ioctl(s, SIOCGIFXMEDIA, (caddr_t)ifmr) < 0) - err(1, "SIOCGIFXMEDIA"); - } else { - if (ioctl(s, SIOCGIFMEDIA, (caddr_t)ifmr) < 0) - err(1, "SIOCGIFMEDIA"); - } - } + if (ifconfig_media_get_mediareq(lifh, name, &ifmr) == -1) + errc(1, ifconfig_err_errno(lifh), + "%s: ifconfig_media_get_mediareq", name); - return ifmr; + if (ifmr->ifm_count == 0) + errx(1, "%s: no media types?", name); + + return (ifmr); } static void setifmediacallback(int s, void *arg) { struct ifmediareq *ifmr = (struct ifmediareq *)arg; - static int did_it = 0; + static bool did_it = false; if (!did_it) { ifr.ifr_media = ifmr->ifm_current; if (ioctl(s, SIOCSIFMEDIA, (caddr_t)&ifr) < 0) err(1, "SIOCSIFMEDIA (media)"); - free(ifmr->ifm_ulist); free(ifmr); - did_it = 1; + did_it = true; } } @@ -290,7 +192,7 @@ setmedia(const char *val, int d, int s, const struct afswtch *afp) struct ifmediareq *ifmr; int subtype; - ifmr = ifmedia_getstate(s); + ifmr = ifmedia_getstate(); /* * We are primarily concerned with the top-level type. @@ -301,7 +203,7 @@ setmedia(const char *val, int d, int s, const struct afswtch *afp) * (I'm assuming that all supported media types for a given * interface will be the same top-level type..) */ - subtype = get_media_subtype(IFM_TYPE(ifmr->ifm_ulist[0]), val); + subtype = get_media_subtype(ifmr->ifm_ulist[0], val); strlcpy(ifr.ifr_name, name, sizeof(ifr.ifr_name)); ifr.ifr_media = (ifmr->ifm_current & IFM_IMASK) | @@ -315,25 +217,25 @@ static void setmediaopt(const char *val, int d, int s, const struct afswtch *afp) { - domediaopt(val, 0, s); + domediaopt(val, false, s); } static void unsetmediaopt(const char *val, int d, int s, const struct afswtch *afp) { - domediaopt(val, 1, s); + domediaopt(val, true, s); } static void -domediaopt(const char *val, int clear, int s) +domediaopt(const char *val, bool clear, int s) { struct ifmediareq *ifmr; - int options; + ifmedia_t options; - ifmr = ifmedia_getstate(s); + ifmr = ifmedia_getstate(); - options = get_media_options(IFM_TYPE(ifmr->ifm_ulist[0]), val); + options = get_media_options(ifmr->ifm_ulist[0], val); strlcpy(ifr.ifr_name, name, sizeof(ifr.ifr_name)); ifr.ifr_media = ifmr->ifm_current; @@ -356,7 +258,7 @@ setmediainst(const char *val, int d, int s, const struct afswtch *afp) struct ifmediareq *ifmr; int inst; - ifmr = ifmedia_getstate(s); + ifmr = ifmedia_getstate(); inst = atoi(val); if (inst < 0 || inst > (int)IFM_INST_MAX) @@ -375,9 +277,9 @@ setmediamode(const char *val, int d, int s, const struct afswtch *afp) struct ifmediareq *ifmr; int mode; - ifmr = ifmedia_getstate(s); + ifmr = ifmedia_getstate(); - mode = get_media_mode(IFM_TYPE(ifmr->ifm_ulist[0]), val); + mode = get_media_mode(ifmr->ifm_ulist[0], val); strlcpy(ifr.ifr_name, name, sizeof(ifr.ifr_name)); ifr.ifr_media = (ifmr->ifm_current & ~IFM_MMASK) | mode; @@ -386,320 +288,112 @@ setmediamode(const char *val, int d, int s, const struct afswtch *afp) callback_register(setifmediacallback, (void *)ifmr); } -/********************************************************************** - * A good chunk of this is duplicated from sys/net/if_media.c - **********************************************************************/ - -static struct ifmedia_description ifm_type_descriptions[] = - IFM_TYPE_DESCRIPTIONS; - -static struct ifmedia_description ifm_subtype_ethernet_descriptions[] = - IFM_SUBTYPE_ETHERNET_DESCRIPTIONS; - -static struct ifmedia_description ifm_subtype_ethernet_aliases[] = - IFM_SUBTYPE_ETHERNET_ALIASES; - -static struct ifmedia_description ifm_subtype_ethernet_option_descriptions[] = - IFM_SUBTYPE_ETHERNET_OPTION_DESCRIPTIONS; - -static struct ifmedia_description ifm_subtype_ieee80211_descriptions[] = - IFM_SUBTYPE_IEEE80211_DESCRIPTIONS; - -static struct ifmedia_description ifm_subtype_ieee80211_aliases[] = - IFM_SUBTYPE_IEEE80211_ALIASES; - -static struct ifmedia_description ifm_subtype_ieee80211_option_descriptions[] = - IFM_SUBTYPE_IEEE80211_OPTION_DESCRIPTIONS; - -struct ifmedia_description ifm_subtype_ieee80211_mode_descriptions[] = - IFM_SUBTYPE_IEEE80211_MODE_DESCRIPTIONS; - -struct ifmedia_description ifm_subtype_ieee80211_mode_aliases[] = - IFM_SUBTYPE_IEEE80211_MODE_ALIASES; - -static struct ifmedia_description ifm_subtype_atm_descriptions[] = - IFM_SUBTYPE_ATM_DESCRIPTIONS; - -static struct ifmedia_description ifm_subtype_atm_aliases[] = - IFM_SUBTYPE_ATM_ALIASES; - -static struct ifmedia_description ifm_subtype_atm_option_descriptions[] = - IFM_SUBTYPE_ATM_OPTION_DESCRIPTIONS; - -static struct ifmedia_description ifm_subtype_shared_descriptions[] = - IFM_SUBTYPE_SHARED_DESCRIPTIONS; - -static struct ifmedia_description ifm_subtype_shared_aliases[] = - IFM_SUBTYPE_SHARED_ALIASES; - -static struct ifmedia_description ifm_shared_option_descriptions[] = - IFM_SHARED_OPTION_DESCRIPTIONS; - -static struct ifmedia_description ifm_shared_option_aliases[] = - IFM_SHARED_OPTION_ALIASES; - -struct ifmedia_type_to_subtype { - struct { - struct ifmedia_description *desc; - int alias; - } subtypes[5]; - struct { - struct ifmedia_description *desc; - int alias; - } options[4]; - struct { - struct ifmedia_description *desc; - int alias; - } modes[3]; -}; - -/* must be in the same order as IFM_TYPE_DESCRIPTIONS */ -static struct ifmedia_type_to_subtype ifmedia_types_to_subtypes[] = { - { - { - { &ifm_subtype_shared_descriptions[0], 0 }, - { &ifm_subtype_shared_aliases[0], 1 }, - { &ifm_subtype_ethernet_descriptions[0], 0 }, - { &ifm_subtype_ethernet_aliases[0], 1 }, - { NULL, 0 }, - }, - { - { &ifm_shared_option_descriptions[0], 0 }, - { &ifm_shared_option_aliases[0], 1 }, - { &ifm_subtype_ethernet_option_descriptions[0], 0 }, - { NULL, 0 }, - }, - { - { NULL, 0 }, - }, - }, - { - { - { &ifm_subtype_shared_descriptions[0], 0 }, - { &ifm_subtype_shared_aliases[0], 1 }, - { &ifm_subtype_ieee80211_descriptions[0], 0 }, - { &ifm_subtype_ieee80211_aliases[0], 1 }, - { NULL, 0 }, - }, - { - { &ifm_shared_option_descriptions[0], 0 }, - { &ifm_shared_option_aliases[0], 1 }, - { &ifm_subtype_ieee80211_option_descriptions[0], 0 }, - { NULL, 0 }, - }, - { - { &ifm_subtype_ieee80211_mode_descriptions[0], 0 }, - { &ifm_subtype_ieee80211_mode_aliases[0], 0 }, - { NULL, 0 }, - }, - }, - { - { - { &ifm_subtype_shared_descriptions[0], 0 }, - { &ifm_subtype_shared_aliases[0], 1 }, - { &ifm_subtype_atm_descriptions[0], 0 }, - { &ifm_subtype_atm_aliases[0], 1 }, - { NULL, 0 }, - }, - { - { &ifm_shared_option_descriptions[0], 0 }, - { &ifm_shared_option_aliases[0], 1 }, - { &ifm_subtype_atm_option_descriptions[0], 0 }, - { NULL, 0 }, - }, - { - { NULL, 0 }, - }, - }, -}; - -static int -get_media_subtype(int type, const char *val) +static ifmedia_t +get_media_subtype(ifmedia_t media, const char *val) { - struct ifmedia_description *desc; - struct ifmedia_type_to_subtype *ttos; - int rval, i; - - /* Find the top-level interface type. */ - for (desc = ifm_type_descriptions, ttos = ifmedia_types_to_subtypes; - desc->ifmt_string != NULL; desc++, ttos++) - if (type == desc->ifmt_word) - break; - if (desc->ifmt_string == NULL) - errx(1, "unknown media type 0x%x", type); - - for (i = 0; ttos->subtypes[i].desc != NULL; i++) { - rval = lookup_media_word(ttos->subtypes[i].desc, val); - if (rval != -1) - return (rval); + ifmedia_t subtype; + + subtype = ifconfig_media_lookup_subtype(media, val); + if (subtype != INVALID_IFMEDIA) + return (subtype); + switch (errno) { + case EINVAL: + errx(EXIT_FAILURE, "unknown media type 0x%x", media); + case ENOENT: + errx(EXIT_FAILURE, "unknown media subtype: %s", val); + default: + err(EXIT_FAILURE, "ifconfig_media_lookup_subtype"); } - errx(1, "unknown media subtype: %s", val); /*NOTREACHED*/ } -static int -get_media_mode(int type, const char *val) +static ifmedia_t +get_media_mode(ifmedia_t media, const char *val) { - struct ifmedia_description *desc; - struct ifmedia_type_to_subtype *ttos; - int rval, i; - - /* Find the top-level interface type. */ - for (desc = ifm_type_descriptions, ttos = ifmedia_types_to_subtypes; - desc->ifmt_string != NULL; desc++, ttos++) - if (type == desc->ifmt_word) - break; - if (desc->ifmt_string == NULL) - errx(1, "unknown media mode 0x%x", type); - - for (i = 0; ttos->modes[i].desc != NULL; i++) { - rval = lookup_media_word(ttos->modes[i].desc, val); - if (rval != -1) - return (rval); + ifmedia_t mode; + + mode = ifconfig_media_lookup_mode(media, val); + if (mode != INVALID_IFMEDIA) + return (mode); + switch (errno) { + case EINVAL: + errx(EXIT_FAILURE, "unknown media type 0x%x", media); + case ENOENT: + return (INVALID_IFMEDIA); + default: + err(EXIT_FAILURE, "ifconfig_media_lookup_subtype"); } - return -1; + /*NOTREACHED*/ } -static int -get_media_options(int type, const char *val) +static ifmedia_t +get_media_options(ifmedia_t media, const char *val) { - struct ifmedia_description *desc; - struct ifmedia_type_to_subtype *ttos; - char *optlist, *optptr; - int option, i, rval = 0; - - /* We muck with the string, so copy it. */ - optlist = strdup(val); - if (optlist == NULL) - err(1, "strdup"); - - /* Find the top-level interface type. */ - for (desc = ifm_type_descriptions, ttos = ifmedia_types_to_subtypes; - desc->ifmt_string != NULL; desc++, ttos++) - if (type == desc->ifmt_word) - break; - if (desc->ifmt_string == NULL) - errx(1, "unknown media type 0x%x", type); + ifmedia_t *options; + const char **optnames; + char *opts, *opt; + size_t nopts; + int rval; /* - * Look up the options in the user-provided comma-separated - * list. + * We muck with the string, so copy it. */ - optptr = optlist; - for (; (optptr = strtok(optptr, ",")) != NULL; optptr = NULL) { - option = -1; - for (i = 0; ttos->options[i].desc != NULL; i++) { - option = lookup_media_word(ttos->options[i].desc, optptr); - if (option != -1) - break; - } - if (option == -1) - errx(1, "unknown option: %s", optptr); - rval |= option; - } - - free(optlist); - return (rval); -} - -static int -lookup_media_word(struct ifmedia_description *desc, const char *val) -{ - - for (; desc->ifmt_string != NULL; desc++) - if (strcasecmp(desc->ifmt_string, val) == 0) - return (desc->ifmt_word); - - return (-1); -} - -static struct ifmedia_description *get_toptype_desc(int ifmw) -{ - struct ifmedia_description *desc; - - for (desc = ifm_type_descriptions; desc->ifmt_string != NULL; desc++) - if (IFM_TYPE(ifmw) == desc->ifmt_word) - break; + opts = strdup(val); + if (opts == NULL) + err(EXIT_FAILURE, "strdup"); - return desc; -} - -static struct ifmedia_type_to_subtype *get_toptype_ttos(int ifmw) -{ - struct ifmedia_description *desc; - struct ifmedia_type_to_subtype *ttos; - - for (desc = ifm_type_descriptions, ttos = ifmedia_types_to_subtypes; - desc->ifmt_string != NULL; desc++, ttos++) - if (IFM_TYPE(ifmw) == desc->ifmt_word) - break; - - return ttos; -} - -static struct ifmedia_description *get_subtype_desc(int ifmw, - struct ifmedia_type_to_subtype *ttos) -{ - int i; - struct ifmedia_description *desc; - - for (i = 0; ttos->subtypes[i].desc != NULL; i++) { - if (ttos->subtypes[i].alias) - continue; - for (desc = ttos->subtypes[i].desc; - desc->ifmt_string != NULL; desc++) { - if (IFM_SUBTYPE(ifmw) == desc->ifmt_word) - return desc; - } + /* + * Split the comma-delimited list into separate strings. + */ + nopts = 0; + for (opt = opts; (opt = strtok(opt, ",")) != NULL; opt = NULL) + ++nopts; + if (nopts == 0) { + free(opts); + return (0); } - - return NULL; -} - -static struct ifmedia_description *get_mode_desc(int ifmw, - struct ifmedia_type_to_subtype *ttos) -{ - int i; - struct ifmedia_description *desc; - - for (i = 0; ttos->modes[i].desc != NULL; i++) { - if (ttos->modes[i].alias) - continue; - for (desc = ttos->modes[i].desc; - desc->ifmt_string != NULL; desc++) { - if (IFM_MODE(ifmw) == desc->ifmt_word) - return desc; - } + optnames = calloc(nopts, sizeof(*optnames)); + if (optnames == NULL) + err(EXIT_FAILURE, "calloc"); + opt = opts; + for (size_t i = 0; i < nopts; ++i) { + optnames[i] = opt; + opt = strchr(opt, '\0') + 1; } - return NULL; + /* + * Look up the options in the user-provided list. + */ + options = ifconfig_media_lookup_options(media, optnames, nopts); + if (options == NULL) + err(EXIT_FAILURE, "ifconfig_media_lookup_options"); + rval = 0; + for (size_t i = 0; i < nopts; ++i) { + if (options[i] == INVALID_IFMEDIA) + errx(EXIT_FAILURE, "unknown option: %s", optnames[i]); + rval |= options[i]; + } + free(options); + free(optnames); + free(opts); + return (rval); } static void -print_media_word(int ifmw, int print_toptype) +print_media(ifmedia_t media, bool print_toptype) { - struct ifmedia_description *desc; - struct ifmedia_type_to_subtype *ttos; - int seen_option = 0, i; - - /* Find the top-level interface type. */ - desc = get_toptype_desc(ifmw); - ttos = get_toptype_ttos(ifmw); - if (desc->ifmt_string == NULL) { + const char *val, **options; + + val = ifconfig_media_get_type(media); + if (val == NULL) { printf(""); return; } else if (print_toptype) { - printf("%s", desc->ifmt_string); + printf("%s", val); } - /* - * Don't print the top-level type; it's not like we can - * change it, or anything. - */ - - /* Find subtype. */ - desc = get_subtype_desc(ifmw, ttos); - if (desc == NULL) { + val = ifconfig_media_get_subtype(media); + if (val == NULL) { printf(""); return; } @@ -707,45 +401,34 @@ print_media_word(int ifmw, int print_toptype) if (print_toptype) putchar(' '); - printf("%s", desc->ifmt_string); + printf("%s", val); if (print_toptype) { - desc = get_mode_desc(ifmw, ttos); - if (desc != NULL && strcasecmp("autoselect", desc->ifmt_string)) - printf(" mode %s", desc->ifmt_string); + val = ifconfig_media_get_mode(media); + if (val != NULL && strcasecmp("autoselect", val) != 0) + printf(" mode %s", val); } - /* Find options. */ - for (i = 0; ttos->options[i].desc != NULL; i++) { - if (ttos->options[i].alias) - continue; - for (desc = ttos->options[i].desc; - desc->ifmt_string != NULL; desc++) { - if (ifmw & desc->ifmt_word) { - if (seen_option == 0) - printf(" <"); - printf("%s%s", seen_option++ ? "," : "", - desc->ifmt_string); - } - } + options = ifconfig_media_get_options(media); + if (options != NULL && options[0] != NULL) { + printf(" <%s", options[0]); + for (size_t i = 1; options[i] != NULL; ++i) + printf(",%s", options[i]); + printf(">"); } - printf("%s", seen_option ? ">" : ""); + free(options); - if (print_toptype && IFM_INST(ifmw) != 0) - printf(" instance %d", IFM_INST(ifmw)); + if (print_toptype && IFM_INST(media) != 0) + printf(" instance %d", IFM_INST(media)); } static void -print_media_word_ifconfig(int ifmw) +print_media_ifconfig(ifmedia_t media) { - struct ifmedia_description *desc; - struct ifmedia_type_to_subtype *ttos; - int seen_option = 0, i; - - /* Find the top-level interface type. */ - desc = get_toptype_desc(ifmw); - ttos = get_toptype_ttos(ifmw); - if (desc->ifmt_string == NULL) { + const char *val, **options; + + val = ifconfig_media_get_type(media); + if (val == NULL) { printf(""); return; } @@ -755,36 +438,28 @@ print_media_word_ifconfig(int ifmw) * change it, or anything. */ - /* Find subtype. */ - desc = get_subtype_desc(ifmw, ttos); - if (desc == NULL) { + val = ifconfig_media_get_subtype(media); + if (val == NULL) { printf(""); return; } - printf("media %s", desc->ifmt_string); - - desc = get_mode_desc(ifmw, ttos); - if (desc != NULL) - printf(" mode %s", desc->ifmt_string); - - /* Find options. */ - for (i = 0; ttos->options[i].desc != NULL; i++) { - if (ttos->options[i].alias) - continue; - for (desc = ttos->options[i].desc; - desc->ifmt_string != NULL; desc++) { - if (ifmw & desc->ifmt_word) { - if (seen_option == 0) - printf(" mediaopt "); - printf("%s%s", seen_option++ ? "," : "", - desc->ifmt_string); - } - } + printf("media %s", val); + + val = ifconfig_media_get_mode(media); + if (val != NULL) + printf(" mode %s", val); + + options = ifconfig_media_get_options(media); + if (options != NULL && options[0] != NULL) { + printf(" mediaopt %s", options[0]); + for (size_t i = 1; options[i] != NULL; ++i) + printf(",%s", options[i]); } + free(options); - if (IFM_INST(ifmw) != 0) - printf(" instance %d", IFM_INST(ifmw)); + if (IFM_INST(media) != 0) + printf(" instance %d", IFM_INST(media)); } /********************************************************************** From owner-dev-commits-src-main@freebsd.org Fri Mar 5 11:24:00 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 55EE255767E; Fri, 5 Mar 2021 11:24:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DsQNb4Ydlz4Wl8; Fri, 5 Mar 2021 11:23:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3ED917551; Fri, 5 Mar 2021 11:23:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 125BNx59059055; Fri, 5 Mar 2021 11:23:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 125BNx09059054; Fri, 5 Mar 2021 11:23:59 GMT (envelope-from git) Date: Fri, 5 Mar 2021 11:23:59 GMT Message-Id: <202103051123.125BNx09059054@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Moeller Subject: git: 88832d59dec1 - main - sbin/ifconfig: Minor housekeeping MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: freqlabs X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 88832d59dec10e97dd64b44391606776b20e782b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2021 11:24:01 -0000 The branch main has been updated by freqlabs: URL: https://cgit.FreeBSD.org/src/commit/?id=88832d59dec10e97dd64b44391606776b20e782b commit 88832d59dec10e97dd64b44391606776b20e782b Author: Ryan Moeller AuthorDate: 2021-02-28 02:08:43 +0000 Commit: Ryan Moeller CommitDate: 2021-03-05 09:15:55 +0000 sbin/ifconfig: Minor housekeeping Coalesce adjacent lint ifdefs. Fix spelling of nitems. Reviewed by: kp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D29022 --- sbin/ifconfig/ifconfig.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c index fc5351bd420e..5e114b43c126 100644 --- a/sbin/ifconfig/ifconfig.c +++ b/sbin/ifconfig/ifconfig.c @@ -33,9 +33,6 @@ static const char copyright[] = "@(#) Copyright (c) 1983, 1993\n\ The Regents of the University of California. All rights reserved.\n"; -#endif /* not lint */ - -#ifndef lint #if 0 static char sccsid[] = "@(#)ifconfig.c 8.2 (Berkeley) 2/16/94"; #endif @@ -215,8 +212,6 @@ ioctl_ifcreate(int s, struct ifreq *ifr) } } -#define ORDERS_SIZE(x) sizeof(x) / sizeof(x[0]) - static int calcorders(struct ifaddrs *ifa, struct ifa_queue *q) { @@ -246,7 +241,7 @@ calcorders(struct ifaddrs *ifa, struct ifa_queue *q) if (ifa->ifa_addr) { af = ifa->ifa_addr->sa_family; - if (af < ORDERS_SIZE(cur->af_orders) && + if (af < nitems(cur->af_orders) && cur->af_orders[af] == 0) cur->af_orders[af] = ++ord; } @@ -297,8 +292,7 @@ cmpifaddrs(struct ifaddrs *a, struct ifaddrs *b, struct ifa_queue *q) af1 = a->ifa_addr->sa_family; af2 = b->ifa_addr->sa_family; - if (af1 < ORDERS_SIZE(e1->af_orders) && - af2 < ORDERS_SIZE(e1->af_orders)) + if (af1 < nitems(e1->af_orders) && af2 < nitems(e1->af_orders)) return (e1->af_orders[af1] - e1->af_orders[af2]); } @@ -347,8 +341,6 @@ static void setformat(char *input) free(formatstr); } -#undef ORDERS_SIZE - static struct ifaddrs * sortifaddrs(struct ifaddrs *list, int (*compare)(struct ifaddrs *, struct ifaddrs *, struct ifa_queue *), From owner-dev-commits-src-main@freebsd.org Fri Mar 5 11:33:46 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1A3B2557AEB; Fri, 5 Mar 2021 11:33:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DsQbt0Dtdz4Xhs; Fri, 5 Mar 2021 11:33:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EEE4A7742; Fri, 5 Mar 2021 11:33:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 125BXjAe071901; Fri, 5 Mar 2021 11:33:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 125BXjkf071900; Fri, 5 Mar 2021 11:33:45 GMT (envelope-from git) Date: Fri, 5 Mar 2021 11:33:45 GMT Message-Id: <202103051133.125BXjkf071900@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Stefan Eßer Subject: git: 028616d0dd69 - main - bc: Vendor import new version 3.3.3 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: se X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 028616d0dd69a3da7a30cb94d35f040bf2ced6b9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2021 11:33:46 -0000 The branch main has been updated by se: URL: https://cgit.FreeBSD.org/src/commit/?id=028616d0dd69a3da7a30cb94d35f040bf2ced6b9 commit 028616d0dd69a3da7a30cb94d35f040bf2ced6b9 Author: Stefan Eßer AuthorDate: 2021-03-05 10:30:11 +0000 Commit: Stefan Eßer CommitDate: 2021-03-05 11:33:01 +0000 bc: Vendor import new version 3.3.3 --- contrib/bc/Makefile.in | 2 +- contrib/bc/NEWS.md | 26 +++++++ contrib/bc/gen/lib2.bc | 2 +- contrib/bc/karatsuba.py | 10 +-- contrib/bc/manuals/bc.1.md.in | 61 ++++++++-------- contrib/bc/manuals/bc/A.1 | 71 +++++++++--------- contrib/bc/manuals/bc/A.1.md | 59 ++++++++------- contrib/bc/manuals/bc/E.1 | 69 +++++++++--------- contrib/bc/manuals/bc/E.1.md | 55 +++++++------- contrib/bc/manuals/bc/EH.1 | 69 +++++++++--------- contrib/bc/manuals/bc/EH.1.md | 55 +++++++------- contrib/bc/manuals/bc/EHN.1 | 69 +++++++++--------- contrib/bc/manuals/bc/EHN.1.md | 55 +++++++------- contrib/bc/manuals/bc/EHNP.1 | 69 +++++++++--------- contrib/bc/manuals/bc/EHNP.1.md | 55 +++++++------- contrib/bc/manuals/bc/EHP.1 | 69 +++++++++--------- contrib/bc/manuals/bc/EHP.1.md | 55 +++++++------- contrib/bc/manuals/bc/EN.1 | 69 +++++++++--------- contrib/bc/manuals/bc/EN.1.md | 55 +++++++------- contrib/bc/manuals/bc/ENP.1 | 69 +++++++++--------- contrib/bc/manuals/bc/ENP.1.md | 55 +++++++------- contrib/bc/manuals/bc/EP.1 | 69 +++++++++--------- contrib/bc/manuals/bc/EP.1.md | 55 +++++++------- contrib/bc/manuals/bc/H.1 | 71 +++++++++--------- contrib/bc/manuals/bc/H.1.md | 59 ++++++++------- contrib/bc/manuals/bc/HN.1 | 71 +++++++++--------- contrib/bc/manuals/bc/HN.1.md | 59 ++++++++------- contrib/bc/manuals/bc/HNP.1 | 71 +++++++++--------- contrib/bc/manuals/bc/HNP.1.md | 59 ++++++++------- contrib/bc/manuals/bc/HP.1 | 71 +++++++++--------- contrib/bc/manuals/bc/HP.1.md | 59 ++++++++------- contrib/bc/manuals/bc/N.1 | 71 +++++++++--------- contrib/bc/manuals/bc/N.1.md | 59 ++++++++------- contrib/bc/manuals/bc/NP.1 | 71 +++++++++--------- contrib/bc/manuals/bc/NP.1.md | 59 ++++++++------- contrib/bc/manuals/bc/P.1 | 71 +++++++++--------- contrib/bc/manuals/bc/P.1.md | 59 ++++++++------- contrib/bc/manuals/bcl.3 | 2 +- contrib/bc/manuals/bcl.3.md | 76 +++++++++---------- contrib/bc/manuals/dc.1.md.in | 38 +++++----- contrib/bc/manuals/dc/A.1 | 53 +++++++------- contrib/bc/manuals/dc/A.1.md | 38 +++++----- contrib/bc/manuals/dc/E.1 | 53 +++++++------- contrib/bc/manuals/dc/E.1.md | 38 +++++----- contrib/bc/manuals/dc/EH.1 | 53 +++++++------- contrib/bc/manuals/dc/EH.1.md | 38 +++++----- contrib/bc/manuals/dc/EHN.1 | 53 +++++++------- contrib/bc/manuals/dc/EHN.1.md | 38 +++++----- contrib/bc/manuals/dc/EHNP.1 | 53 +++++++------- contrib/bc/manuals/dc/EHNP.1.md | 38 +++++----- contrib/bc/manuals/dc/EHP.1 | 53 +++++++------- contrib/bc/manuals/dc/EHP.1.md | 38 +++++----- contrib/bc/manuals/dc/EN.1 | 53 +++++++------- contrib/bc/manuals/dc/EN.1.md | 38 +++++----- contrib/bc/manuals/dc/ENP.1 | 53 +++++++------- contrib/bc/manuals/dc/ENP.1.md | 38 +++++----- contrib/bc/manuals/dc/EP.1 | 53 +++++++------- contrib/bc/manuals/dc/EP.1.md | 38 +++++----- contrib/bc/manuals/dc/H.1 | 53 +++++++------- contrib/bc/manuals/dc/H.1.md | 38 +++++----- contrib/bc/manuals/dc/HN.1 | 53 +++++++------- contrib/bc/manuals/dc/HN.1.md | 38 +++++----- contrib/bc/manuals/dc/HNP.1 | 53 +++++++------- contrib/bc/manuals/dc/HNP.1.md | 38 +++++----- contrib/bc/manuals/dc/HP.1 | 53 +++++++------- contrib/bc/manuals/dc/HP.1.md | 38 +++++----- contrib/bc/manuals/dc/N.1 | 53 +++++++------- contrib/bc/manuals/dc/N.1.md | 38 +++++----- contrib/bc/manuals/dc/NP.1 | 53 +++++++------- contrib/bc/manuals/dc/NP.1.md | 38 +++++----- contrib/bc/manuals/dc/P.1 | 53 +++++++------- contrib/bc/manuals/dc/P.1.md | 38 +++++----- contrib/bc/manuals/header_bc.txt | 2 +- contrib/bc/manuals/header_bcl.txt | 2 +- contrib/bc/manuals/header_dc.txt | 2 +- contrib/bc/src/num.c | 2 +- contrib/bc/tests/bc/length.txt | 3 + contrib/bc/tests/bc/length_results.txt | 5 +- contrib/bc/tests/bc/lib2.txt | 6 ++ contrib/bc/tests/bc/lib2_results.txt | 6 ++ contrib/bc/tests/bc/scripts/bessel.bc | 9 ++- contrib/bc/tests/dc/all.txt | 1 + contrib/bc/tests/dc/length.txt | 129 +++++++++++++++++++++++++++++++++ contrib/bc/tests/dc/length_results.txt | 129 +++++++++++++++++++++++++++++++++ 84 files changed, 2130 insertions(+), 1871 deletions(-) diff --git a/contrib/bc/Makefile.in b/contrib/bc/Makefile.in index dbb5debd44cc..db8e24967996 100644 --- a/contrib/bc/Makefile.in +++ b/contrib/bc/Makefile.in @@ -29,7 +29,7 @@ # .POSIX: -VERSION = 3.3.0 +VERSION = 3.3.3 SRC = %%SRC%% OBJ = %%OBJ%% diff --git a/contrib/bc/NEWS.md b/contrib/bc/NEWS.md index 6a8899200f4a..3a3433077d50 100644 --- a/contrib/bc/NEWS.md +++ b/contrib/bc/NEWS.md @@ -1,5 +1,31 @@ # News +## 3.3.3 + +This is a production release with one tweak and fixes for manuals. + +The tweak is that `length(0)` returns `1` instead of `0`. In `3.3.1`, I changed +it so `length(0.x)`, where `x` could be any number of digits, returned the +`scale`, but `length(0)` still returned `0` because I believe that `0` has `0` +significant digits. + +After request of FreeBSD and considering the arguments of a mathematician, +compatibility with other `bc`'s, and the expectations of users, I decided to +make the change. + +The fixes for manuals fixed a bug where `--` was rendered as `-`. + +## 3.3.2 + +This is a production release that fixes a divide-by-zero bug in `root()` in the +[extended math library][16]. All previous versions with `root()` have the bug. + +## 3.3.1 + +This is a production release that fixes a bug. + +The bug was in the reporting of number length when the value was 0. + ## 3.3.0 This is a production release that changes one behavior and fixes documentation diff --git a/contrib/bc/gen/lib2.bc b/contrib/bc/gen/lib2.bc index b0e651eddcbd..399c7ad3d313 100644 --- a/contrib/bc/gen/lib2.bc +++ b/contrib/bc/gen/lib2.bc @@ -110,7 +110,7 @@ define root(x,n){ if(n<0)sqrt(n) n=n$ if(n==0)x/n - if(n==1)return x + if(x==0||n==1)return x if(n==2)return sqrt(x) s=scale scale=0 diff --git a/contrib/bc/karatsuba.py b/contrib/bc/karatsuba.py index f8087301f54c..cfab4c4f4fbf 100755 --- a/contrib/bc/karatsuba.py +++ b/contrib/bc/karatsuba.py @@ -121,20 +121,20 @@ else: p = run([ "make", "clean" ]) -print("Testing \"make -j4\"") +print("Testing \"make -j12\"") if p.returncode != 0: print("make returned an error ({}); exiting...".format(p.returncode)) sys.exit(p.returncode) -p = run([ "make", "-j4" ]) +p = run([ "make", "-j12" ]) if p.returncode == 0: - makecmd = [ "make", "-j4" ] - print("Using \"make -j4\"") + makecmd = [ "make", "-j12" ] + print("Using \"make -j12\"") else: makecmd = [ "make" ] - print("Not using \"make -j4\"") + print("Not using \"make -j12\"") if test_num != 0: mx2 = test_num diff --git a/contrib/bc/manuals/bc.1.md.in b/contrib/bc/manuals/bc.1.md.in index 1ce83b8237cd..661fcdd45ae4 100644 --- a/contrib/bc/manuals/bc.1.md.in +++ b/contrib/bc/manuals/bc.1.md.in @@ -34,8 +34,7 @@ bc - arbitrary-precision decimal arithmetic language and calculator # SYNOPSIS -**bc** [**-ghilPqsvVw**] [**--global-stacks**] [**--help**] [**--interactive**] [**--mathlib**] [**--no-prompt**] [**--quiet**] [**--standard**] [**--warn**] [**--version**] [**-e** *expr*] [**--expression**=*expr*...] [**-f** *file*...] [**-file**=*file*...] -[*file*...] +**bc** [**-ghilPqsvVw**] [**-\-global-stacks**] [**-\-help**] [**-\-interactive**] [**-\-mathlib**] [**-\-no-prompt**] [**-\-quiet**] [**-\-standard**] [**-\-warn**] [**-\-version**] [**-e** *expr*] [**-\-expression**=*expr*...] [**-f** *file*...] [**-\-file**=*file*...] [*file*...] # DESCRIPTION @@ -61,7 +60,7 @@ especially) the GNU bc(1). The following are the options that bc(1) accepts. -**-g**, **--global-stacks** +**-g**, **-\-global-stacks** {{ A H N P HN HP NP HNP }} : Turns the globals **ibase**, **obase**, **scale**, and **seed** into stacks. @@ -152,17 +151,17 @@ The following are the options that bc(1) accepts. This is a **non-portable extension**. -**-h**, **--help** +**-h**, **-\-help** : Prints a usage message and quits. -**-i**, **--interactive** +**-i**, **-\-interactive** : Forces interactive mode. (See the **INTERACTIVE MODE** section.) This is a **non-portable extension**. -**-l**, **--mathlib** +**-l**, **-\-mathlib** : Sets **scale** (see the **SYNTAX** section) to **20** and loads the included {{ A H N P HN HP NP HNP }} @@ -178,7 +177,7 @@ The following are the options that bc(1) accepts. To learn what is in the library, see the **LIBRARY** section. {{ end }} -**-P**, **--no-prompt** +**-P**, **-\-no-prompt** {{ A E H N EH EN HN EHN }} : Disables the prompt in TTY mode. (The prompt is only enabled in TTY mode. @@ -193,36 +192,36 @@ The following are the options that bc(1) accepts. This is a **non-portable extension**. -**-q**, **--quiet** +**-q**, **-\-quiet** : This option is for compatibility with the [GNU bc(1)][2]; it is a no-op. Without this option, GNU bc(1) prints a copyright header. This bc(1) only prints the copyright header if one or more of the **-v**, **-V**, or - **--version** options are given. + **-\-version** options are given. This is a **non-portable extension**. -**-s**, **--standard** +**-s**, **-\-standard** : Process exactly the language defined by the [standard][1] and error if any extensions are used. This is a **non-portable extension**. -**-v**, **-V**, **--version** +**-v**, **-V**, **-\-version** : Print the version information (copyright header) and exit. This is a **non-portable extension**. -**-w**, **--warn** +**-w**, **-\-warn** -: Like **-s** and **--standard**, except that warnings (and not errors) are +: Like **-s** and **-\-standard**, except that warnings (and not errors) are printed for non-standard extensions and execution continues normally. This is a **non-portable extension**. -**-e** *expr*, **--expression**=*expr* +**-e** *expr*, **-\-expression**=*expr* : Evaluates *expr*. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -232,14 +231,14 @@ The following are the options that bc(1) accepts. If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, bc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**, whether on the + as an argument at least once to **-f** or **-\-file**, whether on the command-line or in **BC_ENV_ARGS**. However, if any other **-e**, - **--expression**, **-f**, or **--file** arguments are given after **-f-** or - equivalent is given, bc(1) will give a fatal error and exit. + **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** + or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. -**-f** *file*, **--file**=*file* +**-f** *file*, **-\-file**=*file* : Reads in *file* and evaluates it, line by line, as though it were read through **stdin**. If expressions are also given (see above), the @@ -248,8 +247,8 @@ The following are the options that bc(1) accepts. If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, bc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**. However, if any other - **-e**, **--expression**, **-f**, or **--file** arguments are given after + as an argument at least once to **-f** or **-\-file**. However, if any other + **-e**, **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -304,8 +303,8 @@ Identifiers with more than one character (letter) are a **ibase** is a global variable determining how to interpret constant numbers. It is the "input" base, or the number base used for interpreting input numbers. -**ibase** is initially **10**. If the **-s** (**--standard**) and **-w** -(**--warn**) flags were not given on the command line, the max allowable value +**ibase** is initially **10**. If the **-s** (**-\-standard**) and **-w** +(**-\-warn**) flags were not given on the command line, the max allowable value for **ibase** is **36**. Otherwise, it is **16**. The min allowable value for **ibase** is **2**. The max allowable value for **ibase** can be queried in bc(1) programs with the **maxibase()** built-in function. @@ -512,7 +511,7 @@ The following arithmetic and logical operators can be used. They are listed in order of decreasing precedence. Operators in the same group have the same precedence. -**++** **--** +**++** **-\-** : Type: Prefix and Postfix @@ -617,7 +616,7 @@ precedence. The operators will be described in more detail below. -**++** **--** +**++** **-\-** : The prefix and postfix **increment** and **decrement** operators behave exactly like they would in C. They require a named expression (see the @@ -962,12 +961,12 @@ This is a **non-portable extension**. {{ A H N P HN HP NP HNP }} All of the functions below, including the functions in the extended math library (see the *Extended Library* subsection below), are available when the -**-l** or **--mathlib** command-line flags are given, except that the extended +**-l** or **-\-mathlib** command-line flags are given, except that the extended math library is not available when the **-s** option, the **-w** option, or equivalents are given. {{ end }} {{ E EH EN EP EHN EHP ENP EHNP }} -All of the functions below are available when the **-l** or **--mathlib** +All of the functions below are available when the **-l** or **-\-mathlib** command-line flags are given. {{ end }} @@ -1020,8 +1019,8 @@ The [standard][1] defines the following functions for the math library: {{ A H N P HN HP NP HNP }} ## Extended Library -The extended library is *not* loaded when the **-s**/**--standard** or -**-w**/**--warn** options are given since they are not part of the library +The extended library is *not* loaded when the **-s**/**-\-standard** or +**-w**/**-\-warn** options are given since they are not part of the library defined by the [standard][1]. The extended library is a **non-portable extension**. @@ -1705,17 +1704,17 @@ The other statuses will only be returned when bc(1) is not in interactive mode (see the **INTERACTIVE MODE** section), since bc(1) resets its state (see the **RESET** section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -**-i** flag or **--interactive** option. +**-i** flag or **-\-interactive** option. These exit statuses allow bc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the **-i** flag or -**--interactive** option. +**-\-interactive** option. # INTERACTIVE MODE Per the [standard][1], bc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both **stdin** and **stdout** -are hooked to a terminal, but the **-i** flag and **--interactive** option can +are hooked to a terminal, but the **-i** flag and **-\-interactive** option can turn it on in other cases. In interactive mode, bc(1) attempts to recover from errors (see the **RESET** diff --git a/contrib/bc/manuals/bc/A.1 b/contrib/bc/manuals/bc/A.1 index d1e80769c855..b38d8d35e71b 100644 --- a/contrib/bc/manuals/bc/A.1 +++ b/contrib/bc/manuals/bc/A.1 @@ -25,19 +25,18 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "March 2021" "Gavin D. Howard" "General Commands Manual" .SH NAME .PP bc - arbitrary-precision decimal arithmetic language and calculator .SH SYNOPSIS .PP -\f[B]bc\f[R] [\f[B]-ghilPqsvVw\f[R]] [\f[B]\[en]global-stacks\f[R]] -[\f[B]\[en]help\f[R]] [\f[B]\[en]interactive\f[R]] -[\f[B]\[en]mathlib\f[R]] [\f[B]\[en]no-prompt\f[R]] -[\f[B]\[en]quiet\f[R]] [\f[B]\[en]standard\f[R]] [\f[B]\[en]warn\f[R]] -[\f[B]\[en]version\f[R]] [\f[B]-e\f[R] \f[I]expr\f[R]] -[\f[B]\[en]expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] -\f[I]file\f[R]\&...] [\f[B]-file\f[R]=\f[I]file\f[R]\&...] +\f[B]bc\f[R] [\f[B]-ghilPqsvVw\f[R]] [\f[B]--global-stacks\f[R]] +[\f[B]--help\f[R]] [\f[B]--interactive\f[R]] [\f[B]--mathlib\f[R]] +[\f[B]--no-prompt\f[R]] [\f[B]--quiet\f[R]] [\f[B]--standard\f[R]] +[\f[B]--warn\f[R]] [\f[B]--version\f[R]] [\f[B]-e\f[R] \f[I]expr\f[R]] +[\f[B]--expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] +\f[I]file\f[R]\&...] [\f[B]--file\f[R]=\f[I]file\f[R]\&...] [\f[I]file\f[R]\&...] .SH DESCRIPTION .PP @@ -60,7 +59,7 @@ implementations. .PP The following are the options that bc(1) accepts. .TP -\f[B]-g\f[R], \f[B]\[en]global-stacks\f[R] +\f[B]-g\f[R], \f[B]--global-stacks\f[R] Turns the globals \f[B]ibase\f[R], \f[B]obase\f[R], \f[B]scale\f[R], and \f[B]seed\f[R] into stacks. .RS @@ -152,10 +151,10 @@ is ignored. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-h\f[R], \f[B]\[en]help\f[R] +\f[B]-h\f[R], \f[B]--help\f[R] Prints a usage message and quits. .TP -\f[B]-i\f[R], \f[B]\[en]interactive\f[R] +\f[B]-i\f[R], \f[B]--interactive\f[R] Forces interactive mode. (See the \f[B]INTERACTIVE MODE\f[R] section.) .RS @@ -163,7 +162,7 @@ Forces interactive mode. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-l\f[R], \f[B]\[en]mathlib\f[R] +\f[B]-l\f[R], \f[B]--mathlib\f[R] Sets \f[B]scale\f[R] (see the \f[B]SYNTAX\f[R] section) to \f[B]20\f[R] and loads the included math library and the extended math library before running any code, including any expressions or files specified on the @@ -173,7 +172,7 @@ command line. To learn what is in the libraries, see the \f[B]LIBRARY\f[R] section. .RE .TP -\f[B]-P\f[R], \f[B]\[en]no-prompt\f[R] +\f[B]-P\f[R], \f[B]--no-prompt\f[R] Disables the prompt in TTY mode. (The prompt is only enabled in TTY mode. See the \f[B]TTY MODE\f[R] section) This is mostly for those users that @@ -185,18 +184,18 @@ Most of those users would want to put this option in This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-q\f[R], \f[B]\[en]quiet\f[R] +\f[B]-q\f[R], \f[B]--quiet\f[R] This option is for compatibility with the GNU bc(1) (https://www.gnu.org/software/bc/); it is a no-op. Without this option, GNU bc(1) prints a copyright header. This bc(1) only prints the copyright header if one or more of the -\f[B]-v\f[R], \f[B]-V\f[R], or \f[B]\[en]version\f[R] options are given. +\f[B]-v\f[R], \f[B]-V\f[R], or \f[B]--version\f[R] options are given. .RS .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-s\f[R], \f[B]\[en]standard\f[R] +\f[B]-s\f[R], \f[B]--standard\f[R] Process exactly the language defined by the standard (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html) and error if any extensions are used. @@ -205,15 +204,15 @@ and error if any extensions are used. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-v\f[R], \f[B]-V\f[R], \f[B]\[en]version\f[R] +\f[B]-v\f[R], \f[B]-V\f[R], \f[B]--version\f[R] Print the version information (copyright header) and exit. .RS .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-w\f[R], \f[B]\[en]warn\f[R] -Like \f[B]-s\f[R] and \f[B]\[en]standard\f[R], except that warnings (and +\f[B]-w\f[R], \f[B]--warn\f[R] +Like \f[B]-s\f[R] and \f[B]--standard\f[R], except that warnings (and not errors) are printed for non-standard extensions and execution continues normally. .RS @@ -221,7 +220,7 @@ continues normally. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-e\f[R] \f[I]expr\f[R], \f[B]\[en]expression\f[R]=\f[I]expr\f[R] +\f[B]-e\f[R] \f[I]expr\f[R], \f[B]--expression\f[R]=\f[I]expr\f[R] Evaluates \f[I]expr\f[R]. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -234,17 +233,17 @@ If this option is given on the command-line (i.e., not in \f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]-f\f[R] or \f[B]--file\f[R], whether on the command-line or in \f[B]BC_ENV_ARGS\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and exit. .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-f\f[R] \f[I]file\f[R], \f[B]\[en]file\f[R]=\f[I]file\f[R] +\f[B]-f\f[R] \f[I]file\f[R], \f[B]--file\f[R]=\f[I]file\f[R] Reads in \f[I]file\f[R] and evaluates it, line by line, as though it were read through \f[B]stdin\f[R]. If expressions are also given (see above), the expressions are evaluated @@ -255,9 +254,9 @@ If this option is given on the command-line (i.e., not in \f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f\f[R] or \f[B]--file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and exit. .PP @@ -322,8 +321,8 @@ constant numbers. It is the \[lq]input\[rq] base, or the number base used for interpreting input numbers. \f[B]ibase\f[R] is initially \f[B]10\f[R]. -If the \f[B]-s\f[R] (\f[B]\[en]standard\f[R]) and \f[B]-w\f[R] -(\f[B]\[en]warn\f[R]) flags were not given on the command line, the max +If the \f[B]-s\f[R] (\f[B]--standard\f[R]) and \f[B]-w\f[R] +(\f[B]--warn\f[R]) flags were not given on the command line, the max allowable value for \f[B]ibase\f[R] is \f[B]36\f[R]. Otherwise, it is \f[B]16\f[R]. The min allowable value for \f[B]ibase\f[R] is \f[B]2\f[R]. @@ -582,7 +581,7 @@ The following arithmetic and logical operators can be used. They are listed in order of decreasing precedence. Operators in the same group have the same precedence. .TP -\f[B]++\f[R] \f[B]\[en]\f[R] +\f[B]++\f[R] \f[B]--\f[R] Type: Prefix and Postfix .RS .PP @@ -692,7 +691,7 @@ Description: \f[B]boolean or\f[R] .PP The operators will be described in more detail below. .TP -\f[B]++\f[R] \f[B]\[en]\f[R] +\f[B]++\f[R] \f[B]--\f[R] The prefix and postfix \f[B]increment\f[R] and \f[B]decrement\f[R] operators behave exactly like they would in C. They require a named expression (see the \f[I]Named Expressions\f[R] @@ -1138,7 +1137,7 @@ This is a \f[B]non-portable extension\f[R]. .PP All of the functions below, including the functions in the extended math library (see the \f[I]Extended Library\f[R] subsection below), are -available when the \f[B]-l\f[R] or \f[B]\[en]mathlib\f[R] command-line +available when the \f[B]-l\f[R] or \f[B]--mathlib\f[R] command-line flags are given, except that the extended math library is not available when the \f[B]-s\f[R] option, the \f[B]-w\f[R] option, or equivalents are given. @@ -1199,7 +1198,7 @@ Functions\f[R] subsection below). .SS Extended Library .PP The extended library is \f[I]not\f[R] loaded when the -\f[B]-s\f[R]/\f[B]\[en]standard\f[R] or \f[B]-w\f[R]/\f[B]\[en]warn\f[R] +\f[B]-s\f[R]/\f[B]--standard\f[R] or \f[B]-w\f[R]/\f[B]--warn\f[R] options are given since they are not part of the library defined by the standard (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html). .PP @@ -1957,11 +1956,11 @@ interactive mode (see the \f[B]INTERACTIVE MODE\f[R] section), since bc(1) resets its state (see the \f[B]RESET\f[R] section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .PP These exit statuses allow bc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the -\f[B]-i\f[R] flag or \f[B]\[en]interactive\f[R] option. +\f[B]-i\f[R] flag or \f[B]--interactive\f[R] option. .SH INTERACTIVE MODE .PP Per the @@ -1969,7 +1968,7 @@ standard (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html), bc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both \f[B]stdin\f[R] and \f[B]stdout\f[R] are hooked to a terminal, but the \f[B]-i\f[R] flag -and \f[B]\[en]interactive\f[R] option can turn it on in other cases. +and \f[B]--interactive\f[R] option can turn it on in other cases. .PP In interactive mode, bc(1) attempts to recover from errors (see the \f[B]RESET\f[R] section), and in normal execution, flushes diff --git a/contrib/bc/manuals/bc/A.1.md b/contrib/bc/manuals/bc/A.1.md index 0cf7a4a0d70e..04f37c6bb724 100644 --- a/contrib/bc/manuals/bc/A.1.md +++ b/contrib/bc/manuals/bc/A.1.md @@ -34,8 +34,7 @@ bc - arbitrary-precision decimal arithmetic language and calculator # SYNOPSIS -**bc** [**-ghilPqsvVw**] [**--global-stacks**] [**--help**] [**--interactive**] [**--mathlib**] [**--no-prompt**] [**--quiet**] [**--standard**] [**--warn**] [**--version**] [**-e** *expr*] [**--expression**=*expr*...] [**-f** *file*...] [**-file**=*file*...] -[*file*...] +**bc** [**-ghilPqsvVw**] [**-\-global-stacks**] [**-\-help**] [**-\-interactive**] [**-\-mathlib**] [**-\-no-prompt**] [**-\-quiet**] [**-\-standard**] [**-\-warn**] [**-\-version**] [**-e** *expr*] [**-\-expression**=*expr*...] [**-f** *file*...] [**-\-file**=*file*...] [*file*...] # DESCRIPTION @@ -55,7 +54,7 @@ other implementations. The following are the options that bc(1) accepts. -**-g**, **--global-stacks** +**-g**, **-\-global-stacks** : Turns the globals **ibase**, **obase**, **scale**, and **seed** into stacks. @@ -123,17 +122,17 @@ The following are the options that bc(1) accepts. This is a **non-portable extension**. -**-h**, **--help** +**-h**, **-\-help** : Prints a usage message and quits. -**-i**, **--interactive** +**-i**, **-\-interactive** : Forces interactive mode. (See the **INTERACTIVE MODE** section.) This is a **non-portable extension**. -**-l**, **--mathlib** +**-l**, **-\-mathlib** : Sets **scale** (see the **SYNTAX** section) to **20** and loads the included math library and the extended math library before running any code, @@ -141,7 +140,7 @@ The following are the options that bc(1) accepts. To learn what is in the libraries, see the **LIBRARY** section. -**-P**, **--no-prompt** +**-P**, **-\-no-prompt** : Disables the prompt in TTY mode. (The prompt is only enabled in TTY mode. See the **TTY MODE** section) This is mostly for those users that do not @@ -151,36 +150,36 @@ The following are the options that bc(1) accepts. This is a **non-portable extension**. -**-q**, **--quiet** +**-q**, **-\-quiet** : This option is for compatibility with the [GNU bc(1)][2]; it is a no-op. Without this option, GNU bc(1) prints a copyright header. This bc(1) only prints the copyright header if one or more of the **-v**, **-V**, or - **--version** options are given. + **-\-version** options are given. This is a **non-portable extension**. -**-s**, **--standard** +**-s**, **-\-standard** : Process exactly the language defined by the [standard][1] and error if any extensions are used. This is a **non-portable extension**. -**-v**, **-V**, **--version** +**-v**, **-V**, **-\-version** : Print the version information (copyright header) and exit. This is a **non-portable extension**. -**-w**, **--warn** +**-w**, **-\-warn** -: Like **-s** and **--standard**, except that warnings (and not errors) are +: Like **-s** and **-\-standard**, except that warnings (and not errors) are printed for non-standard extensions and execution continues normally. This is a **non-portable extension**. -**-e** *expr*, **--expression**=*expr* +**-e** *expr*, **-\-expression**=*expr* : Evaluates *expr*. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -190,14 +189,14 @@ The following are the options that bc(1) accepts. If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, bc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**, whether on the + as an argument at least once to **-f** or **-\-file**, whether on the command-line or in **BC_ENV_ARGS**. However, if any other **-e**, - **--expression**, **-f**, or **--file** arguments are given after **-f-** or - equivalent is given, bc(1) will give a fatal error and exit. + **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** + or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. -**-f** *file*, **--file**=*file* +**-f** *file*, **-\-file**=*file* : Reads in *file* and evaluates it, line by line, as though it were read through **stdin**. If expressions are also given (see above), the @@ -206,8 +205,8 @@ The following are the options that bc(1) accepts. If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, see the **ENVIRONMENT VARIABLES** section), then after processing all expressions and files, bc(1) will exit, unless **-** (**stdin**) was given - as an argument at least once to **-f** or **--file**. However, if any other - **-e**, **--expression**, **-f**, or **--file** arguments are given after + as an argument at least once to **-f** or **-\-file**. However, if any other + **-e**, **-\-expression**, **-f**, or **-\-file** arguments are given after **-f-** or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -262,8 +261,8 @@ Identifiers with more than one character (letter) are a **ibase** is a global variable determining how to interpret constant numbers. It is the "input" base, or the number base used for interpreting input numbers. -**ibase** is initially **10**. If the **-s** (**--standard**) and **-w** -(**--warn**) flags were not given on the command line, the max allowable value +**ibase** is initially **10**. If the **-s** (**-\-standard**) and **-w** +(**-\-warn**) flags were not given on the command line, the max allowable value for **ibase** is **36**. Otherwise, it is **16**. The min allowable value for **ibase** is **2**. The max allowable value for **ibase** can be queried in bc(1) programs with the **maxibase()** built-in function. @@ -453,7 +452,7 @@ The following arithmetic and logical operators can be used. They are listed in order of decreasing precedence. Operators in the same group have the same precedence. -**++** **--** +**++** **-\-** : Type: Prefix and Postfix @@ -551,7 +550,7 @@ precedence. The operators will be described in more detail below. -**++** **--** +**++** **-\-** : The prefix and postfix **increment** and **decrement** operators behave exactly like they would in C. They require a named expression (see the @@ -882,7 +881,7 @@ This is a **non-portable extension**. All of the functions below, including the functions in the extended math library (see the *Extended Library* subsection below), are available when the -**-l** or **--mathlib** command-line flags are given, except that the extended +**-l** or **-\-mathlib** command-line flags are given, except that the extended math library is not available when the **-s** option, the **-w** option, or equivalents are given. @@ -934,8 +933,8 @@ The [standard][1] defines the following functions for the math library: ## Extended Library -The extended library is *not* loaded when the **-s**/**--standard** or -**-w**/**--warn** options are given since they are not part of the library +The extended library is *not* loaded when the **-s**/**-\-standard** or +**-w**/**-\-warn** options are given since they are not part of the library defined by the [standard][1]. The extended library is a **non-portable extension**. @@ -1603,17 +1602,17 @@ The other statuses will only be returned when bc(1) is not in interactive mode (see the **INTERACTIVE MODE** section), since bc(1) resets its state (see the **RESET** section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -**-i** flag or **--interactive** option. +**-i** flag or **-\-interactive** option. These exit statuses allow bc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the **-i** flag or -**--interactive** option. +**-\-interactive** option. # INTERACTIVE MODE Per the [standard][1], bc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both **stdin** and **stdout** -are hooked to a terminal, but the **-i** flag and **--interactive** option can +are hooked to a terminal, but the **-i** flag and **-\-interactive** option can turn it on in other cases. In interactive mode, bc(1) attempts to recover from errors (see the **RESET** diff --git a/contrib/bc/manuals/bc/E.1 b/contrib/bc/manuals/bc/E.1 index 597cde782788..9023b07c6b87 100644 --- a/contrib/bc/manuals/bc/E.1 +++ b/contrib/bc/manuals/bc/E.1 @@ -25,19 +25,18 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "March 2021" "Gavin D. Howard" "General Commands Manual" .SH NAME .PP bc - arbitrary-precision decimal arithmetic language and calculator .SH SYNOPSIS .PP -\f[B]bc\f[R] [\f[B]-ghilPqsvVw\f[R]] [\f[B]\[en]global-stacks\f[R]] -[\f[B]\[en]help\f[R]] [\f[B]\[en]interactive\f[R]] -[\f[B]\[en]mathlib\f[R]] [\f[B]\[en]no-prompt\f[R]] -[\f[B]\[en]quiet\f[R]] [\f[B]\[en]standard\f[R]] [\f[B]\[en]warn\f[R]] -[\f[B]\[en]version\f[R]] [\f[B]-e\f[R] \f[I]expr\f[R]] -[\f[B]\[en]expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] -\f[I]file\f[R]\&...] [\f[B]-file\f[R]=\f[I]file\f[R]\&...] +\f[B]bc\f[R] [\f[B]-ghilPqsvVw\f[R]] [\f[B]--global-stacks\f[R]] +[\f[B]--help\f[R]] [\f[B]--interactive\f[R]] [\f[B]--mathlib\f[R]] +[\f[B]--no-prompt\f[R]] [\f[B]--quiet\f[R]] [\f[B]--standard\f[R]] +[\f[B]--warn\f[R]] [\f[B]--version\f[R]] [\f[B]-e\f[R] \f[I]expr\f[R]] +[\f[B]--expression\f[R]=\f[I]expr\f[R]\&...] [\f[B]-f\f[R] +\f[I]file\f[R]\&...] [\f[B]--file\f[R]=\f[I]file\f[R]\&...] [\f[I]file\f[R]\&...] .SH DESCRIPTION .PP @@ -58,7 +57,7 @@ This bc(1) is a drop-in replacement for \f[I]any\f[R] bc(1), including .PP The following are the options that bc(1) accepts. .PP -\f[B]-g\f[R], \f[B]\[en]global-stacks\f[R] +\f[B]-g\f[R], \f[B]--global-stacks\f[R] .IP .nf \f[C] @@ -115,10 +114,10 @@ This is a **non-portable extension**. \f[R] .fi .TP -\f[B]-h\f[R], \f[B]\[en]help\f[R] +\f[B]-h\f[R], \f[B]--help\f[R] Prints a usage message and quits. .TP -\f[B]-i\f[R], \f[B]\[en]interactive\f[R] +\f[B]-i\f[R], \f[B]--interactive\f[R] Forces interactive mode. (See the \f[B]INTERACTIVE MODE\f[R] section.) .RS @@ -126,7 +125,7 @@ Forces interactive mode. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-l\f[R], \f[B]\[en]mathlib\f[R] +\f[B]-l\f[R], \f[B]--mathlib\f[R] Sets \f[B]scale\f[R] (see the \f[B]SYNTAX\f[R] section) to \f[B]20\f[R] and loads the included math library before running any code, including any expressions or files specified on the command line. @@ -135,7 +134,7 @@ any expressions or files specified on the command line. To learn what is in the library, see the \f[B]LIBRARY\f[R] section. .RE .TP -\f[B]-P\f[R], \f[B]\[en]no-prompt\f[R] +\f[B]-P\f[R], \f[B]--no-prompt\f[R] Disables the prompt in TTY mode. (The prompt is only enabled in TTY mode. See the \f[B]TTY MODE\f[R] section) This is mostly for those users that @@ -147,18 +146,18 @@ Most of those users would want to put this option in This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-q\f[R], \f[B]\[en]quiet\f[R] +\f[B]-q\f[R], \f[B]--quiet\f[R] This option is for compatibility with the GNU bc(1) (https://www.gnu.org/software/bc/); it is a no-op. Without this option, GNU bc(1) prints a copyright header. This bc(1) only prints the copyright header if one or more of the -\f[B]-v\f[R], \f[B]-V\f[R], or \f[B]\[en]version\f[R] options are given. +\f[B]-v\f[R], \f[B]-V\f[R], or \f[B]--version\f[R] options are given. .RS .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-s\f[R], \f[B]\[en]standard\f[R] +\f[B]-s\f[R], \f[B]--standard\f[R] Process exactly the language defined by the standard (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html) and error if any extensions are used. @@ -167,15 +166,15 @@ and error if any extensions are used. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-v\f[R], \f[B]-V\f[R], \f[B]\[en]version\f[R] +\f[B]-v\f[R], \f[B]-V\f[R], \f[B]--version\f[R] Print the version information (copyright header) and exit. .RS .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-w\f[R], \f[B]\[en]warn\f[R] -Like \f[B]-s\f[R] and \f[B]\[en]standard\f[R], except that warnings (and +\f[B]-w\f[R], \f[B]--warn\f[R] +Like \f[B]-s\f[R] and \f[B]--standard\f[R], except that warnings (and not errors) are printed for non-standard extensions and execution continues normally. .RS @@ -183,7 +182,7 @@ continues normally. This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-e\f[R] \f[I]expr\f[R], \f[B]\[en]expression\f[R]=\f[I]expr\f[R] +\f[B]-e\f[R] \f[I]expr\f[R], \f[B]--expression\f[R]=\f[I]expr\f[R] Evaluates \f[I]expr\f[R]. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are @@ -196,17 +195,17 @@ If this option is given on the command-line (i.e., not in \f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]-f\f[R] or \f[B]--file\f[R], whether on the command-line or in \f[B]BC_ENV_ARGS\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and exit. .PP This is a \f[B]non-portable extension\f[R]. .RE .TP -\f[B]-f\f[R] \f[I]file\f[R], \f[B]\[en]file\f[R]=\f[I]file\f[R] +\f[B]-f\f[R] \f[I]file\f[R], \f[B]--file\f[R]=\f[I]file\f[R] Reads in \f[I]file\f[R] and evaluates it, line by line, as though it were read through \f[B]stdin\f[R]. If expressions are also given (see above), the expressions are evaluated @@ -217,9 +216,9 @@ If this option is given on the command-line (i.e., not in \f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. -However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f\f[R] or \f[B]--file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]--expression\f[R], +\f[B]-f\f[R], or \f[B]--file\f[R] arguments are given after \f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and exit. .PP @@ -284,8 +283,8 @@ constant numbers. It is the \[lq]input\[rq] base, or the number base used for interpreting input numbers. \f[B]ibase\f[R] is initially \f[B]10\f[R]. -If the \f[B]-s\f[R] (\f[B]\[en]standard\f[R]) and \f[B]-w\f[R] -(\f[B]\[en]warn\f[R]) flags were not given on the command line, the max +If the \f[B]-s\f[R] (\f[B]--standard\f[R]) and \f[B]-w\f[R] +(\f[B]--warn\f[R]) flags were not given on the command line, the max allowable value for \f[B]ibase\f[R] is \f[B]36\f[R]. Otherwise, it is \f[B]16\f[R]. The min allowable value for \f[B]ibase\f[R] is \f[B]2\f[R]. @@ -445,7 +444,7 @@ The following arithmetic and logical operators can be used. They are listed in order of decreasing precedence. Operators in the same group have the same precedence. .TP *** 11304 LINES SKIPPED *** From owner-dev-commits-src-main@freebsd.org Fri Mar 5 14:56:28 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C0B4555CA6B; Fri, 5 Mar 2021 14:56:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DsW5m52Cjz4kY8; Fri, 5 Mar 2021 14:56:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9F9C6125B3; Fri, 5 Mar 2021 14:56:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 125EuSCV035365; Fri, 5 Mar 2021 14:56:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 125EuS8B035364; Fri, 5 Mar 2021 14:56:28 GMT (envelope-from git) Date: Fri, 5 Mar 2021 14:56:28 GMT Message-Id: <202103051456.125EuS8B035364@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Martin Matuska Subject: git: 6781b8a32e70 - main - zfs: update openzfs version reference to bedbc13da MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6781b8a32e702c694d3f813959d326e36facc19f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2021 14:56:28 -0000 The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=6781b8a32e702c694d3f813959d326e36facc19f commit 6781b8a32e702c694d3f813959d326e36facc19f Author: Martin Matuska AuthorDate: 2021-03-05 14:52:04 +0000 Commit: Martin Matuska CommitDate: 2021-03-05 14:55:58 +0000 zfs: update openzfs version reference to bedbc13da It was missed in the latest merge. X-MFC-with: caed7b1c399de04279822028e15b36367e84232f --- sys/modules/zfs/zfs_config.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/modules/zfs/zfs_config.h b/sys/modules/zfs/zfs_config.h index 0ef2200d1940..ae5316a46f10 100644 --- a/sys/modules/zfs/zfs_config.h +++ b/sys/modules/zfs/zfs_config.h @@ -734,7 +734,7 @@ /* #undef ZFS_IS_GPL_COMPATIBLE */ /* Define the project alias string. */ -#define ZFS_META_ALIAS "zfs-2.0.0-FreeBSD_gbf156c966" +#define ZFS_META_ALIAS "zfs-2.0.0-FreeBSD_gbedbc13da" /* Define the project author. */ #define ZFS_META_AUTHOR "OpenZFS" @@ -764,7 +764,7 @@ #define ZFS_META_NAME "zfs" /* Define the project release. */ -#define ZFS_META_RELEASE "FreeBSD_g9312e0fd1" +#define ZFS_META_RELEASE "FreeBSD_gbedbc13da" /* Define the project version. */ #define ZFS_META_VERSION "2.0.0" From owner-dev-commits-src-main@freebsd.org Fri Mar 5 15:03:09 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6675055CF48; Fri, 5 Mar 2021 15:03:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DsWFT2T50z4lGJ; Fri, 5 Mar 2021 15:03:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 45781123F7; Fri, 5 Mar 2021 15:03:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 125F39pb048641; Fri, 5 Mar 2021 15:03:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 125F39jm048640; Fri, 5 Mar 2021 15:03:09 GMT (envelope-from git) Date: Fri, 5 Mar 2021 15:03:09 GMT Message-Id: <202103051503.125F39jm048640@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 705d06b289e9 - main - rack: unbreak TCP fast open for the client side MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 705d06b289e9821439b7b694d766cad75bc064e5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2021 15:03:09 -0000 The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=705d06b289e9821439b7b694d766cad75bc064e5 commit 705d06b289e9821439b7b694d766cad75bc064e5 Author: Michael Tuexen AuthorDate: 2021-03-05 14:57:26 +0000 Commit: Michael Tuexen CommitDate: 2021-03-05 15:03:03 +0000 rack: unbreak TCP fast open for the client side Allow sending user data on the SYN segment. Reviewed by: rrs MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D29082 Sponsored by: Netflix, Inc. --- sys/netinet/tcp_stacks/rack.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index 98a6f0f2e924..f5b0de7cbc59 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -12297,7 +12297,8 @@ again: * If sack_rxmit is true we are retransmitting from the scoreboard * in which case len is already set. */ - if ((sack_rxmit == 0) && TCPS_HAVEESTABLISHED(tp->t_state)) { + if ((sack_rxmit == 0) && + (TCPS_HAVEESTABLISHED(tp->t_state) || IS_FASTOPEN(tp->t_flags))) { uint32_t avail; avail = sbavail(sb); From owner-dev-commits-src-main@freebsd.org Fri Mar 5 17:06:15 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9958455F9F5; Fri, 5 Mar 2021 17:06:15 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DsYzW3hPtz4sB4; Fri, 5 Mar 2021 17:06:15 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qk1-f169.google.com (mail-qk1-f169.google.com [209.85.222.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 71F60A850; Fri, 5 Mar 2021 17:06:15 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qk1-f169.google.com with SMTP id b130so2623023qkc.10; Fri, 05 Mar 2021 09:06:15 -0800 (PST) X-Gm-Message-State: AOAM531G3WwEXTiFo8MUnuSCwyBTCG0qRFa5R/EsYy80HDsjzyM1ROSf gzYGut/UGf6F16y5x77TrxhJ8NOMSaZ+seX/Znc= X-Google-Smtp-Source: ABdhPJx/ktmA3DMOSHjItdWL74ZYIdVcndOlnrZrv1BfPE+G5pf674IsTYgHDfyzK6VUB6oENMRFm3c8LOX88f09b3o= X-Received: by 2002:a37:988:: with SMTP id 130mr10671117qkj.120.1614963974909; Fri, 05 Mar 2021 09:06:14 -0800 (PST) MIME-Version: 1.0 References: <202102192213.11JMDoiL080275@gitrepo.freebsd.org> In-Reply-To: <202102192213.11JMDoiL080275@gitrepo.freebsd.org> From: Kyle Evans Date: Fri, 5 Mar 2021 11:06:01 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: d4380c0cdd05 - main - jail: Change both root and working directories in jail_attach(2) To: Jamie Gritton Cc: src-committers , "" , dev-commits-src-main@freebsd.org, jails@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2021 17:06:15 -0000 On Fri, Feb 19, 2021 at 4:13 PM Jamie Gritton wrote: > > The branch main has been updated by jamie: > > URL: https://cgit.FreeBSD.org/src/commit/?id=d4380c0cdd0517dc038403dd5c99242ce78bdeb5 > > commit d4380c0cdd0517dc038403dd5c99242ce78bdeb5 > Author: Jamie Gritton > AuthorDate: 2021-02-19 22:13:35 +0000 > Commit: Jamie Gritton > CommitDate: 2021-02-19 22:13:35 +0000 > > jail: Change both root and working directories in jail_attach(2) > > jail_attach(2) performs an internal chroot operation, leaving it up to > the calling process to assure the working directory is inside the jail. > > Add a matching internal chdir operation to the jail's root. Also > ignore kern.chroot_allow_open_directories, and always disallow the > operation if there are any directory descriptors open. > Any reason we shouldn't go ahead and drop the explicit chdir() from jexec(8) and jail(8) now that jail_attach *is* guaranteed to chdir along with its chroot? Thanks, Kyle Evans From owner-dev-commits-src-main@freebsd.org Fri Mar 5 17:18:39 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9D47055FF49; Fri, 5 Mar 2021 17:18:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DsZFq46Gvz4sx0; Fri, 5 Mar 2021 17:18:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7FAB514539; Fri, 5 Mar 2021 17:18:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 125HIduf021610; Fri, 5 Mar 2021 17:18:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 125HIdrO021609; Fri, 5 Mar 2021 17:18:39 GMT (envelope-from git) Date: Fri, 5 Mar 2021 17:18:39 GMT Message-Id: <202103051718.125HIdrO021609@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Richard Scheffenegger Subject: git: 4a8f3aad37dd - main - tcp: remove incorrect reset of SACK variable in PRR MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4a8f3aad37dd35c905e34b64b022d60844ba8d01 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2021 17:18:39 -0000 The branch main has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=4a8f3aad37dd35c905e34b64b022d60844ba8d01 commit 4a8f3aad37dd35c905e34b64b022d60844ba8d01 Author: Richard Scheffenegger AuthorDate: 2021-03-05 16:45:23 +0000 Commit: Richard Scheffenegger CommitDate: 2021-03-05 16:45:54 +0000 tcp: remove incorrect reset of SACK variable in PRR Reviewed By: #transport, rrs, tuexen PR: 253848 MFC after: 3 days Sponsored By: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D29083 --- sys/netinet/tcp_input.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 89e70df48774..a5d2e1676364 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -2693,7 +2693,6 @@ enter_recovery: */ tp->sackhint.prr_delivered = tp->sackhint.sacked_bytes; - tp->sackhint.sack_bytes_rexmit = 0; tp->sackhint.recover_fs = max(1, tp->snd_nxt - tp->snd_una); } From owner-dev-commits-src-main@freebsd.org Fri Mar 5 17:23:37 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A31DF5602D6; Fri, 5 Mar 2021 17:23:37 +0000 (UTC) (envelope-from jamie@freebsd.org) Received: from gritton.org (gritton.org [199.192.165.131]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4DsZMY3G5zz4tKL; Fri, 5 Mar 2021 17:23:37 +0000 (UTC) (envelope-from jamie@freebsd.org) Received: from gritton.org ([127.0.0.131]) (authenticated bits=0) by gritton.org (8.15.2/8.15.2) with ESMTPA id 125H9l3V072082; Fri, 5 Mar 2021 09:09:47 -0800 (PST) (envelope-from jamie@freebsd.org) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 05 Mar 2021 09:09:47 -0800 From: James Gritton To: Kyle Evans Cc: src-committers , , dev-commits-src-main@freebsd.org, jails@freebsd.org Subject: Re: git: d4380c0cdd05 - main - jail: Change both root and working directories in jail_attach(2) In-Reply-To: References: <202102192213.11JMDoiL080275@gitrepo.freebsd.org> User-Agent: Roundcube Webmail/1.4.1 Message-ID: <2b8a8650271cb14c0a236aa8a79bac74@freebsd.org> X-Sender: jamie@freebsd.org X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.2 (gritton.org [127.0.0.131]); Fri, 05 Mar 2021 09:09:47 -0800 (PST) X-Rspamd-Queue-Id: 4DsZMY3G5zz4tKL X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2021 17:23:37 -0000 It's superfluous now, as long as the newest kernel is running. The only problem is if people install the new binaries under an older kernel. That's why I've been letting it sit so far. - Jamie On 2021-03-05 09:06, Kyle Evans wrote: > On Fri, Feb 19, 2021 at 4:13 PM Jamie Gritton > wrote: >> >> The branch main has been updated by jamie: >> >> URL: >> https://cgit.FreeBSD.org/src/commit/?id=d4380c0cdd0517dc038403dd5c99242ce78bdeb5 >> >> commit d4380c0cdd0517dc038403dd5c99242ce78bdeb5 >> Author: Jamie Gritton >> AuthorDate: 2021-02-19 22:13:35 +0000 >> Commit: Jamie Gritton >> CommitDate: 2021-02-19 22:13:35 +0000 >> >> jail: Change both root and working directories in jail_attach(2) >> >> jail_attach(2) performs an internal chroot operation, leaving it >> up to >> the calling process to assure the working directory is inside the >> jail. >> >> Add a matching internal chdir operation to the jail's root. Also >> ignore kern.chroot_allow_open_directories, and always disallow the >> operation if there are any directory descriptors open. >> > > Any reason we shouldn't go ahead and drop the explicit chdir() from > jexec(8) and jail(8) now that jail_attach *is* guaranteed to chdir > along with its chroot? > > Thanks, > > Kyle Evans From owner-dev-commits-src-main@freebsd.org Fri Mar 5 17:24:13 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B7EAA560784; Fri, 5 Mar 2021 17:24:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DsZNF4sRdz4tgl; Fri, 5 Mar 2021 17:24:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 99B96147A3; Fri, 5 Mar 2021 17:24:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 125HOD39034605; Fri, 5 Mar 2021 17:24:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 125HODvp034604; Fri, 5 Mar 2021 17:24:13 GMT (envelope-from git) Date: Fri, 5 Mar 2021 17:24:13 GMT Message-Id: <202103051724.125HODvp034604@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Richard Scheffenegger Subject: git: 9a13d9dceee2 - main - tcp: remove a superfluous local var in tcp_sack_partialack() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9a13d9dceee27fc1bf6fb7e58e83c88707665859 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2021 17:24:13 -0000 The branch main has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=9a13d9dceee27fc1bf6fb7e58e83c88707665859 commit 9a13d9dceee27fc1bf6fb7e58e83c88707665859 Author: Richard Scheffenegger AuthorDate: 2021-03-05 17:19:16 +0000 Commit: Richard Scheffenegger CommitDate: 2021-03-05 17:20:23 +0000 tcp: remove a superfluous local var in tcp_sack_partialack() No functional change. Reviewed By: #transport, tuexen MFC after: 3 days Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D29088 --- sys/netinet/tcp_sack.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/netinet/tcp_sack.c b/sys/netinet/tcp_sack.c index 28cd5c93f106..37db30007580 100644 --- a/sys/netinet/tcp_sack.c +++ b/sys/netinet/tcp_sack.c @@ -832,7 +832,6 @@ tcp_sack_partialack(struct tcpcb *tp, struct tcphdr *th) TAILQ_EMPTY(&tp->snd_holes) && (tp->sackhint.delivered_data > 0)) { struct sackhole *hole; - int maxseg = tcp_maxseg(tp); hole = tcp_sackhole_insert(tp, SEQ_MAX(th->th_ack, tp->snd_max - maxseg), tp->snd_max, NULL); } (void) tp->t_fb->tfb_tcp_output(tp); From owner-dev-commits-src-main@freebsd.org Fri Mar 5 17:54:13 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EAEE6560DE1; Fri, 5 Mar 2021 17:54:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dsb2s6LNfz3D0D; Fri, 5 Mar 2021 17:54:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CC85614F08; Fri, 5 Mar 2021 17:54:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 125HsDun073373; Fri, 5 Mar 2021 17:54:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 125HsD12073372; Fri, 5 Mar 2021 17:54:13 GMT (envelope-from git) Date: Fri, 5 Mar 2021 17:54:13 GMT Message-Id: <202103051754.125HsD12073372@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 732b69c9f9c8 - main - acpi: Make nexus_acpi quiet on amd64 and i386 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 732b69c9f9c84408e7e680a93ab91ce76ffef2ce Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2021 17:54:14 -0000 The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=732b69c9f9c84408e7e680a93ab91ce76ffef2ce commit 732b69c9f9c84408e7e680a93ab91ce76ffef2ce Author: Mark Johnston AuthorDate: 2021-03-05 17:53:30 +0000 Commit: Mark Johnston CommitDate: 2021-03-05 17:54:00 +0000 acpi: Make nexus_acpi quiet on amd64 and i386 Otherwise during attach newbus prints "nexus0", which is not very useful. The generic nexus device is already quiet, as is nexus_acpi on arm64. MFC after: 1 week Sponsored by: The FreeBSD Foundation --- sys/amd64/acpica/acpi_machdep.c | 2 +- sys/i386/acpica/acpi_machdep.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/amd64/acpica/acpi_machdep.c b/sys/amd64/acpica/acpi_machdep.c index 60e470d14cbb..7d8b303f6f16 100644 --- a/sys/amd64/acpica/acpi_machdep.c +++ b/sys/amd64/acpica/acpi_machdep.c @@ -262,7 +262,7 @@ nexus_acpi_probe(device_t dev) error = acpi_identify(); if (error) return (error); - + device_quiet(dev); return (BUS_PROBE_DEFAULT); } diff --git a/sys/i386/acpica/acpi_machdep.c b/sys/i386/acpica/acpi_machdep.c index 63efe4f520fd..e8810ac88009 100644 --- a/sys/i386/acpica/acpi_machdep.c +++ b/sys/i386/acpica/acpi_machdep.c @@ -280,7 +280,7 @@ nexus_acpi_probe(device_t dev) error = acpi_identify(); if (error) return (error); - + device_quiet(dev); return (BUS_PROBE_DEFAULT); } From owner-dev-commits-src-main@freebsd.org Fri Mar 5 17:55:35 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BDF535615C6; Fri, 5 Mar 2021 17:55:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dsb4R4zgYz3DDG; Fri, 5 Mar 2021 17:55:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9E40C14DAE; Fri, 5 Mar 2021 17:55:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 125HtZjT073705; Fri, 5 Mar 2021 17:55:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 125HtZsc073704; Fri, 5 Mar 2021 17:55:35 GMT (envelope-from git) Date: Fri, 5 Mar 2021 17:55:35 GMT Message-Id: <202103051755.125HtZsc073704@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: bb6e84c988d3 - main - poly1305: Don't export generic Poly1305_* symbols from xform_poly1305.c. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bb6e84c988d3f54eff602ed544ceaa9b9fe3e9ff Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2021 17:55:35 -0000 The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=bb6e84c988d3f54eff602ed544ceaa9b9fe3e9ff commit bb6e84c988d3f54eff602ed544ceaa9b9fe3e9ff Author: John Baldwin AuthorDate: 2021-03-05 17:47:58 +0000 Commit: John Baldwin CommitDate: 2021-03-05 17:55:11 +0000 poly1305: Don't export generic Poly1305_* symbols from xform_poly1305.c. There currently isn't a need to provide a public interface to a software Poly1305 implementation beyond what is already available via libsodium's APIs and these symbols conflict with symbols shared within the ossl.ko module between ossl_poly1305.c and ossl_chacha20.c. Reported by: se, kp Fixes: 78991a93eb9d Sponsored by: Netflix --- sys/opencrypto/xform_poly1305.c | 43 ++++++++++++----------------------------- sys/opencrypto/xform_poly1305.h | 16 --------------- 2 files changed, 12 insertions(+), 47 deletions(-) diff --git a/sys/opencrypto/xform_poly1305.c b/sys/opencrypto/xform_poly1305.c index bddbb572d682..d8ceab47deca 100644 --- a/sys/opencrypto/xform_poly1305.c +++ b/sys/opencrypto/xform_poly1305.c @@ -4,7 +4,6 @@ __FBSDID("$FreeBSD$"); #include -#include #include @@ -16,16 +15,16 @@ CTASSERT(sizeof(union authctx) >= sizeof(struct poly1305_xform_ctx)); CTASSERT(POLY1305_KEY_LEN == crypto_onetimeauth_poly1305_KEYBYTES); CTASSERT(POLY1305_HASH_LEN == crypto_onetimeauth_poly1305_BYTES); -void -Poly1305_Init(void *polyctx) +static void +xform_Poly1305_Init(void *polyctx) { /* Nop */ } -void -Poly1305_Setkey(struct poly1305_xform_ctx *polyctx, - const uint8_t key[__min_size(POLY1305_KEY_LEN)], size_t klen) +static void +xform_Poly1305_Setkey(void *ctx, const uint8_t *key, u_int klen) { + struct poly1305_xform_ctx *polyctx = ctx; int rc; if (klen != POLY1305_KEY_LEN) @@ -36,16 +35,10 @@ Poly1305_Setkey(struct poly1305_xform_ctx *polyctx, panic("%s: Invariant violated: %d", __func__, rc); } -static void -xform_Poly1305_Setkey(void *ctx, const uint8_t *key, u_int klen) -{ - Poly1305_Setkey(ctx, key, klen); -} - -int -Poly1305_Update(struct poly1305_xform_ctx *polyctx, const void *data, - size_t len) +static int +xform_Poly1305_Update(void *ctx, const void *data, u_int len) { + struct poly1305_xform_ctx *polyctx = ctx; int rc; rc = crypto_onetimeauth_poly1305_update(&polyctx->state, data, len); @@ -54,16 +47,10 @@ Poly1305_Update(struct poly1305_xform_ctx *polyctx, const void *data, return (0); } -static int -xform_Poly1305_Update(void *ctx, const void *data, u_int len) -{ - return (Poly1305_Update(ctx, data, len)); -} - -void -Poly1305_Final(uint8_t digest[__min_size(POLY1305_HASH_LEN)], - struct poly1305_xform_ctx *polyctx) +static void +xform_Poly1305_Final(uint8_t *digest, void *ctx) { + struct poly1305_xform_ctx *polyctx = ctx; int rc; rc = crypto_onetimeauth_poly1305_final(&polyctx->state, digest); @@ -71,12 +58,6 @@ Poly1305_Final(uint8_t digest[__min_size(POLY1305_HASH_LEN)], panic("%s: Invariant violated: %d", __func__, rc); } -static void -xform_Poly1305_Final(uint8_t *digest, void *ctx) -{ - Poly1305_Final(digest, ctx); -} - struct auth_hash auth_hash_poly1305 = { .type = CRYPTO_POLY1305, .name = "Poly-1305", @@ -84,7 +65,7 @@ struct auth_hash auth_hash_poly1305 = { .hashsize = POLY1305_HASH_LEN, .ctxsize = sizeof(struct poly1305_xform_ctx), .blocksize = crypto_onetimeauth_poly1305_BYTES, - .Init = Poly1305_Init, + .Init = xform_Poly1305_Init, .Setkey = xform_Poly1305_Setkey, .Update = xform_Poly1305_Update, .Final = xform_Poly1305_Final, diff --git a/sys/opencrypto/xform_poly1305.h b/sys/opencrypto/xform_poly1305.h deleted file mode 100644 index cca1c6af9395..000000000000 --- a/sys/opencrypto/xform_poly1305.h +++ /dev/null @@ -1,16 +0,0 @@ -/* This file is in the public domain. */ -/* $FreeBSD$ */ -#pragma once - -#include - -struct poly1305_xform_ctx; - -void Poly1305_Init(void *); - -void Poly1305_Setkey(struct poly1305_xform_ctx *, - const uint8_t [__min_size(32)], size_t); - -int Poly1305_Update(struct poly1305_xform_ctx *, const void *, size_t); - -void Poly1305_Final(uint8_t [__min_size(16)], struct poly1305_xform_ctx *); From owner-dev-commits-src-main@freebsd.org Fri Mar 5 18:15:13 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C5EC65622C8; Fri, 5 Mar 2021 18:15:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DsbW55JFMz3FmR; Fri, 5 Mar 2021 18:15:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A86721503E; Fri, 5 Mar 2021 18:15:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 125IFD7F001017; Fri, 5 Mar 2021 18:15:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 125IFDNK001016; Fri, 5 Mar 2021 18:15:13 GMT (envelope-from git) Date: Fri, 5 Mar 2021 18:15:13 GMT Message-Id: <202103051815.125IFDNK001016@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 89b650872bba - main - ktls: Hide initialization message behind bootverbose MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 89b650872bba2e4bfbc94a200946b461ef69ae22 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2021 18:15:13 -0000 The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=89b650872bba2e4bfbc94a200946b461ef69ae22 commit 89b650872bba2e4bfbc94a200946b461ef69ae22 Author: Mark Johnston AuthorDate: 2021-03-05 18:11:02 +0000 Commit: Mark Johnston CommitDate: 2021-03-05 18:11:02 +0000 ktls: Hide initialization message behind bootverbose We don't typically print anything when a subsystem initializes itself, and KTLS is currently disabled by default anyway. Reviewed by: jhb MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D29097 --- sys/kern/uipc_ktls.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/kern/uipc_ktls.c b/sys/kern/uipc_ktls.c index 5125061e0879..1fd1eca39b59 100644 --- a/sys/kern/uipc_ktls.c +++ b/sys/kern/uipc_ktls.c @@ -495,7 +495,8 @@ ktls_init(void *dummy __unused) } } - printf("KTLS: Initialized %d threads\n", ktls_number_threads); + if (bootverbose) + printf("KTLS: Initialized %d threads\n", ktls_number_threads); } SYSINIT(ktls, SI_SUB_SMP + 1, SI_ORDER_ANY, ktls_init, NULL); From owner-dev-commits-src-main@freebsd.org Fri Mar 5 18:15:15 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3801E562101; Fri, 5 Mar 2021 18:15:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DsbW70tyKz3Ff0; Fri, 5 Mar 2021 18:15:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E77F814F58; Fri, 5 Mar 2021 18:15:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 125IFE8m001038; Fri, 5 Mar 2021 18:15:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 125IFEgi001037; Fri, 5 Mar 2021 18:15:14 GMT (envelope-from git) Date: Fri, 5 Mar 2021 18:15:14 GMT Message-Id: <202103051815.125IFEgi001037@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 4fc60fa9294f - main - opencrypto: Make cryptosoft attach silently MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4fc60fa9294f82c7f4e1a0e71f9a17794124217f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2021 18:15:15 -0000 The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=4fc60fa9294f82c7f4e1a0e71f9a17794124217f commit 4fc60fa9294f82c7f4e1a0e71f9a17794124217f Author: Mark Johnston AuthorDate: 2021-03-05 18:11:25 +0000 Commit: Mark Johnston CommitDate: 2021-03-05 18:11:25 +0000 opencrypto: Make cryptosoft attach silently cryptosoft is always present and doesn't print any useful information when it attaches. Reviewed by: jhb MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D29098 --- sys/opencrypto/cryptosoft.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/opencrypto/cryptosoft.c b/sys/opencrypto/cryptosoft.c index 947f27a388d1..a09f085a1eef 100644 --- a/sys/opencrypto/cryptosoft.c +++ b/sys/opencrypto/cryptosoft.c @@ -1658,6 +1658,7 @@ static int swcr_probe(device_t dev) { device_set_desc(dev, "software crypto"); + device_quiet(dev); return (BUS_PROBE_NOWILDCARD); } From owner-dev-commits-src-main@freebsd.org Fri Mar 5 18:19:27 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 82FED5623FF; Fri, 5 Mar 2021 18:19:27 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dsbbz1Qbpz3FtS; Fri, 5 Mar 2021 18:19:26 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.16.1/8.16.1) with ESMTPS id 125IJHbM037030 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Fri, 5 Mar 2021 20:19:20 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 125IJHbM037030 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 125IJHhV037029; Fri, 5 Mar 2021 20:19:17 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 5 Mar 2021 20:19:17 +0200 From: Konstantin Belousov To: Ryan Moeller Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: c4ba4aa54718 - main - libifconfig: Overhaul ifconfig_media_* interfaces Message-ID: References: <202103051123.125BNubR059014@gitrepo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202103051123.125BNubR059014@gitrepo.freebsd.org> 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.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on tom.home X-Rspamd-Queue-Id: 4Dsbbz1Qbpz3FtS X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2021 18:19:27 -0000 On Fri, Mar 05, 2021 at 11:23:56AM +0000, Ryan Moeller wrote: > The branch main has been updated by freqlabs: > > URL: https://cgit.FreeBSD.org/src/commit/?id=c4ba4aa547184ab401204096cdad9def4ab37964 > > commit c4ba4aa547184ab401204096cdad9def4ab37964 > Author: Ryan Moeller > AuthorDate: 2021-03-02 10:29:17 +0000 > Commit: Ryan Moeller > CommitDate: 2021-03-05 09:15:55 +0000 > > libifconfig: Overhaul ifconfig_media_* interfaces > > Define an ifmedia_t type to use for ifmedia words. > > Add ifconfig_media_lookup_* functions to lookup ifmedia words by name. > > Get media options as an array of option names rather than formatting it > as a comma-delimited list into a buffer. > > Sprinkle const on static the static description tables for peace of > mind. > > Don't need to zero memory allocated by calloc. > > Reviewed by: kp > MFC after: 2 weeks > Differential Revision: https://reviews.freebsd.org/D29029 > --- > lib/libifconfig/Makefile | 2 +- > lib/libifconfig/Symbol.map | 9 +- > lib/libifconfig/libifconfig.h | 69 +++++++- > lib/libifconfig/libifconfig_media.c | 339 ++++++++++++++++++++++++------------ > share/examples/libifconfig/status.c | 27 ++- > 5 files changed, 324 insertions(+), 122 deletions(-) > > diff --git a/lib/libifconfig/Makefile b/lib/libifconfig/Makefile > index 73dad36c1dc5..c6f006018427 100644 > --- a/lib/libifconfig/Makefile > +++ b/lib/libifconfig/Makefile > @@ -7,7 +7,7 @@ INTERNALLIB= true > LIBADD= m > > SHLIBDIR?= /lib > -SHLIB_MAJOR= 1 > +SHLIB_MAJOR= 2 > > VERSION_DEF= ${LIBCSRCDIR}/Versions.def > SYMBOL_MAPS= ${.CURDIR}/Symbol.map libifconfig is marked as internal, but we provide symbol versioning for it, and do it in the normal FreeBSD namespace. On one hand, our policy is to not bump symvered libs and to provide binary compat shims as needed, on the other, this is internal lib. What is the purpose of maintaining symbol versions for it? From owner-dev-commits-src-main@freebsd.org Fri Mar 5 18:24:00 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1DEAA562A82; Fri, 5 Mar 2021 18:24:00 +0000 (UTC) (envelope-from gbe@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DsbjD03cXz3GN2; Fri, 5 Mar 2021 18:24:00 +0000 (UTC) (envelope-from gbe@freebsd.org) Received: from localhost (p200300d5d740b9c950bd45a017f3c4cd.dip0.t-ipconnect.de [IPv6:2003:d5:d740:b9c9:50bd:45a0:17f3:c4cd]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: gbe) by smtp.freebsd.org (Postfix) with ESMTPSA id 98E22A655; Fri, 5 Mar 2021 18:23:59 +0000 (UTC) (envelope-from gbe@freebsd.org) Date: Fri, 5 Mar 2021 19:23:56 +0100 From: Gordon Bergling To: Mark Johnston Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 89b650872bba - main - ktls: Hide initialization message behind bootverbose Message-ID: References: <202103051815.125IFDNK001016@gitrepo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202103051815.125IFDNK001016@gitrepo.freebsd.org> X-Url: X-Operating-System: FreeBSD 12.2-STABLE amd64 X-Host-Uptime: 7:18PM up 6 days, 17:39, 4 users, load averages: 0.43, 0.35, 0.27 X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2021 18:24:00 -0000 Hi Mark, is this change not a little bit to aggressive in terms of dmesg cleanup? There are a lot messages about what subsystem is initialized with how many threads, like for example TCP HTPS and TCP BBR. Hiding this information could be suboptimal for some users. --Gordon On Fri, Mar 05, 2021 at 06:15:13PM +0000, Mark Johnston wrote: > The branch main has been updated by markj: > > URL: https://cgit.FreeBSD.org/src/commit/?id=89b650872bba2e4bfbc94a200946b461ef69ae22 > > commit 89b650872bba2e4bfbc94a200946b461ef69ae22 > Author: Mark Johnston > AuthorDate: 2021-03-05 18:11:02 +0000 > Commit: Mark Johnston > CommitDate: 2021-03-05 18:11:02 +0000 > > ktls: Hide initialization message behind bootverbose > > We don't typically print anything when a subsystem initializes itself, > and KTLS is currently disabled by default anyway. > > Reviewed by: jhb > MFC after: 1 week > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D29097 > --- > sys/kern/uipc_ktls.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/sys/kern/uipc_ktls.c b/sys/kern/uipc_ktls.c > index 5125061e0879..1fd1eca39b59 100644 > --- a/sys/kern/uipc_ktls.c > +++ b/sys/kern/uipc_ktls.c > @@ -495,7 +495,8 @@ ktls_init(void *dummy __unused) > } > } > > - printf("KTLS: Initialized %d threads\n", ktls_number_threads); > + if (bootverbose) > + printf("KTLS: Initialized %d threads\n", ktls_number_threads); > } > SYSINIT(ktls, SI_SUB_SMP + 1, SI_ORDER_ANY, ktls_init, NULL); > > _______________________________________________ > dev-commits-src-main@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main > To unsubscribe, send any mail to "dev-commits-src-main-unsubscribe@freebsd.org" -- From owner-dev-commits-src-main@freebsd.org Fri Mar 5 18:26:39 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 353B6562AB8 for ; Fri, 5 Mar 2021 18:26:39 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-qt1-x82a.google.com (mail-qt1-x82a.google.com [IPv6:2607:f8b0:4864:20::82a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DsbmH0j61z3GrR for ; Fri, 5 Mar 2021 18:26:38 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-qt1-x82a.google.com with SMTP id v3so2486757qtw.4 for ; Fri, 05 Mar 2021 10:26:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=flrH113JdFRIVsfg5/2Rd14lVqZVSPGj2e/aMxTbf8M=; b=RRl8I5fwcD+OljjF5gyowa33GtB+slkqw0rZiXaKeJTSozOK+awUeFpF6F5FCLQ2IO FpnlFlEF/NsYUENOjBUIW5+0xyU1D9kyDyMZJKwo66HbkFj/2MYLcSEPmwXJQ0lP3fUP vkp5yhmWUHkPotNfPie+0jibbnRhabCFVb+VXul3yMEdWYQT0SPqhen50Xn7Imb6hP06 RnOMcH11alj+5PdvYG7kimWLfIInXwxDNN6A4TRtAjs+mYRDENa1VWKqRMK26D8VNBKl LlageTBFFp/goiTeUFPmaK7CH7sJ+fk72wXA4Uqq45ftymdzblLaPtnHzyhk1XpHEck9 bJEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=flrH113JdFRIVsfg5/2Rd14lVqZVSPGj2e/aMxTbf8M=; b=t9BotCsVo2kAwjODdBGtLw7sq+EIzmCZSmcdfGN8WhYntPltDT6SwhOZT3/8wOD6Vy 2Bd3QHG6ArvjaYP9hAioQD+/HKjtSyOkqrOlm+hEyIvnE4rEb2Rn9fPWBLLmsivjNWdj XaXZc0NF9i/SBW9WaGExIjSHlDA0pBObQ5scvz/DP2nm0GC5Mf6MTO16VoxY2Kezkiii 3eSssqGxCwgYP8ZJ/nRmBnZFwrm/anyl/NYCSEVbSxPOQByYMSvdk+yrsls+6TsGB+X6 SRqyFx/EzWya9r0nyrqf0nSFqP5/x3q03RaoPG89z2fjRY5VfHDj+RLii2Er3EPG2vyS FFRw== X-Gm-Message-State: AOAM530gSaIXcbXLFWfWHrQ+UJHZEOuKDyYAiqeUX/gQAPW6gdpz7TbX tIlNhu0oBQ734f9VpqkBI2IfIeoRe7RwUw== X-Google-Smtp-Source: ABdhPJzoQpXvd5HsztiVcTl02JrzEJCFPraoNQVu37rktMGMW5Bp+YGa1vyyVA+c/zs749ourHykKw== X-Received: by 2002:ac8:1301:: with SMTP id e1mr1437825qtj.96.1614968798058; Fri, 05 Mar 2021 10:26:38 -0800 (PST) Received: from mutt-hbsd (pool-100-16-222-53.bltmmd.fios.verizon.net. [100.16.222.53]) by smtp.gmail.com with ESMTPSA id o76sm2325077qke.79.2021.03.05.10.26.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Mar 2021 10:26:37 -0800 (PST) Date: Fri, 5 Mar 2021 13:26:36 -0500 From: Shawn Webb To: Gordon Bergling Cc: Mark Johnston , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 89b650872bba - main - ktls: Hide initialization message behind bootverbose Message-ID: <20210305182636.y6gi3injvqvd2yu4@mutt-hbsd> X-Operating-System: FreeBSD mutt-hbsd 14.0-CURRENT-HBSD FreeBSD 14.0-CURRENT-HBSD X-PGP-Key: https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/blob/master/Shawn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc References: <202103051815.125IFDNK001016@gitrepo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="hudbptwoe4hv37it" Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4DsbmH0j61z3GrR X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2021 18:26:39 -0000 --hudbptwoe4hv37it Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I wonder if it'd be worth it to report such data via sysctl. Thoughts? --=20 Shawn Webb Cofounder / Security Engineer HardenedBSD https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/raw/master/Shawn_Webb/03A= 4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc On Fri, Mar 05, 2021 at 07:23:56PM +0100, Gordon Bergling wrote: > Hi Mark, >=20 > is this change not a little bit to aggressive in terms of dmesg cleanup? >=20 > There are a lot messages about what subsystem is initialized with > how many threads, like for example TCP HTPS and TCP BBR. >=20 > Hiding this information could be suboptimal for some users. >=20 > --Gordon >=20 > On Fri, Mar 05, 2021 at 06:15:13PM +0000, Mark Johnston wrote: > > The branch main has been updated by markj: > >=20 > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D89b650872bba2e4bfbc94a20= 0946b461ef69ae22 > >=20 > > commit 89b650872bba2e4bfbc94a200946b461ef69ae22 > > Author: Mark Johnston > > AuthorDate: 2021-03-05 18:11:02 +0000 > > Commit: Mark Johnston > > CommitDate: 2021-03-05 18:11:02 +0000 > >=20 > > ktls: Hide initialization message behind bootverbose > > =20 > > We don't typically print anything when a subsystem initializes itse= lf, > > and KTLS is currently disabled by default anyway. > > =20 > > Reviewed by: jhb > > MFC after: 1 week > > Sponsored by: The FreeBSD Foundation > > Differential Revision: https://reviews.freebsd.org/D29097 > > --- > > sys/kern/uipc_ktls.c | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > >=20 > > diff --git a/sys/kern/uipc_ktls.c b/sys/kern/uipc_ktls.c > > index 5125061e0879..1fd1eca39b59 100644 > > --- a/sys/kern/uipc_ktls.c > > +++ b/sys/kern/uipc_ktls.c > > @@ -495,7 +495,8 @@ ktls_init(void *dummy __unused) > > } > > } > > =20 > > - printf("KTLS: Initialized %d threads\n", ktls_number_threads); > > + if (bootverbose) > > + printf("KTLS: Initialized %d threads\n", ktls_number_threads); > > } > > SYSINIT(ktls, SI_SUB_SMP + 1, SI_ORDER_ANY, ktls_init, NULL); > > =20 > > _______________________________________________ > > dev-commits-src-main@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main > > To unsubscribe, send any mail to "dev-commits-src-main-unsubscribe@free= bsd.org" >=20 > --=20 > _______________________________________________ > dev-commits-src-all@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all > To unsubscribe, send any mail to "dev-commits-src-all-unsubscribe@freebsd= =2Eorg" --hudbptwoe4hv37it Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEA6TL67gupaZ9nzhT/y5nonf44foFAmBCd9oACgkQ/y5nonf4 4foCQA//TMnPacsJYnVvGpuO9qQXO/WSYvaTkREdKHzrIK4LV6XAG79dCPlob5xU A+h19EgFGMRkSniQgo6uaFg58T3H+1chiI9+flVgAJyLA+iykvEHdNQQjQ3o7455 v4m/g1uAA1B9ELeM3CyC8gUoDroQzYJQPq7ZU0AtnS4iRlUMEOH9Nv9xhqAntTaG 4JmPaw/MTwvSxzJIahQMCFNw+n1xFezH8BytobVmxdoSV2ikOf0/SPj/e64SFpG1 PIS/4MtIkZr3fAPMWKCenK628K/ckP1bM/1CsOu3x9p2UgDq3r7L7ey3TXda47qE 2NW8fxocoiyDdL0erA+V8lbSIaHiEy4jlSApg3kIUiGkvpyQWeBt7plI2BOMjdHH tZIfvsYsxFV15a0O/19jiuUJao63hNThPRrV47ujikuxw8FsE4UIMqdeqqZTEOmL 1K7dH+mBYe6jWHpBtiZBfAb4T0upFUd+Oqn4MOtzrzi71yx88oY23N0zGPyc/rIa KBC8PHwg4usqo4Duhyi/hAYBrGXbMmRPZaB1eFUIMUvazpe7MWPg356DqrZipAv0 1AJhWEvU75JF5+tQH378KWrcIHbkoTrUY7Vo8/qXpJaLI4XnqSGFWU+GbgKOzizk BpO/WWiwMV//W00zu3zxGcit8dQENr9XT0f0LIFTtpVrt+eWj/g= =hI/6 -----END PGP SIGNATURE----- --hudbptwoe4hv37it-- From owner-dev-commits-src-main@freebsd.org Fri Mar 5 18:36:38 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4CE98562E96; Fri, 5 Mar 2021 18:36:38 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qv1-xf29.google.com (mail-qv1-xf29.google.com [IPv6:2607:f8b0:4864:20::f29]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dsbzp1HKcz3HXW; Fri, 5 Mar 2021 18:36:38 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qv1-xf29.google.com with SMTP id 2so1498600qvd.0; Fri, 05 Mar 2021 10:36:38 -0800 (PST) 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; bh=+Szi4fsAA/NFPZgOBYl2/WnzQJT323ztjiiuA4xSqEo=; b=tkQAenj1/0WGpCiyPZ8OqbaGUCI5SnmcPxX2XxlWjW9GUlVPafdjQiS4APgxpe6Vjz w1elFZKJxvTa5y+9SgaIf6UA0tDQkKCN2IStYAR2ejgIfWTekWjdI815m1rXdqURd+PS 53tZK3BQCAyavoZkPP8n11clxRRB3UWOU7XG2klsfkjB6JAaSCI66fpMujB1JlB3q1bL KYwMwgO6zPRLx5392qnzBm2cfPtxvakEiWPwaGBliv2ZrzEpMAeFNcWBESGSKUXoNb4D UQIKOoRAZs57cZq6sBrq+W+Xtw+oae5XH/E1HQl+Re7QwreR7nhWsTEbV1r7kTQq3JNI fXEw== 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; bh=+Szi4fsAA/NFPZgOBYl2/WnzQJT323ztjiiuA4xSqEo=; b=gahnWhU2h1niM0qeMV+6I4UOPC2zQFNy5N2SJJtcAPpSpVekGCDcFRiGkM2e5fcXAJ Hh6J2+bwncxaiYQyU3qpaZ7zmhQ7a8OxfAq2fKJ7aNy0abEPG02HTmE90P3LxyLmmjcC khaVI+q/+kjDdyvs6XXka+LColbDcGmEl0RzJb1zXKuJKSExUkCRfEO9OjxMoNVgYaVA paWFjpRm6ltmhmFwL6Y0mupV8l0YiSRXWTLK2gXESqeTsQACF15b3pWDuJcE/6tdrOF/ 690kYMG0iH4yEZWba8NLb9uPZPMyu1hY/gqfySuSu1yqxzoRWwtCjo7d1CtFPNBrijV9 Ka3g== X-Gm-Message-State: AOAM533UyaUBOr65k4fnUR8kIPPdZfh46xzUSgH3pOUhAooZqv/wFm0A qqraWWOLH4OZbxWaHaPX9LSqPfEAFhVneQ== X-Google-Smtp-Source: ABdhPJxz92ghPsIBL7O2OvTd5ak4JdvzMnQUnU1EKZiTRlsK5COqE0iRZofzxvNR8cLelWW7ys4mIQ== X-Received: by 2002:a0c:be86:: with SMTP id n6mr10167295qvi.61.1614969397036; Fri, 05 Mar 2021 10:36:37 -0800 (PST) Received: from nuc ([142.126.164.150]) by smtp.gmail.com with ESMTPSA id j7sm2344774qtr.70.2021.03.05.10.36.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Mar 2021 10:36:36 -0800 (PST) Sender: Mark Johnston Date: Fri, 5 Mar 2021 13:36:36 -0500 From: Mark Johnston To: Gordon Bergling Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 89b650872bba - main - ktls: Hide initialization message behind bootverbose Message-ID: References: <202103051815.125IFDNK001016@gitrepo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4Dsbzp1HKcz3HXW X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2021 18:36:38 -0000 On Fri, Mar 05, 2021 at 07:23:56PM +0100, Gordon Bergling wrote: > Hi Mark, > > is this change not a little bit to aggressive in terms of dmesg cleanup? > > There are a lot messages about what subsystem is initialized with > how many threads, like for example TCP HTPS and TCP BBR. I would argue that that is the exception rather than the norm, and they should be cleaned up too. I just didn't notice since they are not compiled into the kernel. We don't log messages about bufspace threads, taskqueue threads, crypto worker threads, NFSD threads, netgraph threads, pagedaemon threads, etc. This is really an implementation detail and I don't see why it's crucial information that needs to be printed upon each boot. Especially in this case, where KTLS needs to be explicitly be enabled before those threads will ever do anything. > Hiding this information could be suboptimal for some users. There is a kern.ipc.tls.stats.threads sysctl which exposes the same number, so I'm not sure it's really hidden. But why would a user need this information? > On Fri, Mar 05, 2021 at 06:15:13PM +0000, Mark Johnston wrote: > > The branch main has been updated by markj: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=89b650872bba2e4bfbc94a200946b461ef69ae22 > > > > commit 89b650872bba2e4bfbc94a200946b461ef69ae22 > > Author: Mark Johnston > > AuthorDate: 2021-03-05 18:11:02 +0000 > > Commit: Mark Johnston > > CommitDate: 2021-03-05 18:11:02 +0000 > > > > ktls: Hide initialization message behind bootverbose > > > > We don't typically print anything when a subsystem initializes itself, > > and KTLS is currently disabled by default anyway. > > > > Reviewed by: jhb > > MFC after: 1 week > > Sponsored by: The FreeBSD Foundation > > Differential Revision: https://reviews.freebsd.org/D29097 > > --- > > sys/kern/uipc_ktls.c | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/sys/kern/uipc_ktls.c b/sys/kern/uipc_ktls.c > > index 5125061e0879..1fd1eca39b59 100644 > > --- a/sys/kern/uipc_ktls.c > > +++ b/sys/kern/uipc_ktls.c > > @@ -495,7 +495,8 @@ ktls_init(void *dummy __unused) > > } > > } > > > > - printf("KTLS: Initialized %d threads\n", ktls_number_threads); > > + if (bootverbose) > > + printf("KTLS: Initialized %d threads\n", ktls_number_threads); > > } > > SYSINIT(ktls, SI_SUB_SMP + 1, SI_ORDER_ANY, ktls_init, NULL); > > > > _______________________________________________ > > dev-commits-src-main@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main > > To unsubscribe, send any mail to "dev-commits-src-main-unsubscribe@freebsd.org" > > -- From owner-dev-commits-src-main@freebsd.org Fri Mar 5 18:41:22 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9FAFB562E2B; Fri, 5 Mar 2021 18:41:22 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dsc5G4CHtz3Hf9; Fri, 5 Mar 2021 18:41:22 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro.local (ralph.baldwin.cx [66.234.199.215]) (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 17E89A56F; Fri, 5 Mar 2021 18:41:22 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: git: a079e38b08f2 - main - ossl: Add Poly1305 digest support. To: Kristof Provost Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202103032321.123NLOKb093507@gitrepo.freebsd.org> <4EB11ECA-1788-49D2-9362-09D955C8D695@FreeBSD.org> From: John Baldwin Message-ID: <77a27150-38ea-85cb-8ec5-27dd7054c03d@FreeBSD.org> Date: Fri, 5 Mar 2021 10:41:21 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: <4EB11ECA-1788-49D2-9362-09D955C8D695@FreeBSD.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2021 18:41:22 -0000 On 3/5/21 12:32 AM, Kristof Provost wrote: > On 4 Mar 2021, at 0:21, John Baldwin wrote: >> The branch main has been updated by jhb: >> >> URL: >> https://cgit.FreeBSD.org/src/commit/?id=a079e38b08f2f07c50ba915dae66d099559abdcc >> >> commit a079e38b08f2f07c50ba915dae66d099559abdcc >> Author: John Baldwin >> AuthorDate: 2021-03-03 23:17:29 +0000 >> Commit: John Baldwin >> CommitDate: 2021-03-03 23:20:57 +0000 >> >> ossl: Add Poly1305 digest support. >> >> Reviewed by: cem >> Sponsored by: Netflix >> Differential Revision: https://reviews.freebsd.org/D28754 > > It looks like this broke the LINT builds: Should be fixed now I believe, sorry about the breakage. All of my testing was with ossl as a module. :-/ -- John Baldwin From owner-dev-commits-src-main@freebsd.org Fri Mar 5 19:20:12 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3D52A563EC4; Fri, 5 Mar 2021 19:20:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dscy415KGz3LDH; Fri, 5 Mar 2021 19:20:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 143FE15CBD; Fri, 5 Mar 2021 19:20:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 125JKBK4084364; Fri, 5 Mar 2021 19:20:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 125JKBMA084361; Fri, 5 Mar 2021 19:20:11 GMT (envelope-from git) Date: Fri, 5 Mar 2021 19:20:11 GMT Message-Id: <202103051920.125JKBMA084361@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Eric van Gyzen Subject: git: 8b434feedfa9 - main - Only set delayed inval for procs using PTI MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vangyzen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8b434feedfa9f71b59b9653c9335700abc019c03 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2021 19:20:12 -0000 The branch main has been updated by vangyzen: URL: https://cgit.FreeBSD.org/src/commit/?id=8b434feedfa9f71b59b9653c9335700abc019c03 commit 8b434feedfa9f71b59b9653c9335700abc019c03 Author: Eric van Gyzen AuthorDate: 2021-03-05 16:31:43 +0000 Commit: Eric van Gyzen CommitDate: 2021-03-05 19:20:08 +0000 Only set delayed inval for procs using PTI invltlb_invpcid_pti_handler() was requesting delayed TLB invalidation even for processes that aren't using PTI. With an out-of-tree change to avoid PTI for non-jailed root processes, this caused an assertion failure in pmap_activate_sw_pcid_pti() when context-switching between PTI and non-PTI processes. Reviewed by: bdrewery kib tychon Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D29094 --- sys/amd64/amd64/mp_machdep.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c index aa62c2086fa4..11f2bb8bbfc1 100644 --- a/sys/amd64/amd64/mp_machdep.c +++ b/sys/amd64/amd64/mp_machdep.c @@ -851,7 +851,8 @@ invltlb_invpcid_pti_handler(pmap_t smp_tlb_pmap) invpcid(&d, INVPCID_CTXGLOB); } else { invpcid(&d, INVPCID_CTX); - if (smp_tlb_pmap == PCPU_GET(curpmap)) + if (smp_tlb_pmap == PCPU_GET(curpmap) && + smp_tlb_pmap->pm_ucr3 != PMAP_NO_CR3) PCPU_SET(ucr3_load_mask, ~CR3_PCID_SAVE); } } From owner-dev-commits-src-main@freebsd.org Fri Mar 5 19:40:31 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 60A05564F19; Fri, 5 Mar 2021 19:40:31 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DsdPW2MpTz3N7r; Fri, 5 Mar 2021 19:40:31 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from Ryans-MacBook-Pro.local (69-228-200-148.lightspeed.knvltn.sbcglobal.net [69.228.200.148]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: freqlabs/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 124E7ACEF; Fri, 5 Mar 2021 19:40:31 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Subject: Re: git: c4ba4aa54718 - main - libifconfig: Overhaul ifconfig_media_* interfaces To: Konstantin Belousov Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202103051123.125BNubR059014@gitrepo.freebsd.org> From: Ryan Moeller Message-ID: <20c6efb4-8b57-ae78-3808-b49b07ac284d@FreeBSD.org> Date: Fri, 5 Mar 2021 14:40:29 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2021 19:40:31 -0000 On 3/5/21 1:19 PM, Konstantin Belousov wrote: > On Fri, Mar 05, 2021 at 11:23:56AM +0000, Ryan Moeller wrote: >> The branch main has been updated by freqlabs: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=c4ba4aa547184ab401204096cdad9def4ab37964 >> >> commit c4ba4aa547184ab401204096cdad9def4ab37964 >> Author: Ryan Moeller >> AuthorDate: 2021-03-02 10:29:17 +0000 >> Commit: Ryan Moeller >> CommitDate: 2021-03-05 09:15:55 +0000 >> >> libifconfig: Overhaul ifconfig_media_* interfaces >> >> Define an ifmedia_t type to use for ifmedia words. >> >> Add ifconfig_media_lookup_* functions to lookup ifmedia words by name. >> >> Get media options as an array of option names rather than formatting it >> as a comma-delimited list into a buffer. >> >> Sprinkle const on static the static description tables for peace of >> mind. >> >> Don't need to zero memory allocated by calloc. >> >> Reviewed by: kp >> MFC after: 2 weeks >> Differential Revision: https://reviews.freebsd.org/D29029 >> --- >> lib/libifconfig/Makefile | 2 +- >> lib/libifconfig/Symbol.map | 9 +- >> lib/libifconfig/libifconfig.h | 69 +++++++- >> lib/libifconfig/libifconfig_media.c | 339 ++++++++++++++++++++++++------------ >> share/examples/libifconfig/status.c | 27 ++- >> 5 files changed, 324 insertions(+), 122 deletions(-) >> >> diff --git a/lib/libifconfig/Makefile b/lib/libifconfig/Makefile >> index 73dad36c1dc5..c6f006018427 100644 >> --- a/lib/libifconfig/Makefile >> +++ b/lib/libifconfig/Makefile >> @@ -7,7 +7,7 @@ INTERNALLIB= true >> LIBADD= m >> >> SHLIBDIR?= /lib >> -SHLIB_MAJOR= 1 >> +SHLIB_MAJOR= 2 >> >> VERSION_DEF= ${LIBCSRCDIR}/Versions.def >> SYMBOL_MAPS= ${.CURDIR}/Symbol.map > libifconfig is marked as internal, but we provide symbol versioning for it, > and do it in the normal FreeBSD namespace. On one hand, our policy is to > not bump symvered libs and to provide binary compat shims as needed, on the > other, this is internal lib. > > What is the purpose of maintaining symbol versions for it? I have work in progress that changes libifconfig to a private lib. I'm not sure why markj@ added the symbol map, but I've been forced to maintain it for my later changes to work. -Ryan From owner-dev-commits-src-main@freebsd.org Fri Mar 5 19:44:54 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E9E73565096; Fri, 5 Mar 2021 19:44:54 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qt1-x830.google.com (mail-qt1-x830.google.com [IPv6:2607:f8b0:4864:20::830]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DsdVZ5JV1z3Npb; Fri, 5 Mar 2021 19:44:54 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qt1-x830.google.com with SMTP id j3so2646354qtj.12; Fri, 05 Mar 2021 11:44:54 -0800 (PST) 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; bh=y5Qh5X1jPC/kugc3S4uHPl1RjwJ1IDnQBzN6/aJOSRc=; b=RVEwkchKZ2LU5WcAodsdptqN5udkPxoO0o8CxlvcAg6NizfLku9rFvAy5Pj2Y6/BxE zLQo0EOTsngTufag1FTHqN+fjoAFDBakcWC3P4ONQbP3X79JE5MtBBO9ULJVsNiiDlY3 WFOlG1uNMHPmS1nTl7Z4worRWqz6uBu2jrzwXehrGEmS3+ShhXXZ6ktIPjmcieh4YjIE LhZYG6KFsjMsqF+jIAcrvcUNVJXxVBh/8Ise8imzCKk0DCA6ubR2C5NUgkeHJn8PYxsp vfU6xqYZnuDjgt0HJWErYiihBF8QnqrahBYJpxOTwA4rHEE1rIKvXLFtGcVgiv8q7wPU ww2A== 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; bh=y5Qh5X1jPC/kugc3S4uHPl1RjwJ1IDnQBzN6/aJOSRc=; b=tiivttiDMZ1qhme/FkDEbeXXQnrX7ZAn4pX3oBwAwNCp46RFuzd2+EP2TWCGNSoZac MO9+kwVB7ZVYqNMYncBCp5M21hwLgYHR3j2kl2GRCrH/tBEHV5eV484WszKiZf0pcbf4 Eo7hpUwE/IYOI7HgPFh4005idTZLqCZZBcc9gMfZPBoM6kSDbF8FploSWAbmTnjEEAX1 afVHIOIoxB5GGQimz5RDNmEw3CzvvTlBf5r4Hz8mP/muARJt16N0u7KJaZkuGkFfaGft VRp+bkIvA30spaqt+Qb49jH6c9FgVaUjp74zuDruWPrFHM2howE02igvkWNXyQEwZY7V IPLw== X-Gm-Message-State: AOAM530NS9/TJ74r9TPPJLDpa5yp5ZfMydC+IePZFfvHj/A7zIhB7CaC XUYgNHRqoTswKudMmiKCAoYnMWXGQDR/4Q== X-Google-Smtp-Source: ABdhPJyoE5WnyWbKuQP8HL3g/VtT1UnvVpIvMxNHHjFfeaIaLAsBbSRlERWAAOlXsWTDcSszx/gEzQ== X-Received: by 2002:ac8:5892:: with SMTP id t18mr10967828qta.76.1614973487817; Fri, 05 Mar 2021 11:44:47 -0800 (PST) Received: from nuc ([142.126.164.150]) by smtp.gmail.com with ESMTPSA id v187sm2496826qkd.50.2021.03.05.11.44.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Mar 2021 11:44:47 -0800 (PST) Sender: Mark Johnston Date: Fri, 5 Mar 2021 14:44:50 -0500 From: Mark Johnston To: Ryan Moeller Cc: Konstantin Belousov , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: c4ba4aa54718 - main - libifconfig: Overhaul ifconfig_media_* interfaces Message-ID: References: <202103051123.125BNubR059014@gitrepo.freebsd.org> <20c6efb4-8b57-ae78-3808-b49b07ac284d@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20c6efb4-8b57-ae78-3808-b49b07ac284d@FreeBSD.org> X-Rspamd-Queue-Id: 4DsdVZ5JV1z3Npb X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2021 19:44:55 -0000 On Fri, Mar 05, 2021 at 02:40:29PM -0500, Ryan Moeller wrote: > > On 3/5/21 1:19 PM, Konstantin Belousov wrote: > > On Fri, Mar 05, 2021 at 11:23:56AM +0000, Ryan Moeller wrote: > >> The branch main has been updated by freqlabs: > >> > >> URL: https://cgit.FreeBSD.org/src/commit/?id=c4ba4aa547184ab401204096cdad9def4ab37964 > >> > >> commit c4ba4aa547184ab401204096cdad9def4ab37964 > >> Author: Ryan Moeller > >> AuthorDate: 2021-03-02 10:29:17 +0000 > >> Commit: Ryan Moeller > >> CommitDate: 2021-03-05 09:15:55 +0000 > >> > >> libifconfig: Overhaul ifconfig_media_* interfaces > >> > >> Define an ifmedia_t type to use for ifmedia words. > >> > >> Add ifconfig_media_lookup_* functions to lookup ifmedia words by name. > >> > >> Get media options as an array of option names rather than formatting it > >> as a comma-delimited list into a buffer. > >> > >> Sprinkle const on static the static description tables for peace of > >> mind. > >> > >> Don't need to zero memory allocated by calloc. > >> > >> Reviewed by: kp > >> MFC after: 2 weeks > >> Differential Revision: https://reviews.freebsd.org/D29029 > >> --- > >> lib/libifconfig/Makefile | 2 +- > >> lib/libifconfig/Symbol.map | 9 +- > >> lib/libifconfig/libifconfig.h | 69 +++++++- > >> lib/libifconfig/libifconfig_media.c | 339 ++++++++++++++++++++++++------------ > >> share/examples/libifconfig/status.c | 27 ++- > >> 5 files changed, 324 insertions(+), 122 deletions(-) > >> > >> diff --git a/lib/libifconfig/Makefile b/lib/libifconfig/Makefile > >> index 73dad36c1dc5..c6f006018427 100644 > >> --- a/lib/libifconfig/Makefile > >> +++ b/lib/libifconfig/Makefile > >> @@ -7,7 +7,7 @@ INTERNALLIB= true > >> LIBADD= m > >> > >> SHLIBDIR?= /lib > >> -SHLIB_MAJOR= 1 > >> +SHLIB_MAJOR= 2 > >> > >> VERSION_DEF= ${LIBCSRCDIR}/Versions.def > >> SYMBOL_MAPS= ${.CURDIR}/Symbol.map > > libifconfig is marked as internal, but we provide symbol versioning for it, > > and do it in the normal FreeBSD namespace. On one hand, our policy is to > > not bump symvered libs and to provide binary compat shims as needed, on the > > other, this is internal lib. > > > > What is the purpose of maintaining symbol versions for it? > > > I have work in progress that changes libifconfig to a private lib. I'm > not sure why markj@ added the symbol map, but I've been forced to > maintain it for my later changes to work. I added it because there was some discussion of making it a public library, and adding a symbol map was a step towards that. If it is only going to be a private library, then there's indeed no reason to maintain it. From owner-dev-commits-src-main@freebsd.org Fri Mar 5 19:46:25 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 946CB56516F; Fri, 5 Mar 2021 19:46:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DsdXK3p4Hz3NyQ; Fri, 5 Mar 2021 19:46:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 754C41668F; Fri, 5 Mar 2021 19:46:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 125JkP89019230; Fri, 5 Mar 2021 19:46:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 125JkPvR019229; Fri, 5 Mar 2021 19:46:25 GMT (envelope-from git) Date: Fri, 5 Mar 2021 19:46:25 GMT Message-Id: <202103051946.125JkPvR019229@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: 4a4e9c516cfc - main - cxgbe(4): Fix an assertion that is not valid during attach. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4a4e9c516cfc54181264c92276301a45ea4680d4 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2021 19:46:25 -0000 The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=4a4e9c516cfc54181264c92276301a45ea4680d4 commit 4a4e9c516cfc54181264c92276301a45ea4680d4 Author: Navdeep Parhar AuthorDate: 2021-03-05 19:28:18 +0000 Commit: Navdeep Parhar CommitDate: 2021-03-05 19:28:18 +0000 cxgbe(4): Fix an assertion that is not valid during attach. Firmware access from t4_attach takes place without any synchronization. The driver should not panic (debug kernels) if something goes wrong in early communication with the firmware. It should still load so that it's possible to poke around with cxgbetool. MFC after: 1 week Sponsored by: Chelsio Communications --- sys/dev/cxgbe/t4_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index c9a8b08e8d16..f749fdd937d7 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -2875,7 +2875,8 @@ t4_fatal_err(struct adapter *sc, bool fw_error) log(LOG_ALERT, "%s: encountered fatal error, adapter stopped.\n", device_get_nameunit(sc->dev)); if (fw_error) { - ASSERT_SYNCHRONIZED_OP(sc); + if (sc->flags & CHK_MBOX_ACCESS) + ASSERT_SYNCHRONIZED_OP(sc); sc->flags |= ADAP_ERR; } else { ADAPTER_LOCK(sc); From owner-dev-commits-src-main@freebsd.org Fri Mar 5 20:05:20 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EE72E565DB4; Fri, 5 Mar 2021 20:05:20 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dsdy86T3kz3QGN; Fri, 5 Mar 2021 20:05:20 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qt1-f180.google.com (mail-qt1-f180.google.com [209.85.160.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id CBB3DBD89; Fri, 5 Mar 2021 20:05:20 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qt1-f180.google.com with SMTP id v64so2744680qtd.5; Fri, 05 Mar 2021 12:05:20 -0800 (PST) X-Gm-Message-State: AOAM532i/zfAYe80enLCtEs580lgzvUHHJCN0wL2iXNqbXeuO81TF3xb N3XslEYAMZiSqYeMGW+K6Xw23aYJGSAtK08gBqs= X-Google-Smtp-Source: ABdhPJxEEG/IGCi4jDFr+wdp/ozPyzcOzFYGHNOVJNbSlsQSDDn0kRBatzyML6zE2Z/LIqw92paHP6kJU6VS3UdH74M= X-Received: by 2002:ac8:5bd1:: with SMTP id b17mr10561631qtb.53.1614974720454; Fri, 05 Mar 2021 12:05:20 -0800 (PST) MIME-Version: 1.0 References: <202103051755.125HtZsc073704@gitrepo.freebsd.org> In-Reply-To: <202103051755.125HtZsc073704@gitrepo.freebsd.org> From: Kyle Evans Date: Fri, 5 Mar 2021 14:05:06 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: bb6e84c988d3 - main - poly1305: Don't export generic Poly1305_* symbols from xform_poly1305.c. To: John Baldwin Cc: src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2021 20:05:21 -0000 On Fri, Mar 5, 2021 at 11:55 AM John Baldwin wrote: > > The branch main has been updated by jhb: > > URL: https://cgit.FreeBSD.org/src/commit/?id=bb6e84c988d3f54eff602ed544ceaa9b9fe3e9ff > > commit bb6e84c988d3f54eff602ed544ceaa9b9fe3e9ff > Author: John Baldwin > AuthorDate: 2021-03-05 17:47:58 +0000 > Commit: John Baldwin > CommitDate: 2021-03-05 17:55:11 +0000 > > poly1305: Don't export generic Poly1305_* symbols from xform_poly1305.c. > > There currently isn't a need to provide a public interface to a > software Poly1305 implementation beyond what is already available via > libsodium's APIs and these symbols conflict with symbols shared within > the ossl.ko module between ossl_poly1305.c and ossl_chacha20.c. > > Reported by: se, kp > Fixes: 78991a93eb9d > Sponsored by: Netflix > --- > sys/opencrypto/xform_poly1305.c | 43 ++++++++++++----------------------------- > sys/opencrypto/xform_poly1305.h | 16 --------------- > 2 files changed, 12 insertions(+), 47 deletions(-) xform_poly1305.h also needs to stop being grouped in ^/include/Makefile (reported by jenkins via np) From owner-dev-commits-src-main@freebsd.org Fri Mar 5 20:07:50 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 44736565CC2; Fri, 5 Mar 2021 20:07:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dsf121TCPz3QVT; Fri, 5 Mar 2021 20:07:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 255101685A; Fri, 5 Mar 2021 20:07:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 125K7ow2046733; Fri, 5 Mar 2021 20:07:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 125K7oHJ046732; Fri, 5 Mar 2021 20:07:50 GMT (envelope-from git) Date: Fri, 5 Mar 2021 20:07:50 GMT Message-Id: <202103052007.125K7oHJ046732@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dimitry Andric Subject: git: 772c631af81a - main - Add a few missed files to libclang_rt.profile-.a MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 772c631af81abdb6d498d972bab79d04d3db16d0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2021 20:07:50 -0000 The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=772c631af81abdb6d498d972bab79d04d3db16d0 commit 772c631af81abdb6d498d972bab79d04d3db16d0 Author: Dimitry Andric AuthorDate: 2021-03-05 20:06:05 +0000 Commit: Dimitry Andric CommitDate: 2021-03-05 20:07:07 +0000 Add a few missed files to libclang_rt.profile-.a Otherwise, programs compiled with -fprofile-instr-generate will encounter undefined symbol errors during linking, for example __llvm_profile_counter_bias, lprofSetRuntimeCounterRelocation and a few others were missing from the profile library. Reported by: ota@j.email.ne.jp PR: 254001 MFC after: 3 days --- lib/libclang_rt/profile/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/libclang_rt/profile/Makefile b/lib/libclang_rt/profile/Makefile index c41da991a039..ab3eba28ac96 100644 --- a/lib/libclang_rt/profile/Makefile +++ b/lib/libclang_rt/profile/Makefile @@ -13,8 +13,10 @@ CXXFLAGS+= -fvisibility=default SRCS+= profile/GCDAProfiling.c SRCS+= profile/InstrProfiling.c +SRCS+= profile/InstrProfilingBiasVar.c SRCS+= profile/InstrProfilingBuffer.c SRCS+= profile/InstrProfilingFile.c +SRCS+= profile/InstrProfilingInternal.c SRCS+= profile/InstrProfilingMerge.c SRCS+= profile/InstrProfilingMergeFile.c SRCS+= profile/InstrProfilingNameVar.c From owner-dev-commits-src-main@freebsd.org Fri Mar 5 20:27:38 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2F6B4565F7B; Fri, 5 Mar 2021 20:27:38 +0000 (UTC) (envelope-from se@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DsfRt0fgHz3h8p; Fri, 5 Mar 2021 20:27:38 +0000 (UTC) (envelope-from se@freebsd.org) Received: from Stefans-MBP-449.fritz.box (p200300cd5f26c90000a9e0dfe348cc0e.dip0.t-ipconnect.de [IPv6:2003:cd:5f26:c900:a9:e0df:e348:cc0e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: se/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4F7B8C118; Fri, 5 Mar 2021 20:27:37 +0000 (UTC) (envelope-from se@freebsd.org) To: Kyle Evans , John Baldwin Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202103051755.125HtZsc073704@gitrepo.freebsd.org> From: Stefan Esser Subject: Re: git: bb6e84c988d3 - main - poly1305: Don't export generic Poly1305_* symbols from xform_poly1305.c. Message-ID: <3e76fccd-efeb-1479-7418-7e69bed98915@freebsd.org> Date: Fri, 5 Mar 2021 21:27:35 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="BzEcQZ2nusRpdURvGKXTcE63zI1f9CPzu" X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2021 20:27:38 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --BzEcQZ2nusRpdURvGKXTcE63zI1f9CPzu Content-Type: multipart/mixed; boundary="j85mRpT9Yj12HfXzWxaH0rMreDxXIgaOS"; protected-headers="v1" From: Stefan Esser To: Kyle Evans , John Baldwin Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Message-ID: <3e76fccd-efeb-1479-7418-7e69bed98915@freebsd.org> Subject: Re: git: bb6e84c988d3 - main - poly1305: Don't export generic Poly1305_* symbols from xform_poly1305.c. References: <202103051755.125HtZsc073704@gitrepo.freebsd.org> In-Reply-To: --j85mRpT9Yj12HfXzWxaH0rMreDxXIgaOS Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: de-DE Content-Transfer-Encoding: quoted-printable Am 05.03.21 um 21:05 schrieb Kyle Evans: > On Fri, Mar 5, 2021 at 11:55 AM John Baldwin wrote: >> >> The branch main has been updated by jhb: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=3Dbb6e84c988d3f54eff602ed= 544ceaa9b9fe3e9ff >> >> commit bb6e84c988d3f54eff602ed544ceaa9b9fe3e9ff >> Author: John Baldwin >> AuthorDate: 2021-03-05 17:47:58 +0000 >> Commit: John Baldwin >> CommitDate: 2021-03-05 17:55:11 +0000 >> >> poly1305: Don't export generic Poly1305_* symbols from xform_poly= 1305.c. >> >> There currently isn't a need to provide a public interface to a >> software Poly1305 implementation beyond what is already available= via >> libsodium's APIs and these symbols conflict with symbols shared w= ithin >> the ossl.ko module between ossl_poly1305.c and ossl_chacha20.c. >> >> Reported by: se, kp >> Fixes: 78991a93eb9d >> Sponsored by: Netflix >> --- >> sys/opencrypto/xform_poly1305.c | 43 ++++++++++++-------------------= ---------- >> sys/opencrypto/xform_poly1305.h | 16 --------------- >> 2 files changed, 12 insertions(+), 47 deletions(-) >=20 > xform_poly1305.h also needs to stop being grouped in > ^/include/Makefile (reported by jenkins via np) AFAICT, sys/opencrypto/xform_poly1305.h needs to be restored ... It is needed during buildworld (and present in stable/13). --j85mRpT9Yj12HfXzWxaH0rMreDxXIgaOS-- --BzEcQZ2nusRpdURvGKXTcE63zI1f9CPzu Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature" -----BEGIN PGP SIGNATURE----- wsB5BAABCAAjFiEEo3HqZZwL7MgrcVMTR+u171r99UQFAmBClDcFAwAAAAAACgkQR+u171r99UTc twgAy0d3y7gmaUC8ZWEpJtgBKNbCA8PYAHFOSrTe6KHMewnoZd+kqCgyTptRSsywRNrPd4Xy1f7H Tm4to/+uPWQwo5v6yjn3xCGDQbpN2eK92If8mKhARd5G1ygFTLuzZ/PONch7kZw09+/pY5iACovc dhXliI8MlRppsTr7YE/YaGQeNIWgMgJyMPoaCrRO/ixj0nYK2eJXCZtG5Y2TwnBr+o+E+Nd6kK3X GhwrnCx5fcmi8JqCWiSlenht3V/cibHsbA49Hpc0LVpZp80DPW4S1Z0/rl/X+wEZWTG217hWAe+m yaocY1dLiWy6jicgAa4LNKThDFIbDYg2fhJ42ALk7Q== =Yto1 -----END PGP SIGNATURE----- --BzEcQZ2nusRpdURvGKXTcE63zI1f9CPzu-- From owner-dev-commits-src-main@freebsd.org Fri Mar 5 20:40:53 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 38D30566CE1; Fri, 5 Mar 2021 20:40:53 +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 4Dsfl84mxsz3j3q; Fri, 5 Mar 2021 20:40:52 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.229.168]) by shaw.ca with ESMTPA id IHFgl8RKX2SWTIHFil4rL0; Fri, 05 Mar 2021 13:40:50 -0700 X-Authority-Analysis: v=2.4 cv=fdJod2cF c=1 sm=1 tr=0 ts=60429753 a=7AlCcx2GqMg+lh9P3BclKA==:117 a=7AlCcx2GqMg+lh9P3BclKA==:17 a=xqWC_Br6kY4A:10 a=kj9zAlcOel0A:10 a=dESyimp9J3IA:10 a=6I5d2MoRAAAA:8 a=pGLkceISAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=vEtR2WbTRQCnyGjxLlMA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 a=BPzZvq435JnGatEyYwdK:22 Received: from slippy.cwsent.com (slippy [IPv6:fc00:1:1:1::5b]) by spqr.komquats.com (Postfix) with ESMTPS id B6E0E230; Fri, 5 Mar 2021 12:40:47 -0800 (PST) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.16.1/8.16.1) with ESMTP id 125Kelsl004737; Fri, 5 Mar 2021 12:40:47 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202103052040.125Kelsl004737@slippy.cwsent.com> 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: Stefan Esser cc: Kyle Evans , John Baldwin , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: bb6e84c988d3 - main - poly1305: Don't export generic Poly1305_* symbols from xform_poly1305.c. In-reply-to: <3e76fccd-efeb-1479-7418-7e69bed98915@freebsd.org> References: <202103051755.125HtZsc073704@gitrepo.freebsd.org> <3e76fccd-efeb-1479-7418-7e69bed98915@freebsd.org> Comments: In-reply-to Stefan Esser message dated "Fri, 05 Mar 2021 21:27:35 +0100." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 05 Mar 2021 12:40:47 -0800 X-CMAE-Envelope: MS4xfJI/llbE9bRkw0PzZlXdlU6gsNwrqLWgzg2a0h2fJH0NAAFmqMrO0FfhpOs55AMYOtlM2zGOhQxnuUytgN30k9bwOlHNz79QATiCN++ETLC+oO9PzNIE 1HXdcc8eawbZpbEcPWLNTCIBHneJNICoLPHR8YtLslOoUpNAWrbyrtK0qEHYfxShwRkPGWuGdW9cRnxFcZaDYxBDVCShZIXnLlpzJSj2x0uRUm4kHbAqQx2c XBrHq4EqtQp3EdId+Bx+qjrD69MQ+A3qMkAmBTE9ko9eCJs9z7kej/HP7gT0mH/9cF4ZNmb/mnSPM8vyHwwIPNzXtYckBpcwBTSYWbHpoQSAlTWvGtLgJ/1p qczVMQPAf5rNgQsbS7ISWmsyGSFTXQ== X-Rspamd-Queue-Id: 4Dsfl84mxsz3j3q X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2021 20:40:53 -0000 In message <3e76fccd-efeb-1479-7418-7e69bed98915@freebsd.org>, Stefan Esser wri tes: > This is an OpenPGP/MIME signed message (RFC 4880 and 3156) > --BzEcQZ2nusRpdURvGKXTcE63zI1f9CPzu > Content-Type: multipart/mixed; boundary="j85mRpT9Yj12HfXzWxaH0rMreDxXIgaOS"; > protected-headers="v1" > From: Stefan Esser > To: Kyle Evans , John Baldwin > Cc: src-committers , > dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org > Message-ID: <3e76fccd-efeb-1479-7418-7e69bed98915@freebsd.org> > Subject: Re: git: bb6e84c988d3 - main - poly1305: Don't export generic > Poly1305_* symbols from xform_poly1305.c. > References: <202103051755.125HtZsc073704@gitrepo.freebsd.org> > > In-Reply-To: com> > > --j85mRpT9Yj12HfXzWxaH0rMreDxXIgaOS > Content-Type: text/plain; charset=utf-8; format=flowed > Content-Language: de-DE > Content-Transfer-Encoding: quoted-printable > > Am 05.03.21 um 21:05 schrieb Kyle Evans: > > On Fri, Mar 5, 2021 at 11:55 AM John Baldwin wrote: > >> > >> The branch main has been updated by jhb: > >> > >> URL: https://cgit.FreeBSD.org/src/commit/?id=3Dbb6e84c988d3f54eff602ed= > 544ceaa9b9fe3e9ff > >> > >> commit bb6e84c988d3f54eff602ed544ceaa9b9fe3e9ff > >> Author: John Baldwin > >> AuthorDate: 2021-03-05 17:47:58 +0000 > >> Commit: John Baldwin > >> CommitDate: 2021-03-05 17:55:11 +0000 > >> > >> poly1305: Don't export generic Poly1305_* symbols from xform_poly= > 1305.c. > >> > >> There currently isn't a need to provide a public interface to a > >> software Poly1305 implementation beyond what is already available= > via > >> libsodium's APIs and these symbols conflict with symbols shared w= > ithin > >> the ossl.ko module between ossl_poly1305.c and ossl_chacha20.c. > >> > >> Reported by: se, kp > >> Fixes: 78991a93eb9d > >> Sponsored by: Netflix > >> --- > >> sys/opencrypto/xform_poly1305.c | 43 ++++++++++++-------------------= > ---------- > >> sys/opencrypto/xform_poly1305.h | 16 --------------- > >> 2 files changed, 12 insertions(+), 47 deletions(-) > >=20 > > xform_poly1305.h also needs to stop being grouped in > > ^/include/Makefile (reported by jenkins via np) > > AFAICT, sys/opencrypto/xform_poly1305.h needs to be restored ... > > It is needed during buildworld (and present in stable/13). Indeed. `xform_poly1305.h' was not built (being made, type OP_DEPS_FOUND|OP_MARK, flags REMAKE|DONE_WAIT|DONE_ALLSRC|DONECYCLE)! `_INCSINS' was not built (unmade, type OP_DEPENDS|OP_HAS_COMMANDS|OP_DEPS_FO UND|OP_MARK, flags REMAKE|DONE_WAIT|DONECYCLE)! `_ACPICAINS' was not built (unmade, type OP_DEPENDS|OP_HAS_COMMANDS|OP_DEPS_ FOUND|OP_MARK, flags REMAKE|DONE_WAIT|DONECYCLE)! `_AGPINS' was not built (unmade, type OP_DEPENDS|OP_HAS_COMMANDS|OP_DEPS_FOU ND|OP_MARK, flags REMAKE|DONE_WAIT|DONECYCLE)! `_CRYPTOINS' was not built (unmade, type OP_DEPENDS|OP_HAS_COMMANDS|OP_DEPS_ FOUND|OP_MARK, flags REMAKE|DONE_WAIT|DONECYCLE)! `_EVDEVINS' was not built (unmade, type OP_DEPENDS|OP_HAS_COMMANDS|OP_DEPS_F OUND|OP_MARK, flags REMAKE|DONE_WAIT|DONECYCLE)! `_FS9660INS' was not built (unmade, type OP_DEPENDS|OP_HAS_COMMANDS|OP_DEPS_ FOUND|OP_MARK, flags REMAKE|DONE_WAIT|DONECYCLE)! `_HIDINS' was not built (unmade, type OP_DEPENDS|OP_HAS_COMMANDS|OP_DEPS_FOU ND|OP_MARK, flags REMAKE|DONE_WAIT|DONECYCLE)! `_HYPERVINS' was not built (unmade, type OP_DEPENDS|OP_HAS_COMMANDS|OP_DEPS_ FOUND|OP_MARK, flags REMAKE|DONE_WAIT|DONECYCLE)! `_PCIINS' was not built (unmade, type OP_DEPENDS|OP_HAS_COMMANDS|OP_DEPS_FOU ND|OP_MARK, flags REMAKE|DONE_WAIT|DONECYCLE)! `_RPCINS' was not built (unmade, type OP_DEPENDS|OP_HAS_COMMANDS|OP_DEPS_FOU ND|OP_MARK, flags REMAKE|DONE_WAIT|DONECYCLE)! `_TEKENINS' was not built (unmade, type OP_DEPENDS|OP_HAS_COMMANDS|OP_DEPS_F OUND|OP_MARK, flags REMAKE|DONE_WAIT|DONECYCLE)! `_VERIEXECINS' was not built (unmade, type OP_DEPENDS|OP_HAS_COMMANDS|OP_DEP S_FOUND|OP_MARK, flags REMAKE|DONE_WAIT|DONECYCLE)! `_IPFILTERINS' was not built (unmade, type OP_DEPENDS|OP_HAS_COMMANDS|OP_DEP S_FOUND|OP_MARK, flags REMAKE|DONE_WAIT|DONECYCLE)! `_PFINS' was not built (unmade, type OP_DEPENDS|OP_HAS_COMMANDS|OP_DEPS_FOUN D|OP_MARK, flags REMAKE|DONE_WAIT|DONECYCLE)! `_NVPAIRINS' was not built (unmade, type OP_DEPENDS|OP_HAS_COMMANDS|OP_DEPS_ FOUND|OP_MARK, flags REMAKE|DONE_WAIT|DONECYCLE)! `_MLX5INS' was not built (unmade, type OP_DEPENDS|OP_HAS_COMMANDS|OP_DEPS_FO UND|OP_MARK, flags REMAKE|DONE_WAIT|DONECYCLE)! `compat' was not built (unmade, type OP_DEPENDS|OP_PHONY|OP_HAS_COMMANDS|OP_ DEPS_FOUND|OP_MARK, flags REMAKE|DONE_WAIT|DONECYCLE)! make[2]: stopped in /opt/src/git-src --- includes_subdir_lib --- make[2]: stopped in /opt/src/git-src --- includes_subdir_bin --- make[2]: stopped in /opt/src/git-src --- includes_subdir_cddl --- make[2]: stopped in /opt/src/git-src --- includes_subdir_kerberos5 --- make[2]: stopped in /opt/src/git-src --- includes_subdir_libexec --- make[2]: stopped in /opt/src/git-src make[1]: stopped in /opt/src/git-src make: stopped in /opt/src/git-src -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org The need of the many outweighs the greed of the few. From owner-dev-commits-src-main@freebsd.org Fri Mar 5 20:46:51 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 639115674A2; Fri, 5 Mar 2021 20:46:51 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.137]) (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 4Dsft26Ml9z3jkS; Fri, 5 Mar 2021 20:46:50 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.229.168]) by shaw.ca with ESMTPA id IHLTlwjmyHmS3IHLUlRp3I; Fri, 05 Mar 2021 13:46:49 -0700 X-Authority-Analysis: v=2.4 cv=MaypB7zf c=1 sm=1 tr=0 ts=604298b9 a=7AlCcx2GqMg+lh9P3BclKA==:117 a=7AlCcx2GqMg+lh9P3BclKA==:17 a=xqWC_Br6kY4A:10 a=kj9zAlcOel0A:10 a=dESyimp9J3IA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=53RDwNlWNXt5OqmaG6AA:9 a=CjuIK1q_8ugA:10 a=6naEmYxragMA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 a=BPzZvq435JnGatEyYwdK:22 Received: from slippy.cwsent.com (slippy [IPv6:fc00:1:1:1::5b]) by spqr.komquats.com (Postfix) with ESMTPS id 1CF0E1E4; Fri, 5 Mar 2021 12:46:47 -0800 (PST) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.16.1/8.16.1) with ESMTP id 125KkkJ2004952; Fri, 5 Mar 2021 12:46:46 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202103052046.125KkkJ2004952@slippy.cwsent.com> 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: Kyle Evans cc: John Baldwin , src-committers , "" , dev-commits-src-main@freebsd.org Subject: Re: git: bb6e84c988d3 - main - poly1305: Don't export generic Poly1305_* symbols from xform_poly1305.c. In-reply-to: References: <202103051755.125HtZsc073704@gitrepo.freebsd.org> Comments: In-reply-to Kyle Evans message dated "Fri, 05 Mar 2021 14:05:06 -0600." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 05 Mar 2021 12:46:46 -0800 X-CMAE-Envelope: MS4xfFlX2fzk978WU3Zvu2T15k3NY9+Me963oqcf5A46Ua0AURMvqwWqSrJdtPWY2T7XnrEE8gKGoEOOiAKZcotjOcuuLoZZ6o+CJaMXT87+DRlt/bN8E+E9 fRn6WR7CSeIEZ9fQ69SWRYvUh8pk6j6dGbcBtZLX/WjUMzNdXP8Q+drib9Z7IhkSWKHohtezkTX+jkno3fPlvXmie4wItONCRf6AIlK7wFM1cZIqyH09RoC7 J5AqSTP1Tlf1FHWA58HqP9TjlP7TUZEFKajE/VKxQMf3Evj+GlsUaTfvJ4kchsAsUCH2LE71qPx0PDF6spR4sPaB28a95RiHr1Gj2syeZFGrGhxcW91nbXzV UfzSkZbi X-Rspamd-Queue-Id: 4Dsft26Ml9z3jkS X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2021 20:46:51 -0000 In message , Kyle Evans writes: > On Fri, Mar 5, 2021 at 11:55 AM John Baldwin wrote: > > > > The branch main has been updated by jhb: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=bb6e84c988d3f54eff602ed544ceaa > 9b9fe3e9ff > > > > commit bb6e84c988d3f54eff602ed544ceaa9b9fe3e9ff > > Author: John Baldwin > > AuthorDate: 2021-03-05 17:47:58 +0000 > > Commit: John Baldwin > > CommitDate: 2021-03-05 17:55:11 +0000 > > > > poly1305: Don't export generic Poly1305_* symbols from xform_poly1305.c > . > > > > There currently isn't a need to provide a public interface to a > > software Poly1305 implementation beyond what is already available via > > libsodium's APIs and these symbols conflict with symbols shared within > > the ossl.ko module between ossl_poly1305.c and ossl_chacha20.c. > > > > Reported by: se, kp > > Fixes: 78991a93eb9d > > Sponsored by: Netflix > > --- > > sys/opencrypto/xform_poly1305.c | 43 ++++++++++++------------------------- > ---- > > sys/opencrypto/xform_poly1305.h | 16 --------------- > > 2 files changed, 12 insertions(+), 47 deletions(-) > > xform_poly1305.h also needs to stop being grouped in > ^/include/Makefile (reported by jenkins via np) > This resolves the build failure. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org The need of the many outweighs the greed of the few. From owner-dev-commits-src-main@freebsd.org Fri Mar 5 20:50:34 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 20D8B566FF3; Fri, 5 Mar 2021 20:50:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DsfyL0VRNz3jjj; Fri, 5 Mar 2021 20:50:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0402B16EED; Fri, 5 Mar 2021 20:50:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 125KoXVV006558; Fri, 5 Mar 2021 20:50:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 125KoXhZ006557; Fri, 5 Mar 2021 20:50:33 GMT (envelope-from git) Date: Fri, 5 Mar 2021 20:50:33 GMT Message-Id: <202103052050.125KoXhZ006557@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: 765d623d606c - main - cxgbe(4): Remove extra blank line. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 765d623d606c0800f2f2689c03edecac473e30a9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2021 20:50:34 -0000 The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=765d623d606c0800f2f2689c03edecac473e30a9 commit 765d623d606c0800f2f2689c03edecac473e30a9 Author: Navdeep Parhar AuthorDate: 2021-03-05 20:48:39 +0000 Commit: Navdeep Parhar CommitDate: 2021-03-05 20:48:39 +0000 cxgbe(4): Remove extra blank line. No functional change. --- sys/dev/cxgbe/adapter.h | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/dev/cxgbe/adapter.h b/sys/dev/cxgbe/adapter.h index ff9e4eacf112..be890f035635 100644 --- a/sys/dev/cxgbe/adapter.h +++ b/sys/dev/cxgbe/adapter.h @@ -164,7 +164,6 @@ enum { BUF_PACKING_OK = (1 << 6), IS_VF = (1 << 7), KERN_TLS_OK = (1 << 8), - CXGBE_BUSY = (1 << 9), /* port flags */ From owner-dev-commits-src-main@freebsd.org Fri Mar 5 22:02:12 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 776BE569BC8; Fri, 5 Mar 2021 22:02:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DshY031Fzz3nyh; Fri, 5 Mar 2021 22:02:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5A2FD18209; Fri, 5 Mar 2021 22:02:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 125M2CoJ002982; Fri, 5 Mar 2021 22:02:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 125M2CKd002981; Fri, 5 Mar 2021 22:02:12 GMT (envelope-from git) Date: Fri, 5 Mar 2021 22:02:12 GMT Message-Id: <202103052202.125M2CKd002981@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Scott Long Subject: git: afbee98232f4 - main - Remove xform_poly1305.h from the build, it is not necessary. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: scottl X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: afbee98232f41fc05fa8a5b9a8cda4c4c65ff448 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2021 22:02:12 -0000 The branch main has been updated by scottl: URL: https://cgit.FreeBSD.org/src/commit/?id=afbee98232f41fc05fa8a5b9a8cda4c4c65ff448 commit afbee98232f41fc05fa8a5b9a8cda4c4c65ff448 Author: Scott Long AuthorDate: 2021-03-05 21:28:10 +0000 Commit: Scott Long CommitDate: 2021-03-05 21:28:10 +0000 Remove xform_poly1305.h from the build, it is not necessary. --- include/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/Makefile b/include/Makefile index b6eb63e5ef15..3a34ddb8aa18 100644 --- a/include/Makefile +++ b/include/Makefile @@ -115,8 +115,7 @@ OPENCRYPTO= _cryptodev.h \ xform.h \ xform_auth.h \ xform_comp.h \ - xform_enc.h \ - xform_poly1305.h + xform_enc.h OPENCRYPTODIR= ${INCLUDEDIR}/crypto .PATH: ${SRCTOP}/sys/dev/pci From owner-dev-commits-src-main@freebsd.org Fri Mar 5 23:07:55 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3C52156AA58; Fri, 5 Mar 2021 23:07:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dsk0q1JRcz3sQy; Fri, 5 Mar 2021 23:07:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1FD3C18E91; Fri, 5 Mar 2021 23:07:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 125N7tXJ083981; Fri, 5 Mar 2021 23:07:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 125N7t8s083980; Fri, 5 Mar 2021 23:07:55 GMT (envelope-from git) Date: Fri, 5 Mar 2021 23:07:55 GMT Message-Id: <202103052307.125N7t8s083980@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: fef845097190 - main - netmap: Stop printing a line to the dmesg in netmap_init() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fef845097190f0ecb783d6c75a9398c4e4a4c0e1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2021 23:07:55 -0000 The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=fef845097190f0ecb783d6c75a9398c4e4a4c0e1 commit fef845097190f0ecb783d6c75a9398c4e4a4c0e1 Author: Mark Johnston AuthorDate: 2021-03-05 23:07:47 +0000 Commit: Mark Johnston CommitDate: 2021-03-05 23:07:47 +0000 netmap: Stop printing a line to the dmesg in netmap_init() netmap is compiled into the kernel by default so initialization was always reported, and netmap uses a formatting convention not used in the rest of the kernel. Reviewed by: vmaffione MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D29099 --- sys/dev/netmap/netmap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/netmap/netmap.c b/sys/dev/netmap/netmap.c index b711e0d2497e..f37900712046 100644 --- a/sys/dev/netmap/netmap.c +++ b/sys/dev/netmap/netmap.c @@ -4347,7 +4347,9 @@ netmap_init(void) if (error) goto fail; +#if !defined(__FreeBSD__) || defined(KLD_MODULE) nm_prinf("netmap: loaded module"); +#endif return (0); fail: netmap_fini(); From owner-dev-commits-src-main@freebsd.org Fri Mar 5 23:42:28 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 65A2F56B926; Fri, 5 Mar 2021 23:42:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dskmh2VNJz3vRj; Fri, 5 Mar 2021 23:42:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 48A17194AF; Fri, 5 Mar 2021 23:42:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 125NgSaq035312; Fri, 5 Mar 2021 23:42:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 125NgSFQ035311; Fri, 5 Mar 2021 23:42:28 GMT (envelope-from git) Date: Fri, 5 Mar 2021 23:42:28 GMT Message-Id: <202103052342.125NgSFQ035311@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Richard Scheffenegger Subject: git: e53138694aa4 - main - tcp: Add prr_out in preparation for PRR/nonSACK and LRD MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e53138694aa41c24c17847afe959225ce0eeff91 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2021 23:42:28 -0000 The branch main has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=e53138694aa41c24c17847afe959225ce0eeff91 commit e53138694aa41c24c17847afe959225ce0eeff91 Author: Richard Scheffenegger AuthorDate: 2021-03-05 23:36:48 +0000 Commit: Richard Scheffenegger CommitDate: 2021-03-05 23:38:22 +0000 tcp: Add prr_out in preparation for PRR/nonSACK and LRD Reviewed By: #transport, kbowling MFC after: 3 days Sponsored By: Netapp, Inc. Differential Revision: https://reviews.freebsd.org/D29058 --- sys/netinet/tcp_input.c | 21 ++++++++------------- sys/netinet/tcp_output.c | 8 ++++++++ sys/netinet/tcp_var.h | 2 +- 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index a5d2e1676364..7dfe1dbd4e4f 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -510,6 +510,7 @@ cc_post_recovery(struct tcpcb *tp, struct tcphdr *th) } /* XXXLAS: EXIT_RECOVERY ? */ tp->t_bytes_acked = 0; + tp->sackhint.prr_out = 0; } /* @@ -2595,17 +2596,14 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so, imax(1, tp->snd_nxt - tp->snd_una); snd_cnt = howmany((long)tp->sackhint.prr_delivered * tp->snd_ssthresh, tp->sackhint.recover_fs) - - (tp->sackhint.sack_bytes_rexmit + - (tp->snd_nxt - tp->snd_recover)); + tp->sackhint.prr_out; } else { if (V_tcp_do_prr_conservative) limit = tp->sackhint.prr_delivered - - (tp->sackhint.sack_bytes_rexmit + - (tp->snd_nxt - tp->snd_recover)); + tp->sackhint.prr_out; else limit = imax(tp->sackhint.prr_delivered - - (tp->sackhint.sack_bytes_rexmit + - (tp->snd_nxt - tp->snd_recover)), + tp->sackhint.prr_out, del_data) + maxseg; snd_cnt = imin(tp->snd_ssthresh - pipe, limit); } @@ -3972,18 +3970,15 @@ tcp_prr_partialack(struct tcpcb *tp, struct tcphdr *th) imax(1, tp->snd_nxt - tp->snd_una); snd_cnt = howmany((long)tp->sackhint.prr_delivered * tp->snd_ssthresh, tp->sackhint.recover_fs) - - (tp->sackhint.sack_bytes_rexmit + - (tp->snd_nxt - tp->snd_recover)); + tp->sackhint.prr_out; } else { if (V_tcp_do_prr_conservative) limit = tp->sackhint.prr_delivered - - (tp->sackhint.sack_bytes_rexmit + - (tp->snd_nxt - tp->snd_recover)); + tp->sackhint.prr_out; else limit = imax(tp->sackhint.prr_delivered - - (tp->sackhint.sack_bytes_rexmit + - (tp->snd_nxt - tp->snd_recover)), - del_data) + maxseg; + tp->sackhint.prr_out, del_data) + + maxseg; snd_cnt = imin((tp->snd_ssthresh - pipe), limit); } snd_cnt = imax(snd_cnt, 0) / maxseg; diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index b4c7ab0a1ab7..d4b5a328e2a6 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -1236,6 +1236,14 @@ send: p->rxmit += len; tp->sackhint.sack_bytes_rexmit += len; } + if (IN_RECOVERY(tp->t_flags)) { + /* + * Account all bytes transmitted while + * IN_RECOVERY, simplifying PRR and + * Lost Retransmit Detection + */ + tp->sackhint.prr_out += len; + } th->th_ack = htonl(tp->rcv_nxt); if (optlen) { bcopy(opt, th + 1, optlen); diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index 30009fa18205..8cd0c828ad66 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -115,7 +115,7 @@ struct sackhint { */ uint32_t recover_fs; /* Flight Size at the start of Loss recovery */ uint32_t prr_delivered; /* Total bytes delivered using PRR */ - uint32_t _pad[1]; /* TBD */ + uint32_t prr_out; /* Bytes sent during IN_RECOVERY */ }; #define SEGQ_EMPTY(tp) TAILQ_EMPTY(&(tp)->t_segq) From owner-dev-commits-src-main@freebsd.org Sat Mar 6 01:39:41 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A98DF56FB28; Sat, 6 Mar 2021 01:39:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DsnMx4RCqz4Y2g; Sat, 6 Mar 2021 01:39:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8ABE81AC55; Sat, 6 Mar 2021 01:39:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1261df4I081178; Sat, 6 Mar 2021 01:39:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1261dfjD081177; Sat, 6 Mar 2021 01:39:41 GMT (envelope-from git) Date: Sat, 6 Mar 2021 01:39:41 GMT Message-Id: <202103060139.1261dfjD081177@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Eric Joyner Subject: git: d08b8680e12a - main - ice(4): Update to version 0.28.1-k MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: erj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d08b8680e12ad692736c84238dcf45c70c228914 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2021 01:39:41 -0000 The branch main has been updated by erj: URL: https://cgit.FreeBSD.org/src/commit/?id=d08b8680e12ad692736c84238dcf45c70c228914 commit d08b8680e12ad692736c84238dcf45c70c228914 Author: Eric Joyner AuthorDate: 2021-02-23 01:45:09 +0000 Commit: Eric Joyner CommitDate: 2021-03-06 01:33:39 +0000 ice(4): Update to version 0.28.1-k This updates the driver to align with the version included in the "Intel Ethernet Adapter Complete Driver Pack", version 25.6. There are no major functional changes; this mostly contains bug fixes and changes to prepare for new features. This version of the driver uses the previously committed ice_ddp package 1.3.19.0. Signed-off-by: Eric Joyner Tested by: jeffrey.e.pieper@intel.com Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D28640 --- sys/conf/files.amd64 | 2 + sys/conf/files.arm64 | 2 + sys/dev/ice/ice_adminq_cmd.h | 107 ++-- sys/dev/ice/ice_alloc.h | 2 +- sys/dev/ice/ice_bitops.h | 4 +- sys/dev/ice/ice_common.c | 135 ++--- sys/dev/ice/ice_common.h | 17 +- sys/dev/ice/ice_common_sysctls.h | 2 +- sys/dev/ice/ice_common_txrx.h | 2 +- sys/dev/ice/ice_controlq.c | 2 +- sys/dev/ice/ice_controlq.h | 6 +- sys/dev/ice/ice_dcb.c | 40 +- sys/dev/ice/ice_dcb.h | 2 +- sys/dev/ice/ice_devids.h | 2 +- sys/dev/ice/ice_drv_info.h | 27 +- sys/dev/ice/ice_features.h | 2 +- sys/dev/ice/ice_flex_pipe.c | 57 +- sys/dev/ice/ice_flex_pipe.h | 2 +- sys/dev/ice/ice_flex_type.h | 11 +- sys/dev/ice/ice_flow.c | 243 +++++---- sys/dev/ice/ice_flow.h | 36 +- sys/dev/ice/ice_hw_autogen.h | 2 +- sys/dev/ice/ice_iflib.h | 2 +- sys/dev/ice/ice_iflib_recovery_txrx.c | 2 +- sys/dev/ice/ice_iflib_sysctls.h | 2 +- sys/dev/ice/ice_iflib_txrx.c | 2 +- sys/dev/ice/ice_lan_tx_rx.h | 2 +- sys/dev/ice/ice_lib.c | 56 +- sys/dev/ice/ice_lib.h | 2 +- sys/dev/ice/ice_nvm.c | 954 +++++++++++++++++++++++++++++----- sys/dev/ice/ice_nvm.h | 24 +- sys/dev/ice/ice_opts.h | 2 +- sys/dev/ice/ice_osdep.c | 2 +- sys/dev/ice/ice_osdep.h | 2 +- sys/dev/ice/ice_protocol_type.h | 27 +- sys/dev/ice/ice_resmgr.c | 2 +- sys/dev/ice/ice_resmgr.h | 2 +- sys/dev/ice/ice_rss.h | 2 +- sys/dev/ice/ice_sbq_cmd.h | 2 +- sys/dev/ice/ice_sched.c | 562 ++++++++++++-------- sys/dev/ice/ice_sched.h | 31 +- sys/dev/ice/ice_sriov.c | 407 ++++++++++++++- sys/dev/ice/ice_sriov.h | 23 +- sys/dev/ice/ice_status.h | 2 +- sys/dev/ice/ice_strings.c | 2 +- sys/dev/ice/ice_switch.c | 70 ++- sys/dev/ice/ice_switch.h | 4 +- sys/dev/ice/ice_type.h | 266 ++++++++-- sys/dev/ice/ice_vlan_mode.c | 72 +++ sys/dev/ice/ice_vlan_mode.h | 60 +++ sys/dev/ice/if_ice_iflib.c | 2 +- sys/dev/ice/virtchnl.h | 287 +++++++++- sys/dev/ice/virtchnl_inline_ipsec.h | 16 +- sys/modules/ice/Makefile | 2 +- 54 files changed, 2881 insertions(+), 717 deletions(-) diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64 index c5421f4af4fc..00362da407cb 100644 --- a/sys/conf/files.amd64 +++ b/sys/conf/files.amd64 @@ -191,6 +191,8 @@ dev/ice/ice_sriov.c optional ice pci \ compile-with "${NORMAL_C} -I$S/dev/ice" dev/ice/ice_switch.c optional ice pci \ compile-with "${NORMAL_C} -I$S/dev/ice" +dev/ice/ice_vlan_mode.c optional ice pci \ + compile-with "${NORMAL_C} -I$S/dev/ice" ice_ddp.c optional ice_ddp \ compile-with "${AWK} -f $S/tools/fw_stub.awk ice_ddp.fw:ice_ddp:0x01031300 -mice_ddp -c${.TARGET}" \ no-ctfconvert no-implicit-rule before-depend local \ diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index 0286ae57b0e0..dd1d96c49aba 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -205,6 +205,8 @@ dev/ice/ice_sriov.c optional ice pci \ compile-with "${NORMAL_C} -I$S/dev/ice" dev/ice/ice_switch.c optional ice pci \ compile-with "${NORMAL_C} -I$S/dev/ice" +dev/ice/ice_vlan_mode.c optional ice pci \ + compile-with "${NORMAL_C} -I$S/dev/ice" ice_ddp.c optional ice_ddp \ compile-with "${AWK} -f $S/tools/fw_stub.awk ice_ddp.fw:ice_ddp:0x01031300 -mice_ddp -c${.TARGET}" \ no-ctfconvert no-implicit-rule before-depend local \ diff --git a/sys/dev/ice/ice_adminq_cmd.h b/sys/dev/ice/ice_adminq_cmd.h index 8d8c025fdd37..9179b0ce1226 100644 --- a/sys/dev/ice/ice_adminq_cmd.h +++ b/sys/dev/ice/ice_adminq_cmd.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2020, Intel Corporation +/* Copyright (c) 2021, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -166,6 +166,7 @@ struct ice_aqc_list_caps_elem { #define ICE_AQC_CAPS_LOGI_TO_PHYSI_PORT_MAP 0x0073 #define ICE_AQC_CAPS_SKU 0x0074 #define ICE_AQC_CAPS_PORT_MAP 0x0075 +#define ICE_AQC_CAPS_PCIE_RESET_AVOIDANCE 0x0076 #define ICE_AQC_CAPS_NVM_MGMT 0x0080 u8 major_ver; @@ -1449,6 +1450,7 @@ struct ice_aqc_get_link_status_data { #define ICE_AQ_LINK_ACT_PORT_OPT_INVAL BIT(2) #define ICE_AQ_LINK_FEAT_ID_OR_CONFIG_ID_INVAL BIT(3) #define ICE_AQ_LINK_TOPO_CRITICAL_SDP_ERR BIT(4) +#define ICE_AQ_LINK_MODULE_POWER_UNSUPPORTED BIT(5) u8 link_info; #define ICE_AQ_LINK_UP BIT(0) /* Link Status */ #define ICE_AQ_LINK_FAULT BIT(1) @@ -1496,7 +1498,7 @@ struct ice_aqc_get_link_status_data { #define ICE_AQ_CFG_PACING_TYPE_FIXED ICE_AQ_CFG_PACING_TYPE_M /* External Device Power Ability */ u8 power_desc; -#define ICE_AQ_PWR_CLASS_M 0x3 +#define ICE_AQ_PWR_CLASS_M 0x3F #define ICE_AQ_LINK_PWR_BASET_LOW_HIGH 0 #define ICE_AQ_LINK_PWR_BASET_HIGH 1 #define ICE_AQ_LINK_PWR_QSFP_CLASS_1 0 @@ -1860,7 +1862,9 @@ struct ice_aqc_mdio { #define ICE_AQC_MDIO_DEV_M (0x1F << ICE_AQC_MDIO_DEV_S) #define ICE_AQC_MDIO_CLAUSE_22 BIT(5) #define ICE_AQC_MDIO_CLAUSE_45 BIT(6) - u8 rsvd; + u8 mdio_bus_address; +#define ICE_AQC_MDIO_BUS_ADDR_S 0 +#define ICE_AQC_MDIO_BUS_ADDR_M (0x1F << ICE_AQC_MDIO_BUS_ADDR_S) __le16 offset; __le16 data; /* Input in write cmd, output in read cmd. */ u8 rsvd1[4]; @@ -2001,6 +2005,22 @@ struct ice_aqc_sff_eeprom { __le32 addr_low; }; +/* SW Set GPIO command (indirect 0x6EF) + * SW Get GPIO command (indirect 0x6F0) + */ +struct ice_aqc_sw_gpio { + __le16 gpio_ctrl_handle; +#define ICE_AQC_SW_GPIO_CONTROLLER_HANDLE_S 0 +#define ICE_AQC_SW_GPIO_CONTROLLER_HANDLE_M (0x3FF << ICE_AQC_SW_GPIO_CONTROLLER_HANDLE_S) + u8 gpio_num; +#define ICE_AQC_SW_GPIO_NUMBER_S 0 +#define ICE_AQC_SW_GPIO_NUMBER_M (0x1F << ICE_AQC_SW_GPIO_NUMBER_S) + u8 gpio_params; +#define ICE_AQC_SW_GPIO_PARAMS_DIRECTION BIT(1) +#define ICE_AQC_SW_GPIO_PARAMS_VALUE BIT(0) + u8 rsvd[12]; +}; + /* NVM Read command (indirect 0x0701) * NVM Erase commands (direct 0x0702) * NVM Write commands (indirect 0x0703) @@ -2027,6 +2047,9 @@ struct ice_aqc_nvm { #define ICE_AQC_NVM_REVERT_LAST_ACTIV BIT(6) /* Write Activate only */ #define ICE_AQC_NVM_ACTIV_SEL_MASK MAKEMASK(0x7, 3) #define ICE_AQC_NVM_FLASH_ONLY BIT(7) +#define ICE_AQC_NVM_POR_FLAG 0 /* Used by NVM Write completion on ARQ */ +#define ICE_AQC_NVM_PERST_FLAG 1 +#define ICE_AQC_NVM_EMPR_FLAG 2 __le16 module_typeid; __le16 length; #define ICE_AQC_NVM_ERASE_LEN 0xFFFF @@ -2056,32 +2079,22 @@ struct ice_aqc_nvm { #define ICE_AQC_NVM_LLDP_STATUS_M_LEN 4 /* In Bits */ #define ICE_AQC_NVM_LLDP_STATUS_RD_LEN 4 /* In Bytes */ -/* The result of netlist NVM read comes in a TLV format. The actual data - * (netlist header) starts from word offset 1 (byte 2). The FW strips - * out the type field from the TLV header so all the netlist fields - * should adjust their offset value by 1 word (2 bytes) in order to map - * their correct location. +#define ICE_AQC_NVM_MINSREV_MOD_ID 0x130 + +/* Used for reading and writing MinSRev using 0x0701 and 0x0703. Note that the + * type field is excluded from the section when reading and writing from + * a module using the module_typeid field with these AQ commands. */ -#define ICE_AQC_NVM_LINK_TOPO_NETLIST_MOD_ID 0x11B -#define ICE_AQC_NVM_LINK_TOPO_NETLIST_LEN_OFFSET 1 -#define ICE_AQC_NVM_LINK_TOPO_NETLIST_LEN 2 /* In bytes */ -#define ICE_AQC_NVM_NETLIST_NODE_COUNT_OFFSET 2 -#define ICE_AQC_NVM_NETLIST_NODE_COUNT_LEN 2 /* In bytes */ -#define ICE_AQC_NVM_NETLIST_NODE_COUNT_M MAKEMASK(0x3FF, 0) -#define ICE_AQC_NVM_NETLIST_ID_BLK_START_OFFSET 5 -#define ICE_AQC_NVM_NETLIST_ID_BLK_LEN 0x30 /* In words */ - -/* netlist ID block field offsets (word offsets) */ -#define ICE_AQC_NVM_NETLIST_ID_BLK_MAJOR_VER_LOW 2 -#define ICE_AQC_NVM_NETLIST_ID_BLK_MAJOR_VER_HIGH 3 -#define ICE_AQC_NVM_NETLIST_ID_BLK_MINOR_VER_LOW 4 -#define ICE_AQC_NVM_NETLIST_ID_BLK_MINOR_VER_HIGH 5 -#define ICE_AQC_NVM_NETLIST_ID_BLK_TYPE_LOW 6 -#define ICE_AQC_NVM_NETLIST_ID_BLK_TYPE_HIGH 7 -#define ICE_AQC_NVM_NETLIST_ID_BLK_REV_LOW 8 -#define ICE_AQC_NVM_NETLIST_ID_BLK_REV_HIGH 9 -#define ICE_AQC_NVM_NETLIST_ID_BLK_SHA_HASH 0xA -#define ICE_AQC_NVM_NETLIST_ID_BLK_CUST_VER 0x2F +struct ice_aqc_nvm_minsrev { + __le16 length; + __le16 validity; +#define ICE_AQC_NVM_MINSREV_NVM_VALID BIT(0) +#define ICE_AQC_NVM_MINSREV_OROM_VALID BIT(1) + __le16 nvm_minsrev_l; + __le16 nvm_minsrev_h; + __le16 orom_minsrev_l; + __le16 orom_minsrev_h; +}; /* Used for 0x0704 as well as for 0x0705 commands */ struct ice_aqc_nvm_cfg { @@ -2114,7 +2127,7 @@ struct ice_aqc_nvm_checksum { u8 rsvd2[12]; }; -/** +/* * Send to PF command (indirect 0x0801) ID is only used by PF * * Send to VF command (indirect 0x0802) ID is only used by PF @@ -2541,6 +2554,7 @@ struct ice_pkg_ver { }; #define ICE_PKG_NAME_SIZE 32 +#define ICE_SEG_ID_SIZE 28 #define ICE_SEG_NAME_SIZE 28 struct ice_aqc_get_pkg_info { @@ -2589,6 +2603,35 @@ struct ice_aqc_set_health_status_config { u8 reserved[15]; }; +#define ICE_AQC_HEALTH_STATUS_ERR_UNKNOWN_MOD_STRICT 0x101 +#define ICE_AQC_HEALTH_STATUS_ERR_MOD_TYPE 0x102 +#define ICE_AQC_HEALTH_STATUS_ERR_MOD_QUAL 0x103 +#define ICE_AQC_HEALTH_STATUS_ERR_MOD_COMM 0x104 +#define ICE_AQC_HEALTH_STATUS_ERR_MOD_CONFLICT 0x105 +#define ICE_AQC_HEALTH_STATUS_ERR_MOD_NOT_PRESENT 0x106 +#define ICE_AQC_HEALTH_STATUS_INFO_MOD_UNDERUTILIZED 0x107 +#define ICE_AQC_HEALTH_STATUS_ERR_UNKNOWN_MOD_LENIENT 0x108 +#define ICE_AQC_HEALTH_STATUS_ERR_INVALID_LINK_CFG 0x10B +#define ICE_AQC_HEALTH_STATUS_ERR_PORT_ACCESS 0x10C +#define ICE_AQC_HEALTH_STATUS_ERR_PORT_UNREACHABLE 0x10D +#define ICE_AQC_HEALTH_STATUS_INFO_PORT_SPEED_MOD_LIMITED 0x10F +#define ICE_AQC_HEALTH_STATUS_ERR_PARALLEL_FAULT 0x110 +#define ICE_AQC_HEALTH_STATUS_INFO_PORT_SPEED_PHY_LIMITED 0x111 +#define ICE_AQC_HEALTH_STATUS_ERR_NETLIST_TOPO 0x112 +#define ICE_AQC_HEALTH_STATUS_ERR_NETLIST 0x113 +#define ICE_AQC_HEALTH_STATUS_ERR_TOPO_CONFLICT 0x114 +#define ICE_AQC_HEALTH_STATUS_ERR_LINK_HW_ACCESS 0x115 +#define ICE_AQC_HEALTH_STATUS_ERR_LINK_RUNTIME 0x116 +#define ICE_AQC_HEALTH_STATUS_ERR_DNL_INIT 0x117 +#define ICE_AQC_HEALTH_STATUS_INFO_RECOVERY 0x500 +#define ICE_AQC_HEALTH_STATUS_ERR_FLASH_ACCESS 0x501 +#define ICE_AQC_HEALTH_STATUS_ERR_NVM_AUTH 0x502 +#define ICE_AQC_HEALTH_STATUS_ERR_OROM_AUTH 0x503 +#define ICE_AQC_HEALTH_STATUS_ERR_DDP_AUTH 0x504 +#define ICE_AQC_HEALTH_STATUS_ERR_NVM_COMPAT 0x505 +#define ICE_AQC_HEALTH_STATUS_ERR_OROM_COMPAT 0x506 +#define ICE_AQC_HEALTH_STATUS_ERR_DCB_MIB 0x509 + /* Get Health Status codes (indirect 0xFF21) */ struct ice_aqc_get_supported_health_status_codes { __le16 health_code_count; @@ -2630,8 +2673,8 @@ struct ice_aqc_clear_health_status { * @opcode: AQ command opcode * @datalen: length in bytes of indirect/external data buffer * @retval: return value from firmware - * @cookie_h: opaque data high-half - * @cookie_l: opaque data low-half + * @cookie_high: opaque data high-half + * @cookie_low: opaque data low-half * @params: command-specific parameters * * Descriptor format for commands the driver posts on the Admin Transmit Queue @@ -2920,6 +2963,8 @@ enum ice_adminq_opc { ice_aqc_opc_set_gpio = 0x06EC, ice_aqc_opc_get_gpio = 0x06ED, ice_aqc_opc_sff_eeprom = 0x06EE, + ice_aqc_opc_sw_set_gpio = 0x06EF, + ice_aqc_opc_sw_get_gpio = 0x06F0, /* NVM commands */ ice_aqc_opc_nvm_read = 0x0701, diff --git a/sys/dev/ice/ice_alloc.h b/sys/dev/ice/ice_alloc.h index 1d9b9169eb02..b281958be793 100644 --- a/sys/dev/ice/ice_alloc.h +++ b/sys/dev/ice/ice_alloc.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2020, Intel Corporation +/* Copyright (c) 2021, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_bitops.h b/sys/dev/ice/ice_bitops.h index 7c8cf6cb90f5..a7f729060b78 100644 --- a/sys/dev/ice/ice_bitops.h +++ b/sys/dev/ice/ice_bitops.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2020, Intel Corporation +/* Copyright (c) 2021, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -423,7 +423,7 @@ ice_bitmap_set(ice_bitmap_t *dst, u16 pos, u16 num_bits) { u16 i; - for (i = pos; i < num_bits; i++) + for (i = pos; i < pos + num_bits; i++) ice_set_bit(i, dst); } diff --git a/sys/dev/ice/ice_common.c b/sys/dev/ice/ice_common.c index 20689f4893d4..5e2e4340c75c 100644 --- a/sys/dev/ice/ice_common.c +++ b/sys/dev/ice/ice_common.c @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2020, Intel Corporation +/* Copyright (c) 2021, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -265,7 +265,7 @@ ice_aq_get_link_topo_handle(struct ice_port_info *pi, u8 node_type, return ice_aq_send_cmd(pi->hw, &desc, NULL, 0, cd); } -/* +/** * ice_is_media_cage_present * @pi: port information structure * @@ -704,13 +704,14 @@ static void ice_get_itr_intrl_gran(struct ice_hw *hw) void ice_print_rollback_msg(struct ice_hw *hw) { char nvm_str[ICE_NVM_VER_LEN] = { 0 }; - struct ice_nvm_info *nvm = &hw->nvm; struct ice_orom_info *orom; + struct ice_nvm_info *nvm; - orom = &nvm->orom; + orom = &hw->flash.orom; + nvm = &hw->flash.nvm; SNPRINTF(nvm_str, sizeof(nvm_str), "%x.%02x 0x%x %d.%d.%d", - nvm->major_ver, nvm->minor_ver, nvm->eetrack, orom->major, + nvm->major, nvm->minor, nvm->eetrack, orom->major, orom->build, orom->patch); ice_warn(hw, "Firmware rollback mode detected. Current version is NVM: %s, FW: %d.%d. Device may exhibit limited functionality. Refer to the Intel(R) Ethernet Adapters and Devices User Guide for details on firmware rollback mode\n", @@ -805,8 +806,7 @@ enum ice_status ice_init_hw(struct ice_hw *hw) ICE_AQC_REPORT_TOPO_CAP, pcaps, NULL); ice_free(hw, pcaps); if (status) - ice_debug(hw, ICE_DBG_PHY, "%s: Get PHY capabilities failed, continuing anyway\n", - __func__); + ice_debug(hw, ICE_DBG_PHY, "Get PHY capabilities failed, continuing anyway\n"); /* Initialize port_info struct with link information */ status = ice_aq_get_link_info(hw->port_info, false, NULL, NULL); @@ -850,6 +850,9 @@ enum ice_status ice_init_hw(struct ice_hw *hw) if (status) goto err_unroll_fltr_mgmt_struct; ice_init_lock(&hw->tnl_lock); + + ice_init_vlan_mode_ops(hw); + return ICE_SUCCESS; err_unroll_fltr_mgmt_struct: @@ -1701,7 +1704,7 @@ ice_aq_alloc_free_res(struct ice_hw *hw, u16 num_entries, if (!buf) return ICE_ERR_PARAM; - if (buf_size < (num_entries * sizeof(buf->elem[0]))) + if (buf_size < FLEX_ARRAY_SIZE(buf, elem, num_entries)) return ICE_ERR_PARAM; ice_fill_dflt_direct_cmd_desc(&desc, opc); @@ -1982,6 +1985,16 @@ ice_parse_common_caps(struct ice_hw *hw, struct ice_hw_common_caps *caps, case ICE_AQC_CAPS_NVM_VER: break; case ICE_AQC_CAPS_NVM_MGMT: + caps->sec_rev_disabled = + (number & ICE_NVM_MGMT_SEC_REV_DISABLED) ? + true : false; + ice_debug(hw, ICE_DBG_INIT, "%s: sec_rev_disabled = %d\n", prefix, + caps->sec_rev_disabled); + caps->update_disabled = + (number & ICE_NVM_MGMT_UPDATE_DISABLED) ? + true : false; + ice_debug(hw, ICE_DBG_INIT, "%s: update_disabled = %d\n", prefix, + caps->update_disabled); caps->nvm_unified_update = (number & ICE_NVM_MGMT_UNIFIED_UPD_SUPPORT) ? true : false; @@ -2389,26 +2402,25 @@ void ice_set_safe_mode_caps(struct ice_hw *hw) { struct ice_hw_func_caps *func_caps = &hw->func_caps; struct ice_hw_dev_caps *dev_caps = &hw->dev_caps; - u32 valid_func, rxq_first_id, txq_first_id; - u32 msix_vector_first_id, max_mtu; + struct ice_hw_common_caps cached_caps; u32 num_funcs; /* cache some func_caps values that should be restored after memset */ - valid_func = func_caps->common_cap.valid_functions; - txq_first_id = func_caps->common_cap.txq_first_id; - rxq_first_id = func_caps->common_cap.rxq_first_id; - msix_vector_first_id = func_caps->common_cap.msix_vector_first_id; - max_mtu = func_caps->common_cap.max_mtu; + cached_caps = func_caps->common_cap; /* unset func capabilities */ memset(func_caps, 0, sizeof(*func_caps)); +#define ICE_RESTORE_FUNC_CAP(name) \ + func_caps->common_cap.name = cached_caps.name + /* restore cached values */ - func_caps->common_cap.valid_functions = valid_func; - func_caps->common_cap.txq_first_id = txq_first_id; - func_caps->common_cap.rxq_first_id = rxq_first_id; - func_caps->common_cap.msix_vector_first_id = msix_vector_first_id; - func_caps->common_cap.max_mtu = max_mtu; + ICE_RESTORE_FUNC_CAP(valid_functions); + ICE_RESTORE_FUNC_CAP(txq_first_id); + ICE_RESTORE_FUNC_CAP(rxq_first_id); + ICE_RESTORE_FUNC_CAP(msix_vector_first_id); + ICE_RESTORE_FUNC_CAP(max_mtu); + ICE_RESTORE_FUNC_CAP(nvm_unified_update); /* one Tx and one Rx queue in safe mode */ func_caps->common_cap.num_rxq = 1; @@ -2419,22 +2431,22 @@ void ice_set_safe_mode_caps(struct ice_hw *hw) func_caps->guar_num_vsi = 1; /* cache some dev_caps values that should be restored after memset */ - valid_func = dev_caps->common_cap.valid_functions; - txq_first_id = dev_caps->common_cap.txq_first_id; - rxq_first_id = dev_caps->common_cap.rxq_first_id; - msix_vector_first_id = dev_caps->common_cap.msix_vector_first_id; - max_mtu = dev_caps->common_cap.max_mtu; + cached_caps = dev_caps->common_cap; num_funcs = dev_caps->num_funcs; /* unset dev capabilities */ memset(dev_caps, 0, sizeof(*dev_caps)); +#define ICE_RESTORE_DEV_CAP(name) \ + dev_caps->common_cap.name = cached_caps.name + /* restore cached values */ - dev_caps->common_cap.valid_functions = valid_func; - dev_caps->common_cap.txq_first_id = txq_first_id; - dev_caps->common_cap.rxq_first_id = rxq_first_id; - dev_caps->common_cap.msix_vector_first_id = msix_vector_first_id; - dev_caps->common_cap.max_mtu = max_mtu; + ICE_RESTORE_DEV_CAP(valid_functions); + ICE_RESTORE_DEV_CAP(txq_first_id); + ICE_RESTORE_DEV_CAP(rxq_first_id); + ICE_RESTORE_DEV_CAP(msix_vector_first_id); + ICE_RESTORE_DEV_CAP(max_mtu); + ICE_RESTORE_DEV_CAP(nvm_unified_update); dev_caps->num_funcs = num_funcs; /* one Tx and one Rx queue per function in safe mode */ @@ -2480,7 +2492,7 @@ ice_aq_manage_mac_write(struct ice_hw *hw, const u8 *mac_addr, u8 flags, ice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_manage_mac_write); cmd->flags = flags; - ice_memcpy(cmd->mac_addr, mac_addr, ETH_ALEN, ICE_NONDMA_TO_DMA); + ice_memcpy(cmd->mac_addr, mac_addr, ETH_ALEN, ICE_NONDMA_TO_NONDMA); return ice_aq_send_cmd(hw, &desc, NULL, 0, cd); } @@ -2816,6 +2828,11 @@ enum ice_status ice_update_link_info(struct ice_port_info *pi) status = ice_aq_get_phy_caps(pi, false, ICE_AQC_REPORT_TOPO_CAP, pcaps, NULL); + if (status == ICE_SUCCESS) + ice_memcpy(li->module_type, &pcaps->module_type, + sizeof(li->module_type), + ICE_NONDMA_TO_NONDMA); + ice_free(hw, pcaps); } @@ -3379,7 +3396,7 @@ ice_aq_sff_eeprom(struct ice_hw *hw, u16 lport, u8 bus_addr, ice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_sff_eeprom); cmd = &desc.params.read_write_sff_param; - desc.flags = CPU_TO_LE16(ICE_AQ_FLAG_RD | ICE_AQ_FLAG_BUF); + desc.flags = CPU_TO_LE16(ICE_AQ_FLAG_RD); cmd->lport_num = (u8)(lport & 0xff); cmd->lport_num_valid = (u8)((lport >> 8) & 0x01); cmd->i2c_bus_addr = CPU_TO_LE16(((bus_addr >> 1) & @@ -3399,23 +3416,33 @@ ice_aq_sff_eeprom(struct ice_hw *hw, u16 lport, u8 bus_addr, /** * __ice_aq_get_set_rss_lut * @hw: pointer to the hardware structure - * @vsi_id: VSI FW index - * @lut_type: LUT table type - * @lut: pointer to the LUT buffer provided by the caller - * @lut_size: size of the LUT buffer - * @glob_lut_idx: global LUT index + * @params: RSS LUT parameters * @set: set true to set the table, false to get the table * * Internal function to get (0x0B05) or set (0x0B03) RSS look up table */ static enum ice_status -__ice_aq_get_set_rss_lut(struct ice_hw *hw, u16 vsi_id, u8 lut_type, u8 *lut, - u16 lut_size, u8 glob_lut_idx, bool set) +__ice_aq_get_set_rss_lut(struct ice_hw *hw, struct ice_aq_get_set_rss_lut_params *params, bool set) { + u16 flags = 0, vsi_id, lut_type, lut_size, glob_lut_idx, vsi_handle; struct ice_aqc_get_set_rss_lut *cmd_resp; struct ice_aq_desc desc; enum ice_status status; - u16 flags = 0; + u8 *lut; + + if (!params) + return ICE_ERR_PARAM; + + vsi_handle = params->vsi_handle; + lut = params->lut; + + if (!ice_is_vsi_valid(hw, vsi_handle) || !lut) + return ICE_ERR_PARAM; + + lut_size = params->lut_size; + lut_type = params->lut_type; + glob_lut_idx = params->global_lut_id; + vsi_id = ice_get_hw_vsi_num(hw, vsi_handle); cmd_resp = &desc.params.get_set_rss_lut; @@ -3492,43 +3519,27 @@ ice_aq_get_set_rss_lut_exit: /** * ice_aq_get_rss_lut * @hw: pointer to the hardware structure - * @vsi_handle: software VSI handle - * @lut_type: LUT table type - * @lut: pointer to the LUT buffer provided by the caller - * @lut_size: size of the LUT buffer + * @get_params: RSS LUT parameters used to specify which RSS LUT to get * * get the RSS lookup table, PF or VSI type */ enum ice_status -ice_aq_get_rss_lut(struct ice_hw *hw, u16 vsi_handle, u8 lut_type, - u8 *lut, u16 lut_size) +ice_aq_get_rss_lut(struct ice_hw *hw, struct ice_aq_get_set_rss_lut_params *get_params) { - if (!ice_is_vsi_valid(hw, vsi_handle) || !lut) - return ICE_ERR_PARAM; - - return __ice_aq_get_set_rss_lut(hw, ice_get_hw_vsi_num(hw, vsi_handle), - lut_type, lut, lut_size, 0, false); + return __ice_aq_get_set_rss_lut(hw, get_params, false); } /** * ice_aq_set_rss_lut * @hw: pointer to the hardware structure - * @vsi_handle: software VSI handle - * @lut_type: LUT table type - * @lut: pointer to the LUT buffer provided by the caller - * @lut_size: size of the LUT buffer + * @set_params: RSS LUT parameters used to specify how to set the RSS LUT * * set the RSS lookup table, PF or VSI type */ enum ice_status -ice_aq_set_rss_lut(struct ice_hw *hw, u16 vsi_handle, u8 lut_type, - u8 *lut, u16 lut_size) +ice_aq_set_rss_lut(struct ice_hw *hw, struct ice_aq_get_set_rss_lut_params *set_params) { - if (!ice_is_vsi_valid(hw, vsi_handle) || !lut) - return ICE_ERR_PARAM; - - return __ice_aq_get_set_rss_lut(hw, ice_get_hw_vsi_num(hw, vsi_handle), - lut_type, lut, lut_size, 0, true); + return __ice_aq_get_set_rss_lut(hw, set_params, true); } /** diff --git a/sys/dev/ice/ice_common.h b/sys/dev/ice/ice_common.h index 84a39b7e9b8a..3a28816fb131 100644 --- a/sys/dev/ice/ice_common.h +++ b/sys/dev/ice/ice_common.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2020, Intel Corporation +/* Copyright (c) 2021, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -117,11 +117,9 @@ ice_write_tx_drbell_q_ctx(struct ice_hw *hw, u32 tx_drbell_q_index); enum ice_status -ice_aq_get_rss_lut(struct ice_hw *hw, u16 vsi_handle, u8 lut_type, u8 *lut, - u16 lut_size); +ice_aq_get_rss_lut(struct ice_hw *hw, struct ice_aq_get_set_rss_lut_params *get_params); enum ice_status -ice_aq_set_rss_lut(struct ice_hw *hw, u16 vsi_handle, u8 lut_type, u8 *lut, - u16 lut_size); +ice_aq_set_rss_lut(struct ice_hw *hw, struct ice_aq_get_set_rss_lut_params *set_params); enum ice_status ice_aq_get_rss_key(struct ice_hw *hw, u16 vsi_handle, struct ice_aqc_get_set_rss_keys *keys); @@ -240,13 +238,6 @@ ice_ena_vsi_txq(struct ice_port_info *pi, u16 vsi_handle, u8 tc, u16 q_handle, struct ice_sq_cd *cd); enum ice_status ice_replay_vsi(struct ice_hw *hw, u16 vsi_handle); void ice_replay_post(struct ice_hw *hw); -void ice_sched_replay_agg_vsi_preinit(struct ice_hw *hw); -void ice_sched_replay_agg(struct ice_hw *hw); -enum ice_status ice_sched_replay_tc_node_bw(struct ice_port_info *pi); -enum ice_status ice_replay_vsi_agg(struct ice_hw *hw, u16 vsi_handle); -enum ice_status ice_sched_replay_root_node_bw(struct ice_port_info *pi); -enum ice_status -ice_sched_replay_q_bw(struct ice_port_info *pi, struct ice_q_ctx *q_ctx); struct ice_q_ctx * ice_get_lan_q_ctx(struct ice_hw *hw, u16 vsi_handle, u8 tc, u16 q_handle); void @@ -277,7 +268,7 @@ enum ice_status ice_get_cur_lldp_persist_status(struct ice_hw *hw, u32 *lldp_status); enum ice_status ice_get_dflt_lldp_persist_status(struct ice_hw *hw, u32 *lldp_status); -enum ice_status ice_get_netlist_ver_info(struct ice_hw *hw); +enum ice_status ice_get_netlist_ver_info(struct ice_hw *hw, struct ice_netlist_info *netlist); enum ice_status ice_aq_set_lldp_mib(struct ice_hw *hw, u8 mib_type, void *buf, u16 buf_size, struct ice_sq_cd *cd); diff --git a/sys/dev/ice/ice_common_sysctls.h b/sys/dev/ice/ice_common_sysctls.h index 82ead3fcfecc..17c2fce72ee7 100644 --- a/sys/dev/ice/ice_common_sysctls.h +++ b/sys/dev/ice/ice_common_sysctls.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2020, Intel Corporation +/* Copyright (c) 2021, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_common_txrx.h b/sys/dev/ice/ice_common_txrx.h index 8fb3d49288d8..d5e6182c2212 100644 --- a/sys/dev/ice/ice_common_txrx.h +++ b/sys/dev/ice/ice_common_txrx.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2020, Intel Corporation +/* Copyright (c) 2021, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_controlq.c b/sys/dev/ice/ice_controlq.c index 3caab15e0e41..ee8d7f5c3e8f 100644 --- a/sys/dev/ice/ice_controlq.c +++ b/sys/dev/ice/ice_controlq.c @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2020, Intel Corporation +/* Copyright (c) 2021, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_controlq.h b/sys/dev/ice/ice_controlq.h index 0da6b025fc8c..947f1d6d1767 100644 --- a/sys/dev/ice/ice_controlq.h +++ b/sys/dev/ice/ice_controlq.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2020, Intel Corporation +/* Copyright (c) 2021, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -60,8 +60,8 @@ enum ice_ctl_q { ICE_CTL_Q_MAILBOX, }; -/* Control Queue timeout settings - max delay 250ms */ -#define ICE_CTL_Q_SQ_CMD_TIMEOUT 2500 /* Count 2500 times */ +/* Control Queue timeout settings - max delay 1s */ +#define ICE_CTL_Q_SQ_CMD_TIMEOUT 10000 /* Count 10000 times */ #define ICE_CTL_Q_SQ_CMD_USEC 100 /* Check every 100usec */ #define ICE_CTL_Q_ADMIN_INIT_TIMEOUT 10 /* Count 10 times */ #define ICE_CTL_Q_ADMIN_INIT_MSEC 100 /* Check every 100msec */ diff --git a/sys/dev/ice/ice_dcb.c b/sys/dev/ice/ice_dcb.c index b6275c5d07e8..abe0237eb88f 100644 --- a/sys/dev/ice/ice_dcb.c +++ b/sys/dev/ice/ice_dcb.c @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2020, Intel Corporation +/* Copyright (c) 2021, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -994,22 +994,27 @@ ice_aq_set_dcb_parameters(struct ice_hw *hw, bool dcb_enable, /** * ice_cee_to_dcb_cfg * @cee_cfg: pointer to CEE configuration struct - * @dcbcfg: DCB configuration struct + * @pi: port information structure * * Convert CEE configuration from firmware to DCB configuration */ static void ice_cee_to_dcb_cfg(struct ice_aqc_get_cee_dcb_cfg_resp *cee_cfg, - struct ice_dcbx_cfg *dcbcfg) + struct ice_port_info *pi) { u32 status, tlv_status = LE32_TO_CPU(cee_cfg->tlv_status); u32 ice_aqc_cee_status_mask, ice_aqc_cee_status_shift; + u8 i, j, err, sync, oper, app_index, ice_app_sel_type; u16 app_prio = LE16_TO_CPU(cee_cfg->oper_app_prio); - u8 i, err, sync, oper, app_index, ice_app_sel_type; u16 ice_aqc_cee_app_mask, ice_aqc_cee_app_shift; + struct ice_dcbx_cfg *cmp_dcbcfg, *dcbcfg; u16 ice_app_prot_id_type; - /* CEE PG data to ETS config */ + dcbcfg = &pi->qos_cfg.local_dcbx_cfg; + dcbcfg->dcbx_mode = ICE_DCBX_MODE_CEE; + dcbcfg->tlv_status = tlv_status; + + /* CEE PG data */ dcbcfg->etscfg.maxtcs = cee_cfg->oper_num_tc; /* Note that the FW creates the oper_prio_tc nibbles reversed @@ -1036,10 +1041,16 @@ ice_cee_to_dcb_cfg(struct ice_aqc_get_cee_dcb_cfg_resp *cee_cfg, } } - /* CEE PFC data to ETS config */ + /* CEE PFC data */ dcbcfg->pfc.pfcena = cee_cfg->oper_pfc_en; dcbcfg->pfc.pfccap = ICE_MAX_TRAFFIC_CLASS; + /* CEE APP TLV data */ + if (dcbcfg->app_mode == ICE_DCBX_APPS_NON_WILLING) + cmp_dcbcfg = &pi->qos_cfg.desired_dcbx_cfg; + else + cmp_dcbcfg = &pi->qos_cfg.remote_dcbx_cfg; + app_index = 0; for (i = 0; i < 3; i++) { if (i == 0) { @@ -1058,6 +1069,18 @@ ice_cee_to_dcb_cfg(struct ice_aqc_get_cee_dcb_cfg_resp *cee_cfg, ice_aqc_cee_app_shift = ICE_AQC_CEE_APP_ISCSI_S; ice_app_sel_type = ICE_APP_SEL_TCPIP; ice_app_prot_id_type = ICE_APP_PROT_ID_ISCSI; + + for (j = 0; j < cmp_dcbcfg->numapps; j++) { + u16 prot_id = cmp_dcbcfg->app[j].prot_id; + u8 sel = cmp_dcbcfg->app[j].selector; + + if (sel == ICE_APP_SEL_TCPIP && + (prot_id == ICE_APP_PROT_ID_ISCSI || + prot_id == ICE_APP_PROT_ID_ISCSI_860)) { + ice_app_prot_id_type = prot_id; + break; + } + } } else { /* FIP APP */ ice_aqc_cee_status_mask = ICE_AQC_CEE_FIP_STATUS_M; @@ -1148,11 +1171,8 @@ enum ice_status ice_get_dcb_cfg(struct ice_port_info *pi) ret = ice_aq_get_cee_dcb_cfg(pi->hw, &cee_cfg, NULL); if (ret == ICE_SUCCESS) { /* CEE mode */ - dcbx_cfg = &pi->qos_cfg.local_dcbx_cfg; - dcbx_cfg->dcbx_mode = ICE_DCBX_MODE_CEE; - dcbx_cfg->tlv_status = LE32_TO_CPU(cee_cfg.tlv_status); - ice_cee_to_dcb_cfg(&cee_cfg, dcbx_cfg); ret = ice_get_ieee_or_cee_dcb_cfg(pi, ICE_DCBX_MODE_CEE); + ice_cee_to_dcb_cfg(&cee_cfg, pi); } else if (pi->hw->adminq.sq_last_status == ICE_AQ_RC_ENOENT) { /* CEE mode not enabled try querying IEEE data */ dcbx_cfg = &pi->qos_cfg.local_dcbx_cfg; diff --git a/sys/dev/ice/ice_dcb.h b/sys/dev/ice/ice_dcb.h index 88c49c89fbd2..85d6b399cf11 100644 --- a/sys/dev/ice/ice_dcb.h +++ b/sys/dev/ice/ice_dcb.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2020, Intel Corporation +/* Copyright (c) 2021, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_devids.h b/sys/dev/ice/ice_devids.h index a110133823df..8611fc170816 100644 --- a/sys/dev/ice/ice_devids.h +++ b/sys/dev/ice/ice_devids.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2020, Intel Corporation +/* Copyright (c) 2021, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_drv_info.h b/sys/dev/ice/ice_drv_info.h index 9ed3e3e2fb0e..340d53e4a671 100644 --- a/sys/dev/ice/ice_drv_info.h +++ b/sys/dev/ice/ice_drv_info.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2020, Intel Corporation +/* Copyright (c) 2021, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -63,16 +63,16 @@ * @var ice_rc_version * @brief driver release candidate version number */ -const char ice_driver_version[] = "0.26.16-k"; +const char ice_driver_version[] = "0.28.1-k"; const uint8_t ice_major_version = 0; -const uint8_t ice_minor_version = 26; -const uint8_t ice_patch_version = 16; +const uint8_t ice_minor_version = 28; +const uint8_t ice_patch_version = 1; const uint8_t ice_rc_version = 0; #define PVIDV(vendor, devid, name) \ - PVID(vendor, devid, name " - 0.26.16-k") + PVID(vendor, devid, name " - 0.28.1-k") #define PVIDV_OEM(vendor, devid, svid, sdevid, revid, name) \ - PVID_OEM(vendor, devid, svid, sdevid, revid, name " - 0.26.16-k") + PVID_OEM(vendor, devid, svid, sdevid, revid, name " - 0.28.1-k") /** * @var ice_vendor_info_array @@ -113,20 +113,11 @@ static pci_vendor_info_t ice_vendor_info_array[] = { PVIDV_OEM(ICE_INTEL_VENDOR_ID, ICE_DEV_ID_E810C_QSFP, ICE_INTEL_VENDOR_ID, 0x0008, 0, "Intel(R) Ethernet Network Adapter E810-C-Q2 for OCP3.0"), + PVIDV_OEM(ICE_INTEL_VENDOR_ID, ICE_DEV_ID_E810C_QSFP, + ICE_INTEL_VENDOR_ID, 0x000D, 0, + "Intel(R) Ethernet Network Adapter E810-L-Q2 for OCP3.0"), PVIDV(ICE_INTEL_VENDOR_ID, ICE_DEV_ID_E810C_QSFP, "Intel(R) Ethernet Controller E810-C for QSFP"), - PVIDV_OEM(ICE_INTEL_VENDOR_ID, ICE_DEV_ID_E810C_SFP, - ICE_INTEL_VENDOR_ID, 0x0001, 0, - "Intel(R) Ethernet Network Adapter E810-L-1"), - PVIDV_OEM(ICE_INTEL_VENDOR_ID, ICE_DEV_ID_E810C_SFP, - ICE_INTEL_VENDOR_ID, 0x0002, 0, - "Intel(R) Ethernet Network Adapter E810-L-2"), - PVIDV_OEM(ICE_INTEL_VENDOR_ID, ICE_DEV_ID_E810C_SFP, - ICE_INTEL_VENDOR_ID, 0x0003, 0, - "Intel(R) Ethernet Network Adapter E810-L-1"), - PVIDV_OEM(ICE_INTEL_VENDOR_ID, ICE_DEV_ID_E810C_SFP, - ICE_INTEL_VENDOR_ID, 0x0004, 0, - "Intel(R) Ethernet Network Adapter E810-L-2"), PVIDV_OEM(ICE_INTEL_VENDOR_ID, ICE_DEV_ID_E810C_SFP, ICE_INTEL_VENDOR_ID, 0x0005, 0, "Intel(R) Ethernet Network Adapter E810-XXV-4"), diff --git a/sys/dev/ice/ice_features.h b/sys/dev/ice/ice_features.h index f5ea542d8626..dcb096509f73 100644 --- a/sys/dev/ice/ice_features.h +++ b/sys/dev/ice/ice_features.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2020, Intel Corporation +/* Copyright (c) 2021, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/dev/ice/ice_flex_pipe.c b/sys/dev/ice/ice_flex_pipe.c index 6a02239eca5c..e8e4403a23fe 100644 --- a/sys/dev/ice/ice_flex_pipe.c +++ b/sys/dev/ice/ice_flex_pipe.c @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause */ -/* Copyright (c) 2020, Intel Corporation +/* Copyright (c) 2021, Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -1057,6 +1057,13 @@ ice_dwnld_cfg_bufs(struct ice_hw *hw, struct ice_buf *bufs, u32 count) break; } + if (!status) { + status = ice_set_vlan_mode(hw); + if (status) + ice_debug(hw, ICE_DBG_PKG, "Failed to set VLAN mode: err %d\n", + status); + } + ice_release_global_cfg_lock(hw); return status; @@ -1126,34 +1133,40 @@ ice_download_pkg(struct ice_hw *hw, struct ice_seg *ice_seg) static enum ice_status ice_init_pkg_info(struct ice_hw *hw, struct ice_pkg_hdr *pkg_hdr) { - struct ice_global_metadata_seg *meta_seg; struct ice_generic_seg_hdr *seg_hdr; ice_debug(hw, ICE_DBG_TRACE, "%s\n", __func__); if (!pkg_hdr) return ICE_ERR_PARAM; - meta_seg = (struct ice_global_metadata_seg *) - ice_find_seg_in_pkg(hw, SEGMENT_TYPE_METADATA, pkg_hdr); - if (meta_seg) { - hw->pkg_ver = meta_seg->pkg_ver; - ice_memcpy(hw->pkg_name, meta_seg->pkg_name, - sizeof(hw->pkg_name), ICE_NONDMA_TO_NONDMA); + seg_hdr = (struct ice_generic_seg_hdr *) + ice_find_seg_in_pkg(hw, SEGMENT_TYPE_ICE, pkg_hdr); + if (seg_hdr) { + struct ice_meta_sect *meta; + struct ice_pkg_enum state; + + ice_memset(&state, 0, sizeof(state), ICE_NONDMA_MEM); + + /* Get package information from the Metadata Section */ + meta = (struct ice_meta_sect *) + ice_pkg_enum_section((struct ice_seg *)seg_hdr, &state, + ICE_SID_METADATA); + if (!meta) { + ice_debug(hw, ICE_DBG_INIT, "Did not find ice metadata section in package\n"); + return ICE_ERR_CFG; + } + + hw->pkg_ver = meta->ver; + ice_memcpy(hw->pkg_name, meta->name, sizeof(meta->name), + ICE_NONDMA_TO_NONDMA); ice_debug(hw, ICE_DBG_PKG, "Pkg: %d.%d.%d.%d, %s\n", - meta_seg->pkg_ver.major, meta_seg->pkg_ver.minor, - meta_seg->pkg_ver.update, meta_seg->pkg_ver.draft, - meta_seg->pkg_name); - } else { - ice_debug(hw, ICE_DBG_INIT, "Did not find metadata segment in driver package\n"); - return ICE_ERR_CFG; - } + meta->ver.major, meta->ver.minor, meta->ver.update, + meta->ver.draft, meta->name); - seg_hdr = ice_find_seg_in_pkg(hw, SEGMENT_TYPE_ICE, pkg_hdr); - if (seg_hdr) { - hw->ice_pkg_ver = seg_hdr->seg_format_ver; - ice_memcpy(hw->ice_pkg_name, seg_hdr->seg_id, - sizeof(hw->ice_pkg_name), ICE_NONDMA_TO_NONDMA); + hw->ice_seg_fmt_ver = seg_hdr->seg_format_ver; + ice_memcpy(hw->ice_seg_id, seg_hdr->seg_id, + sizeof(hw->ice_seg_id), ICE_NONDMA_TO_NONDMA); ice_debug(hw, ICE_DBG_PKG, "Ice Seg: %d.%d.%d.%d, %s\n", *** 4742 LINES SKIPPED *** From owner-dev-commits-src-main@freebsd.org Sat Mar 6 02:01:29 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E5A825705EC; Sat, 6 Mar 2021 02:01:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dsns567wwz4ZSX; Sat, 6 Mar 2021 02:01:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C63E21B3A0; Sat, 6 Mar 2021 02:01:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 12621T15020364; Sat, 6 Mar 2021 02:01:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 12621TX9020363; Sat, 6 Mar 2021 02:01:29 GMT (envelope-from git) Date: Sat, 6 Mar 2021 02:01:29 GMT Message-Id: <202103060201.12621TX9020363@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Nathan Whitehorn Subject: git: e77cf2a4ab32 - main - Restore /boot/efi to mtree. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: nwhitehorn X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e77cf2a4ab32a381df3c06d25b8b4f650047c3f2 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2021 02:01:30 -0000 The branch main has been updated by nwhitehorn: URL: https://cgit.FreeBSD.org/src/commit/?id=e77cf2a4ab32a381df3c06d25b8b4f650047c3f2 commit e77cf2a4ab32a381df3c06d25b8b4f650047c3f2 Author: Nathan Whitehorn AuthorDate: 2021-03-06 01:57:50 +0000 Commit: Nathan Whitehorn CommitDate: 2021-03-06 02:01:11 +0000 Restore /boot/efi to mtree. Instead of whether /boot/efi exists, which it now always does, including on systems that don't and can't use EFI, use whether /boot/efi is present in fstab to signal to the installer that it is a valid ESP and should be configured. This has essentially the same semantics, but allows /boot/efi to be created unconditionally. Reviewed by: bdragon, imp Tested by: bdragon (ppc64) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D29068 --- etc/mtree/BSD.root.dist | 2 ++ usr.sbin/bsdinstall/scripts/bootconfig | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/etc/mtree/BSD.root.dist b/etc/mtree/BSD.root.dist index 1dc9e179b0fc..f734f7891429 100644 --- a/etc/mtree/BSD.root.dist +++ b/etc/mtree/BSD.root.dist @@ -18,6 +18,8 @@ rockchip tags=package=runtime .. .. + efi + .. firmware .. loader.conf.d tags=package=bootloader diff --git a/usr.sbin/bsdinstall/scripts/bootconfig b/usr.sbin/bsdinstall/scripts/bootconfig index 088d88ca9b2f..a592142d87a2 100755 --- a/usr.sbin/bsdinstall/scripts/bootconfig +++ b/usr.sbin/bsdinstall/scripts/bootconfig @@ -47,7 +47,7 @@ if [ `uname -m` == powerpc ]; then fi # Update the ESP (EFI System Partition) with the new bootloader if we have an ESP -if [ -d "$BSDINSTALL_CHROOT/boot/efi" ]; then +if [ -n "$(awk '{if ($2=="/boot/efi") printf("%s\n",$1);}' $PATH_FSTAB)" ]; then case $(uname -m) in arm64) ARCHBOOTNAME=aa64 ;; amd64) ARCHBOOTNAME=x64 ;; From owner-dev-commits-src-main@freebsd.org Sat Mar 6 03:46:02 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BFD0E57390B; Sat, 6 Mar 2021 03:46:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dsr9k4v00z4hXB; Sat, 6 Mar 2021 03:46:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9A62D1C84D; Sat, 6 Mar 2021 03:46:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1263k2Rh053564; Sat, 6 Mar 2021 03:46:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1263k2uU053563; Sat, 6 Mar 2021 03:46:02 GMT (envelope-from git) Date: Sat, 6 Mar 2021 03:46:02 GMT Message-Id: <202103060346.1263k2uU053563@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: 6ed39db2573b - main - Do not exit ctl_be_block_worker() prematurely. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6ed39db2573bb808ac2c206cd6c831f0be86219c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2021 03:46:02 -0000 The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=6ed39db2573bb808ac2c206cd6c831f0be86219c commit 6ed39db2573bb808ac2c206cd6c831f0be86219c Author: Alexander Motin AuthorDate: 2021-03-06 03:39:52 +0000 Commit: Alexander Motin CommitDate: 2021-03-06 03:45:47 +0000 Do not exit ctl_be_block_worker() prematurely. Return while there are any I/Os in a queue may result in them stuck indefinitely, since there is only one taskqueue task for all of them. I think I've reproduced this by switching ha_role to secondary under heavy load. MFC after: 3 days --- sys/cam/ctl/ctl_backend_block.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/cam/ctl/ctl_backend_block.c b/sys/cam/ctl/ctl_backend_block.c index 3663bff10f2a..9f96c157d5ae 100644 --- a/sys/cam/ctl/ctl_backend_block.c +++ b/sys/cam/ctl/ctl_backend_block.c @@ -1672,7 +1672,7 @@ ctl_be_block_worker(void *context, int pending) if (cbe_lun->flags & CTL_LUN_FLAG_NO_MEDIA) { ctl_set_busy(&io->scsiio); ctl_complete_beio(beio); - return; + continue; } be_lun->dispatch(be_lun, beio); continue; @@ -1685,7 +1685,7 @@ ctl_be_block_worker(void *context, int pending) if (cbe_lun->flags & CTL_LUN_FLAG_NO_MEDIA) { ctl_set_busy(&io->scsiio); ctl_config_write_done(io); - return; + continue; } ctl_be_block_cw_dispatch(be_lun, io); continue; @@ -1698,7 +1698,7 @@ ctl_be_block_worker(void *context, int pending) if (cbe_lun->flags & CTL_LUN_FLAG_NO_MEDIA) { ctl_set_busy(&io->scsiio); ctl_config_read_done(io); - return; + continue; } ctl_be_block_cr_dispatch(be_lun, io); continue; @@ -1711,7 +1711,7 @@ ctl_be_block_worker(void *context, int pending) if (cbe_lun->flags & CTL_LUN_FLAG_NO_MEDIA) { ctl_set_busy(&io->scsiio); ctl_data_submit_done(io); - return; + continue; } ctl_be_block_dispatch(be_lun, io); continue; From owner-dev-commits-src-main@freebsd.org Sat Mar 6 05:25:19 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5C83257603D; Sat, 6 Mar 2021 05:25:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DstNH26Sfz4mxD; Sat, 6 Mar 2021 05:25:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3B5FD1E11E; Sat, 6 Mar 2021 05:25:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1265PJdx085190; Sat, 6 Mar 2021 05:25:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1265PJ9I085189; Sat, 6 Mar 2021 05:25:19 GMT (envelope-from git) Date: Sat, 6 Mar 2021 05:25:19 GMT Message-Id: <202103060525.1265PJ9I085189@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: ead7697f04c0 - main - Restore AT_RESOLVE_BENEATH support for funlinkat(2)/unlinkat(2). MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ead7697f04c036853535a4281cec9aa09ef21270 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2021 05:25:19 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=ead7697f04c036853535a4281cec9aa09ef21270 commit ead7697f04c036853535a4281cec9aa09ef21270 Author: Konstantin Belousov AuthorDate: 2021-03-05 02:07:57 +0000 Commit: Konstantin Belousov CommitDate: 2021-03-06 05:24:18 +0000 Restore AT_RESOLVE_BENEATH support for funlinkat(2)/unlinkat(2). MFC after: 1 week Sponsored by: The FreeBSD Foundation --- sys/kern/vfs_syscalls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index fec9566cb415..3db34c3689de 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -1809,7 +1809,7 @@ kern_funlinkat_ex(struct thread *td, int dfd, const char *path, int fd, int flag, enum uio_seg pathseg, ino_t oldinum) { - if ((flag & ~AT_REMOVEDIR) != 0) + if ((flag & ~(AT_REMOVEDIR | AT_RESOLVE_BENEATH)) != 0) return (EINVAL); if ((flag & AT_REMOVEDIR) != 0) From owner-dev-commits-src-main@freebsd.org Sat Mar 6 05:25:20 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6E4185761C1; Sat, 6 Mar 2021 05:25:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DstNJ2hd1z4mxF; Sat, 6 Mar 2021 05:25:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4FBB31DF98; Sat, 6 Mar 2021 05:25:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1265PKmj085210; Sat, 6 Mar 2021 05:25:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1265PKDK085209; Sat, 6 Mar 2021 05:25:20 GMT (envelope-from git) Date: Sat, 6 Mar 2021 05:25:20 GMT Message-Id: <202103060525.1265PKDK085209@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: f5e930b369c6 - main - atomic(9): note that atomic_interrupt_fence first appeared in 13.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f5e930b369c6ea7a3f81d8e5b52cc395bb7b4187 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2021 05:25:20 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=f5e930b369c6ea7a3f81d8e5b52cc395bb7b4187 commit f5e930b369c6ea7a3f81d8e5b52cc395bb7b4187 Author: Konstantin Belousov AuthorDate: 2021-03-06 05:21:40 +0000 Commit: Konstantin Belousov CommitDate: 2021-03-06 05:24:18 +0000 atomic(9): note that atomic_interrupt_fence first appeared in 13.0 MFC after: 3 days Sponsored by: The FreeBSD Foundation --- share/man/man9/atomic.9 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/share/man/man9/atomic.9 b/share/man/man9/atomic.9 index 397a8fcd6b18..ebc6ed791f37 100644 --- a/share/man/man9/atomic.9 +++ b/share/man/man9/atomic.9 @@ -22,7 +22,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 24, 2021 +.Dd March 6, 2021 .Dt ATOMIC 9 .Os .Sh NAME @@ -612,3 +612,8 @@ and .Fn atomic_store were added in .Fx 12.0 . +.Pp +The +.Fn atomic_interrupt_fence +operation was added in +.Fx 13.0 . From owner-dev-commits-src-main@freebsd.org Sat Mar 6 06:05:33 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3E435577316 for ; Sat, 6 Mar 2021 06:05:33 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic313-10.consmr.mail.ne1.yahoo.com (sonic313-10.consmr.mail.ne1.yahoo.com [66.163.185.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4DsvGg5p03z4qT7 for ; Sat, 6 Mar 2021 06:05:31 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1615010730; bh=f4tmxAmCWdn00bSrgUgRM3PDKFP9ooAxgp4wIhmkejw=; h=X-Sonic-MF:From:Subject:Date:To:From:Subject; b=l/3/70D93KOYaoMaGCgqrzlbKpESvJlFd2vZm5UVqAs8HvMRyu6cvPuZJnXK4YOyB3PUutFq6erlMVrRy8KHcbrLk1f2n1lzdFrukooImpYdVC95ALAWCqYUSUWnyRFHwtfS/3Kz2s8KkmzHb5EmN/zhF9GOQiav7R+IK2Ipq7eu4h2u7NUdNEWzPcdHKlnm03vKNdwVY4U7K2PkCI9wDleg8nfoT8ngCZL717A/k71ehr/qUgamnCenSyvb0HltXMrCsO0Nnh6WU49o49utBX9k6L7eijYINl/egNN9Sw0MGJenDitvedVCs40KvaBZQmsiWXbUjorMSDJXr3F/+Q== X-YMail-OSG: XWwu2PIVM1nSQpz3glES8poW9XeKBYdXDgLZVoisWQoLKBE9W14iF0jI30zZ7H3 oP_ZJVJS.caJ9XP1CdtklR9YIcHDbMlWvn9t871SIbxQ43hY2uk8tv3d7zOsxHJaW43u4uluT663 R8dLWvYPzP.aFWTZ9LsIkeWIbFKptZ2NfeokNFhV_kvvsvV85Lew4zgvJ4DwuwU6pYpcAshno1Tn LfAhzZzaVpQvL9ig7lSjiDB6W07HzwY4vXTFRRfeJw3Cn8q.Br4jJdde5iSWwrYiQ2RFc2z4JAEo uNs1tg3yqkgVXJHvD04t0A7G8F5og7ZXImKlDD03H04QfEJi4__FZ.4q8MPfruBOpf51kVE.iDvq kvSEexwEVhAUGn.PcseUghAJWE88Iy0z4E9FWLs5RHCB.k_kLMnj9XghcweAAk8RZhXE2Tp.EpTQ gJhf3TBdJ25MDc6MyqNpu.uIoo8kVSS7sT7a0_R74SRydAm4WyRS7Fa3AJzXO_5eqRGXUipqtaRB oLLG051vnCKkNAyNhOh2NIfn1zy7TRpTS.tZv5VSN.RAGne2DCgxi41G3Zl1FJVrrgDN2GML3AO7 p1iQ_6LEuoRDwRCod_lopO0agCBEzlF8Y7GZzOau0Ym_Qj6tQb2UjC5HHwhg2V6oErxMiLhRLSGj Pmvl5PHCTcF.kOUd4Qi8YPazZ3oJthZq9yxXY5cv6vkZftWFDUSw2W7eBRoHNa12GkxSgjB9j3CT 3e_EyE85GiJ6.ABJLygDVcL_HmyjSqJ0xy6godkSfqPFgEj_Z_oEq6B6rZuPvtl6Xls0_O0OVmS4 XWGiw3wc7hiWQ6Cgs4tw8zad.ckN5CcKAac20cwgiyu6TDgGpHKw47BERSGfRXTOnkxYDAtUliex BpiMSJEdkk8X4zpqYMCB.GrKNl2haZ1fDpIM_eDaeBPuE4AiT1XFUGE8tE1_uCeaYsrFOUOK7GSB 8zjPYRglH4s9AqlHH_U1nSncP4dccQ5tSn_dhaOra2mztAmz39pGVE5kAXWseMiB12x7uFS._nBV kq.e50dG3lTordow9mvOQCrvuDGffguRycCZPhb6th_h5DKk5K0fjJhRFYbHznetY44BvOShaDKP sTuhNK98rHLsZZKdVSM7hLlIrnzIBo2JAJe_xCqvbu0wKEegcxy7Qc5GdfpRepmAQ1BUgYEsU7C_ NAr1kMTP4VoR6f3n6PbnzIGbpUJq9bsN2sVwkYdSnJCGxvQT4oHVRxH85lxUOgYL6P4bAKCdAi3i ZZqMLFfhZ7xAjJrAypPIDDaPu0SuYmSPsU9WM7UPuCugNdfs1HlRQD8W986T2bw85mW8M5dE7JLS ab6pwzGdqhJ0PzWDGy7QIeutPeIi85fhUuThmQBKb0qTPAZn2RUnpT3dB7WSEBwXDd4eK0e1yjg4 I_oTPrxdIC689TytUd2sL98nk0h1imiSPmqYQHsUn_hstYySZPLf6yGr5AGoMa6FVtbP8yf35AdE 4iMBjFMUF05l70wht92WiHfzQ.1QURUlrr1uadF_jAN9dFFttdugw3aVpsTJtZVNJrBwEqhPZy4d .CWdelcUc_QlOWVCVFfDmhYPULKSz1GeMeAqfzwNX.VGYi2ch6czYr_GUzRWyMfkLVN9wwVWkNEL McQn.21UCKyKVkcpxqF8OZ0N7ZWZaGyBraOjUsyH0cdo0YZzbQMX45JeNJz6CZgsh48PGF2slzcd A8ANxQDoVl7UzUSGvS2mHtqS5icoYtbKMwdKwdNBnSPRs2E5pCcuslnRkkwz4sFAe2CV4SyWwnJ5 2BnYZL86K0KDjiPOSr6__p4t6jqKL5.jNrb5JJeMsvbd.YADhn.leCiYACCtsI8AF8ZwtAD42yDy nfBnw8XdobMBtrCZJhChkn08aeRC21AqUY.BchdbaoaqN.IuQVxz9VwebOhgC78vnYq_xbMddMZm jZDXIMhnJUZkRHhy6NaBs1oRne17nsLGkIuJv9P.T6w.O6vP2uf6NfemBdvbwHxtDZvCLNuii22J JpyxlGx_MTuw9PvQ9MohJGVYCJmIHZ9nvThy1t1Wyh_z6wHa5nDUyMhRFIDjUjqRlbvRMwrGzvw2 aGRcMGPAoX5Gfc78ezW.UdVPEo8MWpSbot.FmrUv73LC8NXxKQ79prh2l2mItiC2YDzD6qNeVNAo Z05GcrJrqPj3TPD_cbhVFDTrHT3fHCs33JH.lE_cA0K0bBbARjaAuulIWxg05mRt96Fh3.Zl61l0 64ffa9V2x8f4IsFANRKDDbK01oJbIlvvbGxTfc8MhPR_M5loGrU5TAWCcskIQyyk4iL7ftmOyMZc _Eeobf.s3zXLMBH8_EA0DZiXuHrrLaPv54e2db9_IWUUdplRfM22Ln5lJOgIlmqwJTFje12mV4jg 67B6FA4k8w.bA01.PaiCFSJSxG.p_KXJItt0x_YNB3BrGSkktkrxbQoSVGMD7jkGYO6EgiU0EVke sKO2w8OXxj_Pj4IMJMIOd90z71Z7Z2FCL0EWlaR_EmmSQzGU- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic313.consmr.mail.ne1.yahoo.com with HTTP; Sat, 6 Mar 2021 06:05:30 +0000 Received: by kubenode504.mail-prod1.omega.gq1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 47a3d84581267cfeb045a5bc43426d52; Sat, 06 Mar 2021 06:05:25 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) Subject: Re: git: e77cf2a4ab32 - main - Restore /boot/efi to mtree. Message-Id: <656E3D05-11B6-437B-B171-4894811A70CB@yahoo.com> Date: Fri, 5 Mar 2021 22:05:24 -0800 To: "nwhitehorn@freebsd.org" , dev-commits-src-main@freebsd.org X-Mailer: Apple Mail (2.3654.60.0.2.21) References: <656E3D05-11B6-437B-B171-4894811A70CB.ref@yahoo.com> X-Rspamd-Queue-Id: 4DsvGg5p03z4qT7 X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.50 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; DKIM_TRACE(0.00)[yahoo.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[66.163.185.33:from]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36646, ipnet:66.163.184.0/21, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; SPAMHAUS_ZRD(0.00)[66.163.185.33:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[66.163.185.33:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[66.163.185.33:from]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[dev-commits-src-main] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2021 06:05:33 -0000 Nathan Whitehorn nwhitehorn at FreeBSD.org wrote on Sat Mar 6 02:01:30 UTC 2021 : > Restore /boot/efi to mtree. > =20 > Instead of whether /boot/efi exists, which it now always does, = including > on systems that don't and can't use EFI, use whether /boot/efi is > present in fstab to signal to the installer that it is a valid ESP = and > should be configured. This has essentially the same semantics, but = allows > /boot/efi to be created unconditionally. >=20 Sounds like the documentation about /etc/fstab content should indicate the special/reserved /boot/efi usage context, be that comments in initial default files or whatever. I wonder if anyone puts / at the end in an fstab: /boot/efi/=20 =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-dev-commits-src-main@freebsd.org Sat Mar 6 06:50:49 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1CF0F559887; Sat, 6 Mar 2021 06:50:49 +0000 (UTC) (envelope-from gbe@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DswGx0Q6Pz4vnc; Sat, 6 Mar 2021 06:50:49 +0000 (UTC) (envelope-from gbe@freebsd.org) Received: from localhost (p200300d5d740b9c950bd45a017f3c4cd.dip0.t-ipconnect.de [IPv6:2003:d5:d740:b9c9:50bd:45a0:17f3:c4cd]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: gbe) by smtp.freebsd.org (Postfix) with ESMTPSA id 7E6ED20EDC; Sat, 6 Mar 2021 06:50:48 +0000 (UTC) (envelope-from gbe@freebsd.org) Date: Sat, 6 Mar 2021 07:50:47 +0100 From: Gordon Bergling To: Mark Johnston Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 89b650872bba - main - ktls: Hide initialization message behind bootverbose Message-ID: References: <202103051815.125IFDNK001016@gitrepo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Url: X-Operating-System: FreeBSD 12.2-STABLE amd64 X-Host-Uptime: 7:39AM up 7 days, 5:59, 4 users, load averages: 0.22, 0.24, 0.23 X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2021 06:50:49 -0000 On Fri, Mar 05, 2021 at 01:36:36PM -0500, Mark Johnston wrote: > On Fri, Mar 05, 2021 at 07:23:56PM +0100, Gordon Bergling wrote: > > Hi Mark, > > > > is this change not a little bit to aggressive in terms of dmesg cleanup? > > > > There are a lot messages about what subsystem is initialized with > > how many threads, like for example TCP HTPS and TCP BBR. > > I would argue that that is the exception rather than the norm, and they > should be cleaned up too. I just didn't notice since they are not > compiled into the kernel. > > We don't log messages about bufspace threads, taskqueue threads, crypto > worker threads, NFSD threads, netgraph threads, pagedaemon threads, etc. > This is really an implementation detail and I don't see why it's crucial > information that needs to be printed upon each boot. Especially in this > case, where KTLS needs to be explicitly be enabled before those threads > will ever do anything. > > > Hiding this information could be suboptimal for some users. > > There is a kern.ipc.tls.stats.threads sysctl which exposes the same > number, so I'm not sure it's really hidden. But why would a user need > this information? As a developer I am not a regular user, because I scan the dmesg output for LORs and such things. Your right at this point, that a normal user wouldn't spend time watching out on how many threads a subsystem uses. --Gordon > > On Fri, Mar 05, 2021 at 06:15:13PM +0000, Mark Johnston wrote: > > > The branch main has been updated by markj: > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=89b650872bba2e4bfbc94a200946b461ef69ae22 > > > > > > commit 89b650872bba2e4bfbc94a200946b461ef69ae22 > > > Author: Mark Johnston > > > AuthorDate: 2021-03-05 18:11:02 +0000 > > > Commit: Mark Johnston > > > CommitDate: 2021-03-05 18:11:02 +0000 > > > > > > ktls: Hide initialization message behind bootverbose > > > > > > We don't typically print anything when a subsystem initializes itself, > > > and KTLS is currently disabled by default anyway. > > > > > > Reviewed by: jhb > > > MFC after: 1 week > > > Sponsored by: The FreeBSD Foundation > > > Differential Revision: https://reviews.freebsd.org/D29097 > > > --- > > > sys/kern/uipc_ktls.c | 3 ++- > > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > > > diff --git a/sys/kern/uipc_ktls.c b/sys/kern/uipc_ktls.c > > > index 5125061e0879..1fd1eca39b59 100644 > > > --- a/sys/kern/uipc_ktls.c > > > +++ b/sys/kern/uipc_ktls.c > > > @@ -495,7 +495,8 @@ ktls_init(void *dummy __unused) > > > } > > > } > > > > > > - printf("KTLS: Initialized %d threads\n", ktls_number_threads); > > > + if (bootverbose) > > > + printf("KTLS: Initialized %d threads\n", ktls_number_threads); > > > } > > > SYSINIT(ktls, SI_SUB_SMP + 1, SI_ORDER_ANY, ktls_init, NULL); From owner-dev-commits-src-main@freebsd.org Sat Mar 6 08:59:41 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2984F55D7FD; Sat, 6 Mar 2021 08:59:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dsz7d0hmZz3KXv; Sat, 6 Mar 2021 08:59:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 069B7205FD; Sat, 6 Mar 2021 08:59:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1268xedE063569; Sat, 6 Mar 2021 08:59:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1268xeb1063568; Sat, 6 Mar 2021 08:59:40 GMT (envelope-from git) Date: Sat, 6 Mar 2021 08:59:40 GMT Message-Id: <202103060859.1268xeb1063568@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Toomas Soome Subject: git: 6a3095aa6d03 - main - loader_4th: brand image is aligned right MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tsoome X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6a3095aa6d0350dda89bac66d26f22a01e2257c4 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2021 08:59:41 -0000 The branch main has been updated by tsoome: URL: https://cgit.FreeBSD.org/src/commit/?id=6a3095aa6d0350dda89bac66d26f22a01e2257c4 commit 6a3095aa6d0350dda89bac66d26f22a01e2257c4 Author: Toomas Soome AuthorDate: 2021-03-06 08:54:08 +0000 Commit: Toomas Soome CommitDate: 2021-03-06 08:59:35 +0000 loader_4th: brand image is aligned right With screen border removed, I forgot to update forth brand image coordinates to avoid image alignment. --- stand/forth/brand-fbsd.4th | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stand/forth/brand-fbsd.4th b/stand/forth/brand-fbsd.4th index b8e43e601c96..84245ef232b6 100644 --- a/stand/forth/brand-fbsd.4th +++ b/stand/forth/brand-fbsd.4th @@ -38,7 +38,7 @@ s" term-putimage" sfind if \ note, we use 0, 0 for image upper left as origin, \ and 0, 7 for lower right to preserve aspect ratio - >r 0 0 0 0 7 + >r 0 1 1 0 7 s" /boot/images/freebsd-brand-rev.png" r> execute if 2drop exit then else From owner-dev-commits-src-main@freebsd.org Sat Mar 6 09:01:27 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 03EFD55DF2F for ; Sat, 6 Mar 2021 09:01:27 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic317-34.consmr.mail.ne1.yahoo.com (sonic317-34.consmr.mail.ne1.yahoo.com [66.163.184.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dsz9d6KCCz3Ktg for ; Sat, 6 Mar 2021 09:01:25 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1615021284; bh=N4DI1wrWu9DIGG+aLVBvcPpXtogs4NZG61WIvmEyQn7=; h=X-Sonic-MF:From:Subject:Date:To:From:Subject; b=GnB05+iMGQ+fT4bAdFDzZy701M6uCSjJ91RakVpPY5yD1+XoT7QyMHzTFswzCjgPSpPdr1nMHt6TP0zZlYSminHSB0x5L+OY2wAHIMVXOdn6qwZTalMMeFjaOqOIhFwn4LuqeMaEC0DxEArRJZt4D8UKS35JqUSn6xgcqyz05IEHrRQ9KNXB/vWF2lBhSdgjrD3jEY/cHTSyChSkC6DvNXiBd/nIIvylUtbOYoBLqY0Sj8E2+q4MM6VqA1opriUSAL2la7fIO2c5uektvc7q9Be7y6+HRXznjs5xxVHdgN2YDhVuTrApKSO7HsZXzRHNukBdMrXYh+QiP1aEwv5vqA== X-YMail-OSG: uaxIluQVM1msCH0ABdPqdf_CqqmodC84_tQrX1i.HKJJCgQUQOqzTdoQVALdYvC JCXYyV09UUbTpyDiDFFBZq0O7Wmtn7InnkrSEhq9q3okQ4xBaiswEL8CjSY9V9oh8ZaNEl_9c.2l kFJ1A7lAJtPTqvkvi6d2AQUynM6U.w2J2WzyA6Fm2WQFuuxeYVE3xXBUKtECWYmF6jZ_nRvClCeI jgYCx9DyuUE.pBD1UJFJm.P38rWBdXF9GG.gGnvN2U9sF9da0RM5d4ieG1oVAJOJgXoc9kAOTFwq ljxv_3IC0H1d2fOp2cyhd3vOKKb9Mr3K6hM7au9YeQykbrBcHPlCER2fVhMkl8oYUz5fkT0ulehc xkATgyvfQbfynVu8omgBTxtSYp12fMg2tGYBCRepiIV_3cCqTg66U.3JLjmf3Uh7ER1evsqyClEU t4N6.yZPhHeOTOuBNCWD3j3z1eN.3VAkSj9kguLSy5VrSDD1viVVSeCiqJU6Pku81tARofrrhLK6 tFeRywIV.MyddJAAYMvBu6YHClkRH585ECdC15robWsnitqjs5NdHqtxBXoYPuq.kTSjvfYVa_ot fex25pfLScCiu2SH42QdmMQt1ceFwl8fzBkhlTNrrf1x7BmzOpK6NFGmFEOh0f4_hVaBWHLUhV6z xHDd4S85wP7H9o9Yzexzb3DHyf7jDgX1yWWRC5i.ZxUWRGukJ3TPEtTJrn53ltIK7QeK9i3Bhbd4 nWKzkUfVZJdTJOJuKpv7PhudionNoM0dc1sl7GAXI.0YtVFi4Mlp9w3n7Y8_Ly8w9xfThRjtLpv6 t3oUhqa.G21_2ywPjR5EKiblH6274WoEeMrRvUrLU8BFTEPFUjyqFmcZnK0vSt2cjEgQDL4ZFTnx 023HJC1z.LkWoyfHvijqiGCaCkR84p_Pr95oWS5qQTOXln1e0FwQpZIbs09cZjrxoCAOfBOIEI1L 6OID9gPEU2oF4kG_V_MlSOIUoBo6Ck0AspGcV2vTNnbNhBZf3RKzL0nRYsVvWGDaPPPUzYWOOy8D airO06X6w72b.qGH9.fMWxe2TgMyHfIjYdBZu3zu6NAhhBulpS5EeiWXP8L.8S7k9Jsw8687cNR9 uVjv6l.haQAjenwJ69gOH7Q6u5g60DteW5syJtrA3DOisjFclNWODgfWp0HxOnQTjzqlNfDe7Ud. FYNJEpFvSnAMza0E6REGIOF52yjrkPrf0k_yw32LLJ.EAuO1ll3i6Y7DYF7G.bIKyVA4PJ4aabuS WytvPe2XskvLb5_0cgIdjtn6wcbP.9pJ.k_zSnJ8sPQsJqxwIQRYKhbqo5DQfDTQ3p3DEZhLlyBV d3JiG_LzvJywrh4sKGeox3VS4H7zZO0kBkdcQXrxjmsFVhDcfWu3_nafLyjGEwKJePzikYB1dNr9 QqiLpqN8m6uoSBOzXCTyDcpjU5yB0jGIrUFUDxFe.Y8h_gcug0b5KiOVkhLhGycLYk4Luw6N6SYU Q1QaYosUvo42POKjfY0iXM4RIvMEgtnBOPtJVRctnp6_f6XgMBrpKKmj0l7wnv6JAQjZmGFFX7uz vHbOQ1Tg7bBDU4XokfXaKJ95uKGkM3zI6zKjQcaUnKQJvt_sORI8KgI6HDotLKLvkmQzzXLD.xyB bI_IqOZ.sFRtZ93cZCLAZcmseIotCyKn87aWeztGIq19W__Xfakv6c9m2segsSO9Osk8k_UfBj73 IgeQPKn9dHBIGxVXds9QgHBisAOB84Q4JmmB4rarohr6zO_wJwFun78kZWRrX9Nc4JWdbmVJCbhS uj9RG3CoA6rNr9xNdw0xoWfx0rQ0IjHfGSvYYgVBV1uG4B2ZSttc_.o3gJaZC.l.XGMyNEKOuQ5U _cPvQ.cZwKiJq0_sXDH2bSYmTykxChqpRqh3AdkTOUpGMkCY_EMllF3elP07Ho_loCzq0tm7NB40 VWJoY_y7n3BJo1zBoUzO5Rf5wRtNZ.3UyfUp5U5lxkRnHUwmet5nq8ecyIcH5SlFCcdWe8g1kSU6 SNFZtsLqYbOiOU3UnKoFFa6NAQBs5mMoE_e_i6umGschAZVDK5dIEy9P7mUJ9e1vSrO_rgkhzyrg iTExBt4XD0GwFBlJcsVHYedIi5yh.5iaPvCXggX9j8m1JqEVLY.q3uUVlt8XluIdO69zprM5svdP yCdN1hQrgXScYpkEJiO3oT1F1PIveg3MHJpY4J3qBkFqCoVrDxucuNDBOWcB75xlk8klFWZW2YNf pECCKJ_MMsdUAnMyCx3NtBuhKifJjJNsdf6AEwYqUKT4_CnwKu5z0SPHR4ekkzif.0pQKXXysgUu DHfGNhNaWR9SJ58HFs6pTw3A_UQgV6zH1C_1QiRB.6PqlDEiJIAr0bHQ0SamQirPhJD1RRfaRUmj Txf.aM2cpMG4lQqIqjARvycHUl_7pc0KUCXsQfWIiDUswaIteyKpVbAdynkHEp4GxVFTILweiGGs 2xQ9yO4p4IgvCC_tXiBt7XtowtvgHNaCj3cL0Bmj6sBp9Szc- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic317.consmr.mail.ne1.yahoo.com with HTTP; Sat, 6 Mar 2021 09:01:24 +0000 Received: by kubenode536.mail-prod1.omega.gq1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 2cafca62b23cdd10422309f4f2ac2b89; Sat, 06 Mar 2021 09:01:20 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) Subject: Re: git: e77cf2a4ab32 - main - Restore /boot/efi to mtree. Date: Sat, 6 Mar 2021 01:01:18 -0800 References: <656E3D05-11B6-437B-B171-4894811A70CB@yahoo.com> To: "nwhitehorn@freebsd.org" , dev-commits-src-main@freebsd.org In-Reply-To: <656E3D05-11B6-437B-B171-4894811A70CB@yahoo.com> Message-Id: X-Mailer: Apple Mail (2.3654.60.0.2.21) X-Rspamd-Queue-Id: 4Dsz9d6KCCz3Ktg X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.50 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; DKIM_TRACE(0.00)[yahoo.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[66.163.184.45:from]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36646, ipnet:66.163.184.0/21, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; SPAMHAUS_ZRD(0.00)[66.163.184.45:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[66.163.184.45:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[66.163.184.45:from]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[dev-commits-src-main] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2021 09:01:27 -0000 On 2021-Mar-5, at 22:05, Mark Millard wrote: >=20 > Nathan Whitehorn nwhitehorn at FreeBSD.org wrote on > Sat Mar 6 02:01:30 UTC 2021 : >=20 >> Restore /boot/efi to mtree. >>=20 >> Instead of whether /boot/efi exists, which it now always does, = including >> on systems that don't and can't use EFI, use whether /boot/efi is >> present in fstab to signal to the installer that it is a valid ESP = and >> should be configured. This has essentially the same semantics, but = allows >> /boot/efi to be created unconditionally. >>=20 >=20 > Sounds like the documentation about /etc/fstab content > should indicate the special/reserved /boot/efi usage > context, be that comments in initial default files or > whatever. >=20 > I wonder if anyone puts / at the end in an fstab: /boot/efi/=20 >=20 I tried using a trailing / in /etc/fstab and it is one place were the notational variation is not equivalent: I had to remove it. =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-dev-commits-src-main@freebsd.org Sat Mar 6 09:07:07 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5687855DF6B; Sat, 6 Mar 2021 09:07:07 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DszJC10PFz3L6h; Sat, 6 Mar 2021 09:07:07 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.codepro.be", Issuer "R3" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id C235D21EB2; Sat, 6 Mar 2021 09:07:06 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id 443C14B318; Sat, 6 Mar 2021 10:07:04 +0100 (CET) From: "Kristof Provost" To: "Mark Johnston" Cc: "Ryan Moeller" , "Konstantin Belousov" , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: c4ba4aa54718 - main - libifconfig: Overhaul ifconfig_media_* interfaces Date: Sat, 06 Mar 2021 10:07:03 +0100 X-Mailer: MailMate (1.13.2r5673) Message-ID: In-Reply-To: References: <202103051123.125BNubR059014@gitrepo.freebsd.org> <20c6efb4-8b57-ae78-3808-b49b07ac284d@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2021 09:07:07 -0000 On 5 Mar 2021, at 20:44, Mark Johnston wrote: > On Fri, Mar 05, 2021 at 02:40:29PM -0500, Ryan Moeller wrote: >> >> On 3/5/21 1:19 PM, Konstantin Belousov wrote: >>> On Fri, Mar 05, 2021 at 11:23:56AM +0000, Ryan Moeller wrote: >>>> The branch main has been updated by freqlabs: >>>> >>>> URL: = >>>> https://cgit.FreeBSD.org/src/commit/?id=3Dc4ba4aa547184ab401204096cd= ad9def4ab37964 >>>> >>>> commit c4ba4aa547184ab401204096cdad9def4ab37964 >>>> Author: Ryan Moeller >>>> AuthorDate: 2021-03-02 10:29:17 +0000 >>>> Commit: Ryan Moeller >>>> CommitDate: 2021-03-05 09:15:55 +0000 >>>> >>>> libifconfig: Overhaul ifconfig_media_* interfaces >>>> >>>> Define an ifmedia_t type to use for ifmedia words. >>>> >>>> Add ifconfig_media_lookup_* functions to lookup ifmedia words = >>>> by name. >>>> >>>> Get media options as an array of option names rather than = >>>> formatting it >>>> as a comma-delimited list into a buffer. >>>> >>>> Sprinkle const on static the static description tables for = >>>> peace of >>>> mind. >>>> >>>> Don't need to zero memory allocated by calloc. >>>> >>>> Reviewed by: kp >>>> MFC after: 2 weeks >>>> Differential Revision: https://reviews.freebsd.org/D29029 >>>> --- >>>> lib/libifconfig/Makefile | 2 +- >>>> lib/libifconfig/Symbol.map | 9 +- >>>> lib/libifconfig/libifconfig.h | 69 +++++++- >>>> lib/libifconfig/libifconfig_media.c | 339 = >>>> ++++++++++++++++++++++++------------ >>>> share/examples/libifconfig/status.c | 27 ++- >>>> 5 files changed, 324 insertions(+), 122 deletions(-) >>>> >>>> diff --git a/lib/libifconfig/Makefile b/lib/libifconfig/Makefile >>>> index 73dad36c1dc5..c6f006018427 100644 >>>> --- a/lib/libifconfig/Makefile >>>> +++ b/lib/libifconfig/Makefile >>>> @@ -7,7 +7,7 @@ INTERNALLIB=3D true >>>> LIBADD=3D m >>>> >>>> SHLIBDIR?=3D /lib >>>> -SHLIB_MAJOR=3D 1 >>>> +SHLIB_MAJOR=3D 2 >>>> >>>> VERSION_DEF=3D ${LIBCSRCDIR}/Versions.def >>>> SYMBOL_MAPS=3D ${.CURDIR}/Symbol.map >>> libifconfig is marked as internal, but we provide symbol versioning = >>> for it, >>> and do it in the normal FreeBSD namespace. On one hand, our policy = >>> is to >>> not bump symvered libs and to provide binary compat shims as needed, = >>> on the >>> other, this is internal lib. >>> >>> What is the purpose of maintaining symbol versions for it? >> >> >> I have work in progress that changes libifconfig to a private lib. = >> I'm >> not sure why markj@ added the symbol map, but I've been forced to >> maintain it for my later changes to work. > > I added it because there was some discussion of making it a public > library, and adding a symbol map was a step towards that. If it is = > only > going to be a private library, then there's indeed no reason to = > maintain > it. Historically it=E2=80=99s been the aspiration (passive voice, because whi= le = these have been my hopes I=E2=80=99ve not done any of the work) to make t= his a = public library, so e.g. appliance vendors could have a better way to = configure the system than doing `system(=E2=80=9Cifconfig em0 = 10.0.0.1/24=E2=80=9D);`. Libifconfig is making progress thanks to Ryan=E2=80=99s work, but it=E2=80= =99s not = yet ready for that sort of use. Given that, it makes sense to keep it as an internal library for now, = and breaking the API is fine. I still hope that we=E2=80=99ll get it to t= he = point where it=E2=80=99ll be ready for public consumption (with stable AP= I). So I think the symbol map is mostly aspirational right now. If it=E2=80=99= s a = maintenance burden I guess we can remove it, and re-add it when the time = comes. Best regards, Kristof From owner-dev-commits-src-main@freebsd.org Sat Mar 6 09:43:43 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D336E55FAA4 for ; Sat, 6 Mar 2021 09:43:43 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic307-56.consmr.mail.ne1.yahoo.com (sonic307-56.consmr.mail.ne1.yahoo.com [66.163.190.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dt06R0HmZz3P3D for ; Sat, 6 Mar 2021 09:43:42 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1615023821; bh=oDv7gzsEjcxL4P06xyhlKeqLJIRdnsMz+BGN+z1MZZT=; h=X-Sonic-MF:From:Subject:Date:To:From:Subject; b=MZsbJQwx2tpQm5tExdaCVdLKmwCrbpLnzOLW+Rk0GRlmzEGDHs3truw/uMJ8Vz2bLIVOrCmqSQyuJjzqsRgI2NNVHQzq9oz4asILdVZv+BPhqWr6G4tMrRT6/HVdsvDU8866OrVMQPgdQhfbeKXDUt+DAwdm8ym2IjuSYQsP8CzvfzrGBblph2s4zdWA13/FZ/1s6JB5h3bt9fg3ZIN92RjLJ0PjgKNamlW+EU9X3Vc05unaMEqIayuY7sGqTna7IleEhpOekizhieJOWz1ZBE1AdTQdIEGuY3LDhO5APzvCk3ZJvGBjOT3+DG+xVWs8lbX1YiDReP20bVpGZgZC5w== X-YMail-OSG: Sc0pUNIVM1ntbZCHpl6g0BhwG.BpNHsNHbiA7W90ZnRuM_YNCywFmnnvC9dOZ.0 4975EomPW40ka0tXo0N_CxB3mcvsTL2ci1ljdEoOyA.wR15zm149Kw.g3Js33dfiFPMwHKm98JK1 Tr5zY.NHdz79CrfwPgGwuVQa0z02ftnG4_R34KLOOEthY9WTY2iNh_vTdlZl_.ThBG.mgozZYWfX ofkWDrw0lz8oXHgiHm6Ee2IYaPCmw7ZC.ShQjtfYK7ks_.RD87KYme8c2ThPKf3_UeEz0HJTKk6v VZ2dSV1lvQvQBlTIiouke5QMhk_08lGsZoZKAtbJoSRkixib9oph30wMvHM9XKlS80_cXvnEzNKJ tyZDQdHtM35AVLAwRr3zGDSMnuj5ntIEW6q9YZmVOCHBdb.3aSeITMDyVknHwx9ueQ9vl_BSmwdO nQ.sqYCiEfXUXZuD5n2XdtvYqCFh7dtL9PavdVvu6KpUMPgNGNRwuomyl4InhoFma0Y1MVy.pE4H Isq8GgqVE9KqeYrNRTyj2xNIgZa7HsPHGfCtJLoAv7iBW1tl.fX7hJ2.GrVVfuEU0kPILAfuqWl6 OGcg0CTIKvXJEu1aSCPIhn3dFgLhioxVz4wOS4fIwhQ50xeaIlurAPUFzQEpZJ1nTh4XG0aV_PJK .WWasZRUOJrb1NgRuTOcremujQZVIbhghwjwjRgkFoOXHJOBnJvgSuDbQEYhYSRKfabulZ17eBag I1P9M.B_7_T.TZ4n.7pq0w2WO19Q7JM25TeIFKe97lSHitxRinoXA7RHws8K1bDYdQm6LJUpv.WR 54U1Qm4KcSZWDPhhVwnvpOmiQ4r.EaLJ_nG8ZxyzFGYFsv3Ps5SqieoSiF71iqGxh251XJXXiWsS hpVhkjFWo.b.12girOvD6tfG9TqFbqpqegA9CoEKGJWWrgEndd64OLTY2CV9yi1mRlGoF0u.WzSb xE590eYUS4nZocLwaiskvaW5POMuNf2YoW6d6SqMIKutdbHnPsEliiyQSIwc_.OF4oAtR41zVpRU Tf_uqVZ6IZf1Iah3fpzZIhea0_3BnCxknvYREKSQ88pAn8dAumDVYuPm0J1c7Sme22cBozCeMgM3 T.mv.k.eF49_hj7ii9vMiMJ.77eerq3Jb.ic61OQgJDPFxZL1bo8Y2NkINBzbEStC6.G.WAJVc5u 6i52G4wFga6OnqZDvKOMnH0GyBKUq_4QjERx_E1UyQkzH5yvEm3ozDtreU5V30Z3t6SmXiaOjMX9 Jno4PoG_9LZ80AJm37l0xNI6k4k2w6v.TswCIX9CyYCj8njmXUmzIWQR2Wnvpt.._bTtRGAcvcMb ZstWQrS3iZTpk2VuiDSXjR9tiQmqlGGMUOQHRG5FSfK6ON6prODXAlzYJRcFpj23STjhGGlPNnoC 6eIMY99BtdPY4yPnf6kqtViPUmHj8kwNoC0EdtQ.7o2Hc5R47ZTu4VG4JfFw42f7IaL68mpemSM9 3xgXcuWvnSwAJPH01K.V3bR2eX9o5X2xI28YhaZdru9emQBbgR9bknZX2LE13ASx93uAklzZzZHZ zs0eUjL5Ic1Dllo5iZLykndioMR9owYjXS41EfLbX9.YUTgqRWaefjWVn0_w0Pk_3Rl8fPHCBPpY r2KjayqjHpwVy5TRXAH5qR.IObxhrEoAGk1jGGARRJW7atyb0z8u071sX7SZI0sJQ_vdHeJxVsR8 SEH4hBRsy.sYQfauWcFJtdARJzsKJwtDIYTdbC_fkgeJpNbg_rb1dCY7z1kdY6w0oqH1FsaLZDT0 bwjjBAioUGF01W6Qfcvlt2jZH7tVqTMAz1trezxEkgTI.D3gWV1NS7l_LdtI12VGU5SOi5xJfbYp Z9.lqWDGiMzgEYoObXysRbQa7kfj6UiAkYR8uVqw_Ima0_MzF9aPY5X5KWAiA7dkrubzrpCnr9p. .5m9PTaFbDESJkcHZ1EHQ.u8bPtgj.z1usm5kWwuk7iTiZ1py2x2Bx3LHUhTirn8gWIRUYC5MoFc 475SzN1r2vA11lS1RDx5t2m_Cgg8EA5d9dU1aBYlrkCIICY9eMnJLwrd7daUrXA2tZ_fLtX71L.K cAruG_lOhXbL8chbrB8s1EGPT4s4vxHKhEvmziP.Na6RMZZcLq6O5lF1U7JzPSmEQEgJ2rWa4yWm FxZ.8Q7KybtQXYOqWa2Dzz6F_tUzEbtSrekgF0jGlNrnkAH6YMWIKIJeZHAuGGoCrvkrBZk01SO5 GfeRwjCn.tqf4tzX7A5Pa8GKidN2bDnHY_7FZwdVePYGQMQ8j20RQ2O8bqEjM2b98UVQgkH_cjLo xYKHQhJ5DWYfBH5zoTOqrTkAMcubdmz.N0MEWHAbsHS4q5YLz0h2ZVAvKStstaOHLNojGvgqBeFJ hQWmpIKLhmYBaYKjoAW0_rqXvJbgcjqq2F1NY.KSSXMde6Xko5dGLhfJrH6UASUbX6FvO_NmS8R3 MKoWofUEhTKaSxfteUS_qeouNrQ-- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic307.consmr.mail.ne1.yahoo.com with HTTP; Sat, 6 Mar 2021 09:43:41 +0000 Received: by smtp417.mail.ne1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 5350d91e4caf86c5e1dd2aa690b4d116; Sat, 06 Mar 2021 09:43:38 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) Subject: Re: git: e77cf2a4ab32 - main - Restore /boot/efi to mtree. Date: Sat, 6 Mar 2021 01:43:36 -0800 References: <656E3D05-11B6-437B-B171-4894811A70CB@yahoo.com> To: "nwhitehorn@freebsd.org" , dev-commits-src-main@freebsd.org In-Reply-To: Message-Id: X-Mailer: Apple Mail (2.3654.60.0.2.21) X-Rspamd-Queue-Id: 4Dt06R0HmZz3P3D X-Spamd-Bar: - X-Spamd-Result: default: False [-1.53 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; DKIM_TRACE(0.00)[yahoo.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[66.163.190.31:from]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:36646, ipnet:66.163.184.0/21, country:US]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; NEURAL_SPAM_SHORT(0.97)[0.969]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; SPAMHAUS_ZRD(0.00)[66.163.190.31:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[66.163.190.31:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[66.163.190.31:from]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[dev-commits-src-main] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2021 09:43:43 -0000 On 2021-Mar-6, at 01:01, Mark Millard wrote: > On 2021-Mar-5, at 22:05, Mark Millard wrote: >>=20 >> Nathan Whitehorn nwhitehorn at FreeBSD.org wrote on >> Sat Mar 6 02:01:30 UTC 2021 : >>=20 >>> Restore /boot/efi to mtree. >>>=20 >>> Instead of whether /boot/efi exists, which it now always does, = including >>> on systems that don't and can't use EFI, use whether /boot/efi is >>> present in fstab to signal to the installer that it is a valid ESP = and >>> should be configured. This has essentially the same semantics, but = allows >>> /boot/efi to be created unconditionally. >>>=20 >>=20 >> Sounds like the documentation about /etc/fstab content >> should indicate the special/reserved /boot/efi usage >> context, be that comments in initial default files or >> whatever. >>=20 >> I wonder if anyone puts / at the end in an fstab: /boot/efi/=20 >>=20 >=20 > I tried using a trailing / in /etc/fstab and it is > one place were the notational variation is not > equivalent: I had to remove it. >=20 FYI: Reviewing/adjusting my /etc/fstab files I notice that I have examples with things like: /dev/label/Rock64boot /boot/efi msdosfs rw,noatime,noauto = 0 0 #/dev/msdosfs/RPI4EFIFS /boot/efi msdosfs rw,noatime,noauto = 0 0 Some might have a space after the #, shifting the /boot/efi to be at $3 ? Some /etc/fstab files have both types of /boot/efi lines (commented vs. uncommented), associated with root-file-system-media that I move between machines sometimes and toggle what is commented (changing what media ends up referenced). =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-dev-commits-src-main@freebsd.org Sat Mar 6 10:19:51 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 017DA56041F; Sat, 6 Mar 2021 10:19:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dt0w66Py3z3QT2; Sat, 6 Mar 2021 10:19:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CACE3218C1; Sat, 6 Mar 2021 10:19:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 126AJo27069169; Sat, 6 Mar 2021 10:19:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 126AJoUe069168; Sat, 6 Mar 2021 10:19:50 GMT (envelope-from git) Date: Sat, 6 Mar 2021 10:19:50 GMT Message-Id: <202103061019.126AJoUe069168@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: b4e3f3c2de6e - main - pfctl: Add missing 'va' code point name MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b4e3f3c2de6e6dc614f99615e50d0d87f3367ca0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2021 10:19:51 -0000 The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=b4e3f3c2de6e6dc614f99615e50d0d87f3367ca0 commit b4e3f3c2de6e6dc614f99615e50d0d87f3367ca0 Author: Kristof Provost AuthorDate: 2021-03-04 12:50:28 +0000 Commit: Kristof Provost CommitDate: 2021-03-06 09:07:55 +0000 pfctl: Add missing 'va' code point name Add the 'va' (voice-admit, RFC5865) symbolic name. Reviewed by: rgrimes, gbe (man page) MFC after: 2 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D29069 --- sbin/pfctl/parse.y | 3 ++- share/man/man5/pf.conf.5 | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y index 1182dde3b079..9db85538feaf 100644 --- a/sbin/pfctl/parse.y +++ b/sbin/pfctl/parse.y @@ -6342,7 +6342,8 @@ map_tos(char *s, int *val) { "lowdelay", IPTOS_LOWDELAY }, { "netcontrol", IPTOS_PREC_NETCONTROL }, { "reliability", IPTOS_RELIABILITY }, - { "throughput", IPTOS_THROUGHPUT } + { "throughput", IPTOS_THROUGHPUT }, + { "va", IPTOS_DSCP_VA } }; const struct keywords *p; diff --git a/share/man/man5/pf.conf.5 b/share/man/man5/pf.conf.5 index 8846199deccb..d31d20e29bea 100644 --- a/share/man/man5/pf.conf.5 +++ b/share/man/man5/pf.conf.5 @@ -681,6 +681,7 @@ given as one of .Ar reliability , or one of the DiffServ Code Points: .Ar ef , +.Ar va , .Ar af11 No ... Ar af43 , .Ar cs0 No ... Ar cs7 ; or as either hex or decimal. @@ -1737,6 +1738,7 @@ given as one of .Ar reliability , or one of the DiffServ Code Points: .Ar ef , +.Ar va , .Ar af11 No ... Ar af43 , .Ar cs0 No ... Ar cs7 ; or as either hex or decimal. From owner-dev-commits-src-main@freebsd.org Sat Mar 6 10:19:52 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0AFD9560421; Sat, 6 Mar 2021 10:19:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dt0w76x0Jz3QG1; Sat, 6 Mar 2021 10:19:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E0DA2218C2; Sat, 6 Mar 2021 10:19:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 126AJpeD069192; Sat, 6 Mar 2021 10:19:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 126AJpTG069191; Sat, 6 Mar 2021 10:19:51 GMT (envelope-from git) Date: Sat, 6 Mar 2021 10:19:51 GMT Message-Id: <202103061019.126AJpTG069191@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 9d3b2bcf7610 - main - pf tests: Test tos/dscp matching MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9d3b2bcf761041bbe79da3de25f2e4142d90b46a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2021 10:19:52 -0000 The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=9d3b2bcf761041bbe79da3de25f2e4142d90b46a commit 9d3b2bcf761041bbe79da3de25f2e4142d90b46a Author: Kristof Provost AuthorDate: 2021-03-03 20:15:39 +0000 Commit: Kristof Provost CommitDate: 2021-03-06 09:08:44 +0000 pf tests: Test tos/dscp matching MFC after: 2 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D29078 --- tests/sys/netpfil/pf/Makefile | 3 +- tests/sys/netpfil/pf/tos.sh | 95 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 97 insertions(+), 1 deletion(-) diff --git a/tests/sys/netpfil/pf/Makefile b/tests/sys/netpfil/pf/Makefile index f00f64d849d2..132b681226dc 100644 --- a/tests/sys/netpfil/pf/Makefile +++ b/tests/sys/netpfil/pf/Makefile @@ -22,7 +22,8 @@ ATF_TESTS_SH+= altq \ set_tos \ src_track \ synproxy \ - table + table \ + tos ${PACKAGE}FILES+= CVE-2019-5597.py \ CVE-2019-5598.py \ diff --git a/tests/sys/netpfil/pf/tos.sh b/tests/sys/netpfil/pf/tos.sh new file mode 100644 index 000000000000..4e2832ba3317 --- /dev/null +++ b/tests/sys/netpfil/pf/tos.sh @@ -0,0 +1,95 @@ +# $FreeBSD$ +# +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright (c) 2021 Rubicon Communications, LLC (Netgate) +# +# 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. + +. $(atf_get_srcdir)/utils.subr + +atf_test_case "v4" "cleanup" +v4_head() +{ + atf_set descr 'tos matching test' + atf_set require.user root +} + +v4_body() +{ + pft_init + + epair=$(vnet_mkepair) + ifconfig ${epair}a 192.0.2.1/24 up + + vnet_mkjail alcatraz ${epair}b + jexec alcatraz ifconfig ${epair}b 192.0.2.2/24 up + jexec alcatraz pfctl -e + + pft_set_rules alcatraz "pass" \ + "block in tos va" + + atf_check -s exit:0 -o ignore ping -t 1 -c 1 192.0.2.2 + atf_check -s exit:2 -o ignore ping -t 1 -c 1 -z 0xb0 192.0.2.2 +} + +v4_cleanup() +{ + pft_cleanup +} + +atf_test_case "v6" "cleanup" +v6_head() +{ + atf_set descr 'IPv6 tos matching test' + atf_set require.user root +} + +v6_body() +{ + pft_init + + epair=$(vnet_mkepair) + ifconfig ${epair}a inet6 2001:db8:42::1/64 up no_dad -ifdisabled + + vnet_mkjail alcatraz ${epair}b + jexec alcatraz ifconfig ${epair}b inet6 2001:db8:42::2/64 \ + up no_dad -ifdisabled + jexec alcatraz pfctl -e + + pft_set_rules alcatraz "pass" \ + "block in tos va" + + atf_check -s exit:0 -o ignore ping6 -t 1 -c 1 2001:db8:42::2 + atf_check -s exit:2 -o ignore ping6 -t 1 -c 1 -z 176 2001:db8:42::2 +} + +v6_cleanup() +{ + pft_cleanup +} + +atf_init_test_cases() +{ + atf_add_test_case "v4" + atf_add_test_case "v6" +} From owner-dev-commits-src-main@freebsd.org Sat Mar 6 10:24:26 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8770B560A85; Sat, 6 Mar 2021 10:24:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dt11Q3Bpsz3RKm; Sat, 6 Mar 2021 10:24:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 55C5321E90; Sat, 6 Mar 2021 10:24:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 126AOQw6081237; Sat, 6 Mar 2021 10:24:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 126AOQIX081236; Sat, 6 Mar 2021 10:24:26 GMT (envelope-from git) Date: Sat, 6 Mar 2021 10:24:26 GMT Message-Id: <202103061024.126AOQIX081236@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Toomas Soome Subject: git: d708f23ebb06 - main - loader: cursor off should restore display content MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tsoome X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d708f23ebb06cfc9cf8f96f17a43eb63653b818a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2021 10:24:26 -0000 The branch main has been updated by tsoome: URL: https://cgit.FreeBSD.org/src/commit/?id=d708f23ebb06cfc9cf8f96f17a43eb63653b818a commit d708f23ebb06cfc9cf8f96f17a43eb63653b818a Author: Toomas Soome AuthorDate: 2021-03-06 10:19:43 +0000 Commit: Toomas Soome CommitDate: 2021-03-06 10:23:54 +0000 loader: cursor off should restore display content When drawing cursor, we should store original display content because there may be image data we would like to restore when the cursor is removed. PR: 254054 Reported by: Jose Luis Duran MFC after: 3 days --- stand/common/gfx_fb.c | 38 ++++++++++++++++++++++++++++++++++++++ stand/common/gfx_fb.h | 2 ++ 2 files changed, 40 insertions(+) diff --git a/stand/common/gfx_fb.c b/stand/common/gfx_fb.c index 77cf1d39854f..3eae0a3a859e 100644 --- a/stand/common/gfx_fb.c +++ b/stand/common/gfx_fb.c @@ -978,6 +978,7 @@ gfx_fb_fill(void *arg, const teken_rect_t *r, teken_char_t c, static void gfx_fb_cursor_draw(teken_gfx_t *state, const teken_pos_t *p, bool on) { + unsigned x, y, width, height; const uint8_t *glyph; int idx; @@ -985,10 +986,47 @@ gfx_fb_cursor_draw(teken_gfx_t *state, const teken_pos_t *p, bool on) if (idx >= state->tg_tp.tp_col * state->tg_tp.tp_row) return; + width = state->tg_font.vf_width; + height = state->tg_font.vf_height; + x = state->tg_origin.tp_col + p->tp_col * width; + y = state->tg_origin.tp_row + p->tp_row * height; + + /* + * Save original display content to preserve image data. + */ + if (on) { + if (state->tg_cursor_image == NULL || + state->tg_cursor_size != width * height * 4) { + free(state->tg_cursor_image); + state->tg_cursor_size = width * height * 4; + state->tg_cursor_image = malloc(state->tg_cursor_size); + } + if (state->tg_cursor_image != NULL) { + if (gfxfb_blt(state->tg_cursor_image, + GfxFbBltVideoToBltBuffer, x, y, 0, 0, + width, height, 0) != 0) { + free(state->tg_cursor_image); + state->tg_cursor_image = NULL; + } + } + } else { + /* + * Restore display from tg_cursor_image. + * If there is no image, restore char from screen_buffer. + */ + if (state->tg_cursor_image != NULL && + gfxfb_blt(state->tg_cursor_image, GfxFbBltBufferToVideo, + 0, 0, x, y, width, height, 0) == 0) { + state->tg_cursor = *p; + return; + } + } + glyph = font_lookup(&state->tg_font, screen_buffer[idx].c, &screen_buffer[idx].a); gfx_bitblt_bitmap(state, glyph, &screen_buffer[idx].a, 0xff, on); gfx_fb_printchar(state, p); + state->tg_cursor = *p; } diff --git a/stand/common/gfx_fb.h b/stand/common/gfx_fb.h index ac63d7939cef..89b060a02cf9 100644 --- a/stand/common/gfx_fb.h +++ b/stand/common/gfx_fb.h @@ -210,6 +210,8 @@ typedef struct teken_gfx { teken_t tg_teken; /* Teken core */ teken_pos_t tg_cursor; /* Where cursor was drawn */ bool tg_cursor_visible; + uint8_t *tg_cursor_image; /* Memory for cursor */ + size_t tg_cursor_size; teken_pos_t tg_tp; /* Terminal dimensions */ teken_pos_t tg_origin; /* Point of origin in pixels */ uint8_t *tg_glyph; /* Memory for glyph */ From owner-dev-commits-src-main@freebsd.org Sat Mar 6 10:33:30 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1C2CF560DD1; Sat, 6 Mar 2021 10:33:30 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dt1Cs14kbz3hGr; Sat, 6 Mar 2021 10:33:28 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2020.home.selasky.org (unknown [178.17.145.105]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 29201260202; Sat, 6 Mar 2021 11:33:21 +0100 (CET) Subject: Re: git: 600eade2fb4f - main - Add ifa_try_ref() to simplify ifa handling inside epoch. To: "Alexander V. Chernikov" , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202102162018.11GKIs1U039108@gitrepo.freebsd.org> From: Hans Petter Selasky Message-ID: <938ca724-5f45-1d94-c22e-df348abdd030@selasky.org> Date: Sat, 6 Mar 2021 11:33:03 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: <202102162018.11GKIs1U039108@gitrepo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4Dt1Cs14kbz3hGr X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of hps@selasky.org designates 88.99.82.50 as permitted sender) smtp.mailfrom=hps@selasky.org X-Spamd-Result: default: False [-3.25 / 15.00]; RCVD_TLS_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; R_SPF_ALLOW(-0.20)[+a:mail.turbocat.net]; ARC_NA(0.00)[]; DMARC_NA(0.00)[selasky.org]; SPAMHAUS_ZRD(0.00)[88.99.82.50:from:127.0.2.255]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; RBL_DBL_DONT_QUERY_IPS(0.00)[88.99.82.50:from]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.95)[-0.948]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:88.99.0.0/16, country:DE]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[dev-commits-src-all,dev-commits-src-main] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2021 10:33:30 -0000 On 2/16/21 9:18 PM, Alexander V. Chernikov wrote: > The branch main has been updated by melifaro: > > URL: https://cgit.FreeBSD.org/src/commit/?id=600eade2fb4faacfcd408a01140ef15f85f0c817 > > commit 600eade2fb4faacfcd408a01140ef15f85f0c817 > Author: Alexander V. Chernikov > AuthorDate: 2021-02-16 20:12:58 +0000 > Commit: Alexander V. Chernikov > CommitDate: 2021-02-16 20:14:50 +0000 > > Add ifa_try_ref() to simplify ifa handling inside epoch. > > More and more code migrates from lock-based protection to the NET_EPOCH > umbrella. It requires some logic changes, including, notably, refcount > handling. > > When we have an `ifa` pointer and we're running inside epoch we're > guaranteed that this pointer will not be freed. > However, the following case can still happen: > * in thread 1 we drop to 0 refcount for ifa and schedule its deletion. > * in thread 2 we use this ifa and reference it > * destroy callout kicks in > * unhappy user reports bug > > To address it, new `ifa_try_ref()` function is added, allowing to return > failure when we try to reference `ifa` with 0 refcount. > Additionally, existing `ifa_ref()` is enforced with `KASSERT` to provide > cleaner error in such scenarious. > > Reviewed By: rstone, donner > Differential Revision: https://reviews.freebsd.org/D28639 > MFC after: 1 week > --- > sys/net/if.c | 12 +++++++++++- > sys/net/if_var.h | 1 + > 2 files changed, 12 insertions(+), 1 deletion(-) > > diff --git a/sys/net/if.c b/sys/net/if.c > index c85cfab19bf6..948be6876b65 100644 > --- a/sys/net/if.c > +++ b/sys/net/if.c > @@ -1857,8 +1857,18 @@ fail: > void > ifa_ref(struct ifaddr *ifa) > { > + u_int old; > > - refcount_acquire(&ifa->ifa_refcnt); > + old = refcount_acquire(&ifa->ifa_refcnt); > + KASSERT(old > 0, ("%s: ifa %p has 0 refs", __func__, ifa)); > +} > + > +int > +ifa_try_ref(struct ifaddr *ifa) > +{ > + > + NET_EPOCH_ASSERT(); > + return (refcount_acquire_if_not_zero(&ifa->ifa_refcnt)); > } > > static void > diff --git a/sys/net/if_var.h b/sys/net/if_var.h > index 9ecdfb684296..291a7781d73c 100644 > --- a/sys/net/if_var.h > +++ b/sys/net/if_var.h > @@ -577,6 +577,7 @@ struct ifaddr { > struct ifaddr * ifa_alloc(size_t size, int flags); > void ifa_free(struct ifaddr *ifa); > void ifa_ref(struct ifaddr *ifa); > +int ifa_try_ref(struct ifaddr *ifa); I think you should add __result_use_check for this prototype!? --HPS From owner-dev-commits-src-main@freebsd.org Sat Mar 6 10:33:58 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A5275560C35; Sat, 6 Mar 2021 10:33:58 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dt1DP3YDpz3hNV; Sat, 6 Mar 2021 10:33:57 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2020.home.selasky.org (unknown [178.17.145.105]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 32CA9260202; Sat, 6 Mar 2021 11:33:49 +0100 (CET) Subject: Re: git: 7563019bc693 - main - Add if_try_ref() to simplify refcount handling inside epoch. To: "Alexander V. Chernikov" , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202102222338.11MNcBem084739@gitrepo.freebsd.org> From: Hans Petter Selasky Message-ID: <1db9ff12-55d7-da4d-dde9-d7e9045fffc4@selasky.org> Date: Sat, 6 Mar 2021 11:33:34 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: <202102222338.11MNcBem084739@gitrepo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4Dt1DP3YDpz3hNV X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of hps@selasky.org designates 2a01:4f8:c17:6c4b::2 as permitted sender) smtp.mailfrom=hps@selasky.org X-Spamd-Result: default: False [-3.28 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+a:mail.turbocat.net:c]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[selasky.org]; RBL_DBL_DONT_QUERY_IPS(0.00)[2a01:4f8:c17:6c4b::2:from]; TO_DN_SOME(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; SPAMHAUS_ZRD(0.00)[2a01:4f8:c17:6c4b::2:from:127.0.2.255]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.98)[-0.981]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[dev-commits-src-all,dev-commits-src-main] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2021 10:33:58 -0000 On 2/23/21 12:38 AM, Alexander V. Chernikov wrote: > The branch main has been updated by melifaro: > diff --git a/sys/net/if_var.h b/sys/net/if_var.h > index 291a7781d73c..33a737880a8d 100644 > --- a/sys/net/if_var.h > +++ b/sys/net/if_var.h > @@ -661,6 +661,7 @@ void if_link_state_change(struct ifnet *, int); > int if_printf(struct ifnet *, const char *, ...) __printflike(2, 3); > void if_ref(struct ifnet *); > void if_rele(struct ifnet *); > +bool if_try_ref(struct ifnet *); I think you should add __result_use_check for this prototype!? > int if_setlladdr(struct ifnet *, const u_char *, int); > int if_tunnel_check_nesting(struct ifnet *, struct mbuf *, uint32_t, int); > void if_up(struct ifnet *); > --HPS From owner-dev-commits-src-main@freebsd.org Sat Mar 6 10:41:00 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9BDFF560FB6; Sat, 6 Mar 2021 10:41:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dt1NX44rvz3hvk; Sat, 6 Mar 2021 10:41:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7F6C322103; Sat, 6 Mar 2021 10:41:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 126Af0SK003185; Sat, 6 Mar 2021 10:41:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 126Af0Eq003184; Sat, 6 Mar 2021 10:41:00 GMT (envelope-from git) Date: Sat, 6 Mar 2021 10:41:00 GMT Message-Id: <202103061041.126Af0Eq003184@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Hans Petter Selasky Subject: git: c743a6bd4fc0 - main - Implement mallocarray_domainset(9) variant of mallocarray(9). MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c743a6bd4fc0d1be30f9bc9996333ac0ba079563 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2021 10:41:00 -0000 The branch main has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=c743a6bd4fc0d1be30f9bc9996333ac0ba079563 commit c743a6bd4fc0d1be30f9bc9996333ac0ba079563 Author: Hans Petter Selasky AuthorDate: 2021-03-06 10:25:12 +0000 Commit: Hans Petter Selasky CommitDate: 2021-03-06 10:38:55 +0000 Implement mallocarray_domainset(9) variant of mallocarray(9). Reviewed by: kib @ MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking --- share/man/man9/Makefile | 1 + share/man/man9/malloc.9 | 13 ++++++++++++- sys/kern/kern_malloc.c | 11 +++++++++++ sys/sys/malloc.h | 3 +++ 4 files changed, 27 insertions(+), 1 deletion(-) diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 64e234c3d696..fb010231d710 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -1391,6 +1391,7 @@ MLINKS+=make_dev.9 destroy_dev.9 \ MLINKS+=malloc.9 free.9 \ malloc.9 malloc_domainset.9 \ malloc.9 mallocarray.9 \ + malloc.9 mallocarray_domainset.9 \ malloc.9 MALLOC_DECLARE.9 \ malloc.9 MALLOC_DEFINE.9 \ malloc.9 realloc.9 \ diff --git a/share/man/man9/malloc.9 b/share/man/man9/malloc.9 index 097688d7ea38..b8c6e504e0c0 100644 --- a/share/man/man9/malloc.9 +++ b/share/man/man9/malloc.9 @@ -29,7 +29,7 @@ .\" $NetBSD: malloc.9,v 1.3 1996/11/11 00:05:11 lukem Exp $ .\" $FreeBSD$ .\" -.Dd October 30, 2020 +.Dd March 6, 2021 .Dt MALLOC 9 .Os .Sh NAME @@ -70,6 +70,8 @@ .Fn malloc_domainset "size_t size" "struct malloc_type *type" "struct domainset *ds" "int flags" .Ft void * .Fn malloc_domainset_exec "size_t size" "struct malloc_type *type" "struct domainset *ds" "int flags" +.Ft void * +.Fn mallocarray_domainset "size_t nmemb" "size_t size" "struct malloc_type *type" "struct domainset *ds" "int flags" .Sh DESCRIPTION The .Fn malloc @@ -102,6 +104,15 @@ entries whose size is specified by .Fa size . .Pp The +.Fn mallocarray_domainset +variant allocates memory from a specific +.Xr numa 4 +domain using the specified domain selection policy. +See +.Xr domainset 9 +for some example policies. +.Pp +The .Fn free function releases memory at address .Fa addr diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c index eff9e62c9a10..48383358e3ad 100644 --- a/sys/kern/kern_malloc.c +++ b/sys/kern/kern_malloc.c @@ -804,6 +804,17 @@ mallocarray(size_t nmemb, size_t size, struct malloc_type *type, int flags) return (malloc(size * nmemb, type, flags)); } +void * +mallocarray_domainset(size_t nmemb, size_t size, struct malloc_type *type, + struct domainset *ds, int flags) +{ + + if (WOULD_OVERFLOW(nmemb, size)) + panic("mallocarray_domainset: %zu * %zu overflowed", nmemb, size); + + return (malloc_domainset(size * nmemb, type, ds, flags)); +} + #ifdef INVARIANTS static void free_save_type(void *addr, struct malloc_type *mtp, u_long size) diff --git a/sys/sys/malloc.h b/sys/sys/malloc.h index 54a05e94a3a2..0c585c5a0dcf 100644 --- a/sys/sys/malloc.h +++ b/sys/sys/malloc.h @@ -246,6 +246,9 @@ void *malloc_domainset(size_t size, struct malloc_type *type, void *mallocarray(size_t nmemb, size_t size, struct malloc_type *type, int flags) __malloc_like __result_use_check __alloc_size2(1, 2); +void *mallocarray_domainset(size_t nmemb, size_t size, struct malloc_type *type, + struct domainset *ds, int flags) __malloc_like __result_use_check + __alloc_size2(1, 2); void *malloc_exec(size_t size, struct malloc_type *type, int flags) __malloc_like __result_use_check __alloc_size(1); void *malloc_domainset_exec(size_t size, struct malloc_type *type, From owner-dev-commits-src-main@freebsd.org Sat Mar 6 11:34:01 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 493EA562BBD; Sat, 6 Mar 2021 11:34:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dt2Yj1cK3z3mHW; Sat, 6 Mar 2021 11:34:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2A1E122C9A; Sat, 6 Mar 2021 11:34:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 126BY1gp073406; Sat, 6 Mar 2021 11:34:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 126BY1KE073405; Sat, 6 Mar 2021 11:34:01 GMT (envelope-from git) Date: Sat, 6 Mar 2021 11:34:01 GMT Message-Id: <202103061134.126BY1KE073405@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: e797dc58bd29 - main - arm64: Add support for bcm2838 RNG MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e797dc58bd29c5bc0873fc620fc11d5332f90e7f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2021 11:34:01 -0000 The branch main has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=e797dc58bd29c5bc0873fc620fc11d5332f90e7f commit e797dc58bd29c5bc0873fc620fc11d5332f90e7f Author: Gordon Bergling AuthorDate: 2021-03-06 11:28:35 +0000 Commit: Gordon Bergling CommitDate: 2021-03-06 11:28:35 +0000 arm64: Add support for bcm2838 RNG The hardware random number generator of the RPi4 differs slightly from the version found on the RPi3. This commit extends the existing bcm2835_rng driver to function on the RPi4. Submitted by: James Mintram Reviewed by: markm, cem, delphij Approved by: csprng(cem, markm) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D22493 --- sys/arm/broadcom/bcm2835/bcm2835_rng.c | 174 +++++++++++++++++++++++++-------- 1 file changed, 133 insertions(+), 41 deletions(-) diff --git a/sys/arm/broadcom/bcm2835/bcm2835_rng.c b/sys/arm/broadcom/bcm2835/bcm2835_rng.c index b73580c5eb53..c403bc3542e0 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_rng.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_rng.c @@ -69,21 +69,26 @@ static device_probe_t bcm2835_rng_probe; #define RNG_RBG2X 0x00000002 /* RBG 2X SPEED */ #define RNG_RBGEN_BIT 0x00000001 /* Enable RNG bit */ -#define RNG_STATUS 0x04 /* RNG status register */ -#define RND_VAL_SHIFT 24 /* Shift for valid words */ -#define RND_VAL_MASK 0x000000ff /* Number valid words mask */ -#define RND_VAL_WARM_CNT 0x40000 /* RNG Warm Up count */ -#define RND_WARM_CNT 0xfffff /* RNG Warm Up Count mask */ +#define BCM2835_RNG_STATUS 0x04 /* BCM2835 RNG status register */ +#define BCM2838_RNG_STATUS 0x18 /* BCM2838 RNG status register */ -#define RNG_DATA 0x08 /* RNG Data Register */ +#define BCM2838_RNG_COUNT 0x24 /* How many values available */ +#define BCM2838_COUNT_VAL_MASK 0x000000ff + +#define BCM2835_RND_VAL_SHIFT 24 /* Shift for valid words */ +#define BCM2835_RND_VAL_MASK 0x000000ff /* Number valid words mask */ +#define BCM2835_RND_VAL_WARM_CNT 0x40000 /* RNG Warm Up count */ +#define BCM2835_RND_WARM_CNT 0xfffff /* RNG Warm Up Count mask */ + +#define BCM2835_RNG_DATA 0x08 /* RNG Data Register */ +#define BCM2838_RNG_DATA 0x20 #define RNG_FF_THRES 0x0c #define RNG_FF_THRES_MASK 0x0000001f -#define RNG_INT_MASK 0x10 -#define RNG_INT_OFF_BIT 0x00000001 +#define BCM2835_RNG_INT_MASK 0x10 +#define BCM2835_RNG_INT_OFF_BIT 0x00000001 #define RNG_FF_DEFAULT 0x10 /* FIFO threshold default */ - #define RNG_FIFO_WORDS (RNG_FF_DEFAULT / sizeof(uint32_t)) #define RNG_NUM_OSCILLATORS 6 @@ -91,11 +96,55 @@ static device_probe_t bcm2835_rng_probe; #define RNG_CALLOUT_TICKS (hz * 4) +struct bcm_rng_conf { + bus_size_t control_reg; + bus_size_t status_reg; + bus_size_t count_reg; + bus_size_t data_reg; + bus_size_t intr_mask_reg; + uint32_t intr_disable_bit; + uint32_t count_value_shift; + uint32_t count_value_mask; + uint32_t warmup_count; + bool allow_2x_mode; + bool can_diagnose; + /* XXX diag regs */ +}; + +static const struct bcm_rng_conf bcm2835_rng_conf = { + .control_reg = RNG_CTRL, + .status_reg = BCM2835_RNG_STATUS, + .count_reg = BCM2835_RNG_STATUS, /* Same register */ + .data_reg = BCM2835_RNG_DATA, + .intr_mask_reg = BCM2835_RNG_INT_MASK, + .intr_disable_bit = BCM2835_RNG_INT_OFF_BIT, + .count_value_shift = BCM2835_RND_VAL_SHIFT, + .count_value_mask = BCM2835_RND_VAL_MASK, + .warmup_count = BCM2835_RND_VAL_WARM_CNT, + .allow_2x_mode = true, + .can_diagnose = true +}; + +static const struct bcm_rng_conf bcm2838_rng_conf = { + .control_reg = RNG_CTRL, + .status_reg = BCM2838_RNG_STATUS, + .count_reg = BCM2838_RNG_COUNT, + .data_reg = BCM2838_RNG_DATA, + .intr_mask_reg = 0, + .intr_disable_bit = 0, + .count_value_shift = 0, + .count_value_mask = BCM2838_COUNT_VAL_MASK, + .warmup_count = 0, + .allow_2x_mode = false, + .can_diagnose = false +}; + struct bcm2835_rng_softc { device_t sc_dev; struct resource * sc_mem_res; struct resource * sc_irq_res; void * sc_intr_hdl; + struct bcm_rng_conf const* conf; uint32_t sc_buf[RNG_FIFO_WORDS]; struct callout sc_rngto; int sc_stall_count; @@ -104,8 +153,15 @@ struct bcm2835_rng_softc { }; static struct ofw_compat_data compat_data[] = { - {"broadcom,bcm2835-rng", 1}, - {"brcm,bcm2835-rng", 1}, + {"broadcom,bcm2835-rng", (uintptr_t)&bcm2835_rng_conf}, + {"brcm,bcm2835-rng", (uintptr_t)&bcm2835_rng_conf}, + + {"brcm,bcm2711-rng200", (uintptr_t)&bcm2838_rng_conf}, + {"brcm,bcm2838-rng", (uintptr_t)&bcm2838_rng_conf}, + {"brcm,bcm2838-rng200", (uintptr_t)&bcm2838_rng_conf}, + {"brcm,bcm7211-rng", (uintptr_t)&bcm2838_rng_conf}, + {"brcm,bcm7278-rng", (uintptr_t)&bcm2838_rng_conf}, + {"brcm,iproc-rng200", (uintptr_t)&bcm2838_rng_conf}, {NULL, 0} }; @@ -144,8 +200,12 @@ bcm2835_rng_dump_registers(struct bcm2835_rng_softc *sc, struct sbuf *sbp) uint32_t comblk2_osc, comblk1_osc, jclk_byp_div, val; int i; + if (!sc->conf->can_diagnose) + /* Not implemented. */ + return; + /* Display RNG control register contents */ - val = bcm2835_rng_read4(sc, RNG_CTRL); + val = bcm2835_rng_read4(sc, sc->conf->control_reg); sbuf_printf(sbp, "RNG_CTRL (%08x)\n", val); comblk2_osc = (val & RNG_COMBLK2_OSC) >> RNG_COMBLK2_OSC_SHIFT; @@ -181,20 +241,20 @@ bcm2835_rng_dump_registers(struct bcm2835_rng_softc *sc, struct sbuf *sbp) sbuf_cat(sbp, " RNG_RBGEN_BIT: RBG enabled\n"); /* Display RNG status register contents */ - val = bcm2835_rng_read4(sc, RNG_STATUS); + val = bcm2835_rng_read4(sc, sc->conf->status_reg); sbuf_printf(sbp, "RNG_CTRL (%08x)\n", val); sbuf_printf(sbp, " RND_VAL: %02x\n", - (val >> RND_VAL_SHIFT) & RND_VAL_MASK); - sbuf_printf(sbp, " RND_WARM_CNT: %05x\n", val & RND_WARM_CNT); + (val >> sc->conf->count_value_shift) & sc->conf->count_value_mask); + sbuf_printf(sbp, " RND_WARM_CNT: %05x\n", val & sc->conf->warmup_count); /* Display FIFO threshold register contents */ val = bcm2835_rng_read4(sc, RNG_FF_THRES); sbuf_printf(sbp, "RNG_FF_THRES: %05x\n", val & RNG_FF_THRES_MASK); /* Display interrupt mask register contents */ - val = bcm2835_rng_read4(sc, RNG_INT_MASK); + val = bcm2835_rng_read4(sc, sc->conf->intr_mask_reg); sbuf_printf(sbp, "RNG_INT_MASK: interrupt %s\n", - ((val & RNG_INT_OFF_BIT) != 0) ? "disabled" : "enabled"); + ((val & sc->conf->intr_disable_bit) != 0) ? "disabled" : "enabled"); } static void @@ -203,9 +263,9 @@ bcm2835_rng_disable_intr(struct bcm2835_rng_softc *sc) uint32_t mask; /* Set the interrupt off bit in the interrupt mask register */ - mask = bcm2835_rng_read4(sc, RNG_INT_MASK); - mask |= RNG_INT_OFF_BIT; - bcm2835_rng_write4(sc, RNG_INT_MASK, mask); + mask = bcm2835_rng_read4(sc, sc->conf->intr_mask_reg); + mask |= sc->conf->intr_disable_bit; + bcm2835_rng_write4(sc, sc->conf->intr_mask_reg, mask); } static void @@ -214,17 +274,20 @@ bcm2835_rng_start(struct bcm2835_rng_softc *sc) uint32_t ctrl; /* Disable the interrupt */ - bcm2835_rng_disable_intr(sc); + if (sc->conf->intr_mask_reg) + bcm2835_rng_disable_intr(sc); /* Set the warmup count */ - bcm2835_rng_write4(sc, RNG_STATUS, RND_VAL_WARM_CNT); + if (sc->conf->warmup_count > 0) + bcm2835_rng_write4(sc, sc->conf->status_reg, + sc->conf->warmup_count); /* Enable the RNG */ - ctrl = bcm2835_rng_read4(sc, RNG_CTRL); + ctrl = bcm2835_rng_read4(sc, sc->conf->control_reg); ctrl |= RNG_RBGEN_BIT; - if (sc->sc_rbg2x) + if (sc->sc_rbg2x && sc->conf->allow_2x_mode) ctrl |= RNG_RBG2X; - bcm2835_rng_write4(sc, RNG_CTRL, ctrl); + bcm2835_rng_write4(sc, sc->conf->control_reg, ctrl); } static void @@ -233,16 +296,39 @@ bcm2835_rng_stop(struct bcm2835_rng_softc *sc) uint32_t ctrl; /* Disable the RNG */ - ctrl = bcm2835_rng_read4(sc, RNG_CTRL); + ctrl = bcm2835_rng_read4(sc, sc->conf->control_reg); ctrl &= ~RNG_RBGEN_BIT; - bcm2835_rng_write4(sc, RNG_CTRL, ctrl); + bcm2835_rng_write4(sc, sc->conf->control_reg, ctrl); +} + +static void +bcm2835_rng_enqueue_harvest(struct bcm2835_rng_softc *sc, uint32_t nread) +{ + char *sc_buf_chunk; + uint32_t chunk_size; + uint32_t cnt; + + chunk_size = sizeof(((struct harvest_event *)0)->he_entropy); + cnt = nread * sizeof(uint32_t); + sc_buf_chunk = (void*)sc->sc_buf; + + while (cnt > 0) { + uint32_t size; + + size = MIN(cnt, chunk_size); + + random_harvest_queue(sc_buf_chunk, size, RANDOM_PURE_BROADCOM); + + sc_buf_chunk += size; + cnt -= size; + } } static void bcm2835_rng_harvest(void *arg) { uint32_t *dest; - uint32_t status; + uint32_t hwcount; u_int cnt, nread, num_avail, num_words; int seen_underrun, num_stalls; struct bcm2835_rng_softc *sc = arg; @@ -250,11 +336,13 @@ bcm2835_rng_harvest(void *arg) dest = sc->sc_buf; nread = num_words = 0; seen_underrun = num_stalls = 0; + for (cnt = sizeof(sc->sc_buf) / sizeof(uint32_t); cnt > 0; cnt -= num_words) { - /* Read status register to find out how many words available */ - status = bcm2835_rng_read4(sc, RNG_STATUS); - num_avail = (status >> RND_VAL_SHIFT) & RND_VAL_MASK; + /* Read count register to find out how many words available */ + hwcount = bcm2835_rng_read4(sc, sc->conf->count_reg); + num_avail = (hwcount >> sc->conf->count_value_shift) & + sc->conf->count_value_mask; /* If we have none... */ if (num_avail == 0) { @@ -282,15 +370,13 @@ bcm2835_rng_harvest(void *arg) /* Pull MIN(num_avail, cnt) words from the FIFO */ num_words = (num_avail > cnt) ? cnt : num_avail; - bcm2835_rng_read_multi4(sc, RNG_DATA, dest, + bcm2835_rng_read_multi4(sc, sc->conf->data_reg, dest, num_words); dest += num_words; nread += num_words; } - cnt = nread * sizeof(uint32_t); - if (cnt > 0) - random_harvest_queue(sc->sc_buf, cnt, RANDOM_PURE_BROADCOM); + bcm2835_rng_enqueue_harvest(sc, nread); callout_reset(&sc->sc_rngto, RNG_CALLOUT_TICKS, bcm2835_rng_harvest, sc); } @@ -347,7 +433,7 @@ bcm2835_rng_probe(device_t dev) if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) return (ENXIO); - device_set_desc(dev, "Broadcom BCM2835 RNG"); + device_set_desc(dev, "Broadcom BCM2835/BCM2838 RNG"); return (BUS_PROBE_DEFAULT); } @@ -363,13 +449,18 @@ bcm2835_rng_attach(device_t dev) error = 0; sc = device_get_softc(dev); sc->sc_dev = dev; + + sc->conf = (void const*)ofw_bus_search_compatible(dev, compat_data)->ocd_data; + KASSERT(sc->conf != NULL, ("bcm2835_rng_attach: sc->conf == NULL")); + sc->sc_stall_count = RNG_STALL_COUNT_DEFAULT; /* Initialize callout */ callout_init(&sc->sc_rngto, CALLOUT_MPSAFE); - TUNABLE_INT_FETCH("bcmrng.2xspeed", &sc->sc_rbg2x); TUNABLE_INT_FETCH("bcmrng.stall_count", &sc->sc_stall_count); + if (sc->conf->allow_2x_mode) + TUNABLE_INT_FETCH("bcmrng.2xspeed", &sc->sc_rbg2x); /* Allocate memory resources */ rid = 0; @@ -402,9 +493,10 @@ bcm2835_rng_attach(device_t dev) SYSCTL_ADD_LONG(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), OID_AUTO, "underrun", CTLFLAG_RD, &sc->sc_underrun, "Number of FIFO underruns"); - SYSCTL_ADD_PROC(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), OID_AUTO, - "2xspeed", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, - sysctl_bcm2835_rng_2xspeed, "I", "Enable RBG 2X SPEED"); + if (sc->conf->allow_2x_mode) + SYSCTL_ADD_PROC(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), OID_AUTO, + "2xspeed", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, + sysctl_bcm2835_rng_2xspeed, "I", "Enable RBG 2X SPEED"); SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), OID_AUTO, "stall_count", CTLFLAG_RW, &sc->sc_stall_count, RNG_STALL_COUNT_DEFAULT, "Number of underruns to assume RNG stall"); @@ -414,7 +506,7 @@ bcm2835_rng_attach(device_t dev) sysctl_bcm2835_rng_dump, "S", "Dump RNG registers"); #endif - /* + /* * Schedule the initial harvesting one second from now, which should give the * hardware RNG plenty of time to generate the first random bytes. */ From owner-dev-commits-src-main@freebsd.org Sat Mar 6 12:44:15 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0030556667F for ; Sat, 6 Mar 2021 12:44:15 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dt46k6cyJz3s0q; Sat, 6 Mar 2021 12:44:14 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from comporellon.tachypleus.net (unknown [IPv6:2601:405:4a00:acd:505:9a8d:4e89:d6f5]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: nwhitehorn/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id B8D6423A9B; Sat, 6 Mar 2021 12:44:14 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Subject: Re: git: e77cf2a4ab32 - main - Restore /boot/efi to mtree. To: Mark Millard , dev-commits-src-main@freebsd.org References: <656E3D05-11B6-437B-B171-4894811A70CB@yahoo.com> From: Nathan Whitehorn Message-ID: Date: Sat, 6 Mar 2021 07:44:13 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2021 12:44:15 -0000 On 3/6/21 4:43 AM, Mark Millard wrote: > On 2021-Mar-6, at 01:01, Mark Millard wrote: > >> On 2021-Mar-5, at 22:05, Mark Millard wrote: >>> Nathan Whitehorn nwhitehorn at FreeBSD.org wrote on >>> Sat Mar 6 02:01:30 UTC 2021 : >>> >>>> Restore /boot/efi to mtree. >>>> >>>> Instead of whether /boot/efi exists, which it now always does, including >>>> on systems that don't and can't use EFI, use whether /boot/efi is >>>> present in fstab to signal to the installer that it is a valid ESP and >>>> should be configured. This has essentially the same semantics, but allows >>>> /boot/efi to be created unconditionally. >>>> >>> Sounds like the documentation about /etc/fstab content >>> should indicate the special/reserved /boot/efi usage >>> context, be that comments in initial default files or >>> whatever. >>> >>> I wonder if anyone puts / at the end in an fstab: /boot/efi/ >>> >> I tried using a trailing / in /etc/fstab and it is >> one place were the notational variation is not >> equivalent: I had to remove it. >> > FYI: > > Reviewing/adjusting my /etc/fstab files I notice that > I have examples with things like: > > /dev/label/Rock64boot /boot/efi msdosfs rw,noatime,noauto 0 0 > > #/dev/msdosfs/RPI4EFIFS /boot/efi msdosfs rw,noatime,noauto 0 0 > > Some might have a space after the #, shifting the > /boot/efi to be at $3 ? Some /etc/fstab files have both > types of /boot/efi lines (commented vs. uncommented), > associated with root-file-system-media that I move > between machines sometimes and toggle what is commented > (changing what media ends up referenced). > This change *only* applies to boot partitions created by the installer, which have a well-known (to the installer) and controlled format. As you note, though, there are a variety of ways someone could write this in their fstab, which makes this approach tricky for updating, and is why I originally preferred the simpler method of seeing whether the mountpoint existed. -Nathan From owner-dev-commits-src-main@freebsd.org Sat Mar 6 14:01:39 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4039C568C61; Sat, 6 Mar 2021 14:01:39 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dt5r31Jzmz4QlS; Sat, 6 Mar 2021 14:01:39 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from Ryans-MBP.attlocal.net (unknown [IPv6:2600:1700:358a:c660:68aa:d6bf:9070:399b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: freqlabs/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id D2ED92456B; Sat, 6 Mar 2021 14:01:38 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Subject: Re: git: c4ba4aa54718 - main - libifconfig: Overhaul ifconfig_media_* interfaces To: Kristof Provost , Mark Johnston Cc: Ryan Moeller , Konstantin Belousov , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202103051123.125BNubR059014@gitrepo.freebsd.org> <20c6efb4-8b57-ae78-3808-b49b07ac284d@FreeBSD.org> From: Ryan Moeller Message-ID: Date: Sat, 6 Mar 2021 09:01:37 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2021 14:01:39 -0000 On 3/6/21 4:07 AM, Kristof Provost wrote: > > On 5 Mar 2021, at 20:44, Mark Johnston wrote: > > On Fri, Mar 05, 2021 at 02:40:29PM -0500, Ryan Moeller wrote: > > On 3/5/21 1:19 PM, Konstantin Belousov wrote: > > On Fri, Mar 05, 2021 at 11:23:56AM +0000, Ryan Moeller wrote: > > The branch main has been updated by freqlabs: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=c4ba4aa547184ab401204096cdad9def4ab37964 > > > commit c4ba4aa547184ab401204096cdad9def4ab37964 > Author: Ryan Moeller > AuthorDate: 2021-03-02 10:29:17 +0000 > Commit: Ryan Moeller > CommitDate: 2021-03-05 09:15:55 +0000 > > libifconfig: Overhaul ifconfig_media_* interfaces > > Define an ifmedia_t type to use for ifmedia words. > > Add ifconfig_media_lookup_* functions to lookup > ifmedia words by name. > > Get media options as an array of option names rather > than formatting it > as a comma-delimited list into a buffer. > > Sprinkle const on static the static description tables > for peace of > mind. > > Don't need to zero memory allocated by calloc. > > Reviewed by: kp > MFC after: 2 weeks > Differential Revision: > https://reviews.freebsd.org/D29029 > > --- > lib/libifconfig/Makefile | 2 +- > lib/libifconfig/Symbol.map | 9 +- > lib/libifconfig/libifconfig.h | 69 +++++++- > lib/libifconfig/libifconfig_media.c | 339 > ++++++++++++++++++++++++------------ > share/examples/libifconfig/status.c | 27 ++- > 5 files changed, 324 insertions(+), 122 deletions(-) > > diff --git a/lib/libifconfig/Makefile > b/lib/libifconfig/Makefile > index 73dad36c1dc5..c6f006018427 100644 > --- a/lib/libifconfig/Makefile > +++ b/lib/libifconfig/Makefile > @@ -7,7 +7,7 @@ INTERNALLIB= true > LIBADD= m > > SHLIBDIR?= /lib > -SHLIB_MAJOR= 1 > +SHLIB_MAJOR= 2 > > VERSION_DEF= ${LIBCSRCDIR}/Versions.def > SYMBOL_MAPS= ${.CURDIR}/Symbol.map > > libifconfig is marked as internal, but we provide symbol > versioning for it, > and do it in the normal FreeBSD namespace. On one hand, > our policy is to > not bump symvered libs and to provide binary compat shims > as needed, on the > other, this is internal lib. > > What is the purpose of maintaining symbol versions for it? > > I have work in progress that changes libifconfig to a private > lib. I'm > not sure why markj@ added the symbol map, but I've been forced to > maintain it for my later changes to work. > > I added it because there was some discussion of making it a public > library, and adding a symbol map was a step towards that. If it is > only > going to be a private library, then there's indeed no reason to > maintain > it. > > Historically it’s been the aspiration (passive voice, because while > these have been my hopes I’ve not done any of the work) to make this a > public library, so e.g. appliance vendors could have a better way to > configure the system than doing |system(“ifconfig em0 10.0.0.1/24”);|. > Libifconfig is making progress thanks to Ryan’s work, but it’s not yet > ready for that sort of use. > > Given that, it makes sense to keep it as an internal library for now, > and breaking the API is fine. I still hope that we’ll get it to the > point where it’ll be ready for public consumption (with stable API). > > So I think the symbol map is mostly aspirational right now. If it’s a > maintenance burden I guess we can remove it, and re-add it when the > time comes. > > Best regards, > Kristof > Speaking for myself, I don't find it too much of a burden to keep on top of Symbol.map, but it does feel awkward bumping SHLIB_MAJOR if I don't have to. If it's not necessary to do so for a private library then I will gladly keep it at 2 or even drop it back to 1 if that is preferred while I'm still fleshing out the API. I do have the library switched from internal to private in my local branch so it can be shared with the libifconfig bindings for flua that I've been keeping in sync with the library. From owner-dev-commits-src-main@freebsd.org Sat Mar 6 14:44:57 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C89C7569D4C; Sat, 6 Mar 2021 14:44:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dt6p159bhz4SyQ; Sat, 6 Mar 2021 14:44:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A05D725600; Sat, 6 Mar 2021 14:44:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 126EivVX023214; Sat, 6 Mar 2021 14:44:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 126Eivsp023213; Sat, 6 Mar 2021 14:44:57 GMT (envelope-from git) Date: Sat, 6 Mar 2021 14:44:57 GMT Message-Id: <202103061444.126Eivsp023213@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Tai-hwa Liang Subject: git: 092f3f081265 - main - net: fixing a memory leak in if_deregister_com_alloc() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: avatar X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 092f3f081265c68cd8de0234ba8e46560ccc061e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2021 14:44:57 -0000 The branch main has been updated by avatar: URL: https://cgit.FreeBSD.org/src/commit/?id=092f3f081265c68cd8de0234ba8e46560ccc061e commit 092f3f081265c68cd8de0234ba8e46560ccc061e Author: Tai-hwa Liang AuthorDate: 2021-03-06 14:36:35 +0000 Commit: Tai-hwa Liang CommitDate: 2021-03-06 14:43:16 +0000 net: fixing a memory leak in if_deregister_com_alloc() Drain the callbacks upon if_deregister_com_alloc() such that the if_com_free[type] won't be nullified before if_destroy(). Taking fwip(4) as an example, before this fix, kldunload if_fwip will go through the following: 1. fwip_detach() 2. if_free() -> schedule if_destroy() through NET_EPOCH_CALL 3. fwip_detach() returns 4. firewire_modevent(MOD_UNLOAD) -> if_deregister_com_alloc() 5. kernel complains about: Warning: memory type fw_com leaked memory on destroy (1 allocations, 64 bytes leaked). 6. EPOCH runs if_destroy() -> if_free_internal()i By this time, if_com_free[if_alloctype] is NULL since it's already nullified by if_deregister_com_alloc(); hence, firewire_free() won't have a chance to release the allocated fw_com. Reviewed by: hselasky, glebius MFC after: 2 weeks --- sys/net/if.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/net/if.c b/sys/net/if.c index 9d5e9e26b4bb..86c60cfcfa7f 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -4055,6 +4055,14 @@ if_deregister_com_alloc(u_char type) ("if_deregister_com_alloc: %d not registered", type)); KASSERT(if_com_free[type] != NULL, ("if_deregister_com_alloc: %d free not registered", type)); + + /* + * Ensure all pending EPOCH(9) callbacks have been executed. This + * fixes issues about late invocation of if_destroy(), which leads + * to memory leak from if_com_alloc[type] allocated if_l2com. + */ + epoch_drain_callbacks(net_epoch_preempt); + if_com_alloc[type] = NULL; if_com_free[type] = NULL; } From owner-dev-commits-src-main@freebsd.org Sat Mar 6 17:45:36 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0F49656DAF1; Sat, 6 Mar 2021 17:45:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DtBpR72cDz4cVx; Sat, 6 Mar 2021 17:45:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E076C2744D; Sat, 6 Mar 2021 17:45:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 126HjZwp061278; Sat, 6 Mar 2021 17:45:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 126HjZT4061277; Sat, 6 Mar 2021 17:45:35 GMT (envelope-from git) Date: Sat, 6 Mar 2021 17:45:35 GMT Message-Id: <202103061745.126HjZT4061277@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bryan Drewery Subject: git: eb8bf6bb4204 - main - Fix 'make bmake' top-level bootstrapping. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bdrewery X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: eb8bf6bb4204c302e2329b68c8a930be5d44bc9c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2021 17:45:36 -0000 The branch main has been updated by bdrewery: URL: https://cgit.FreeBSD.org/src/commit/?id=eb8bf6bb4204c302e2329b68c8a930be5d44bc9c commit eb8bf6bb4204c302e2329b68c8a930be5d44bc9c Author: Bryan Drewery AuthorDate: 2021-03-06 17:45:08 +0000 Commit: Bryan Drewery CommitDate: 2021-03-06 17:45:08 +0000 Fix 'make bmake' top-level bootstrapping. Fixes: ee10666327b62 --- Makefile | 2 +- usr.bin/bmake/Makefile.inc | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 1a1739acb0fe..3b37b7e1f669 100644 --- a/Makefile +++ b/Makefile @@ -458,7 +458,7 @@ MMAKE= ${MMAKEENV} ${MAKE} \ OBJTOP=${MYMAKE:H}/obj \ OBJROOT='$${OBJTOP}/' \ MAKEOBJDIRPREFIX= \ - MAN= -DNO_SHARED \ + MK_MAN=no -DNO_SHARED \ -DNO_CPU_CFLAGS MK_WERROR=no \ -DNO_SUBDIR \ DESTDIR= PROGNAME=${MYMAKE:T} diff --git a/usr.bin/bmake/Makefile.inc b/usr.bin/bmake/Makefile.inc index 9960f0ceeb2d..8e10a654a754 100644 --- a/usr.bin/bmake/Makefile.inc +++ b/usr.bin/bmake/Makefile.inc @@ -9,9 +9,11 @@ .if exists(${.CURDIR}/tests) PROG= make +.if ${PROGNAME:U} != "bmake" LINKS= ${BINDIR}/make ${BINDIR}/bmake MLINKS= ${MAN} b${MAN} .endif +.endif .if !defined(MK_SHARED_TOOLCHAIN) || ${MK_SHARED_TOOLCHAIN} == "no" NO_SHARED?= YES From owner-dev-commits-src-main@freebsd.org Sat Mar 6 20:58:24 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DE372572AF9; Sat, 6 Mar 2021 20:58:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DtH4w5yWCz4qkV; Sat, 6 Mar 2021 20:58:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BB6BB1EB2; Sat, 6 Mar 2021 20:58:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 126KwOw6014350; Sat, 6 Mar 2021 20:58:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 126KwOMT014349; Sat, 6 Mar 2021 20:58:24 GMT (envelope-from git) Date: Sat, 6 Mar 2021 20:58:24 GMT Message-Id: <202103062058.126KwOMT014349@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Edward Tomasz Napierala Subject: git: cd84c82c6ad7 - main - linux: add support for SO_PEERGROUPS MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: trasz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cd84c82c6ad73c804b828bad9caec176e41ab79d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2021 20:58:24 -0000 The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=cd84c82c6ad73c804b828bad9caec176e41ab79d commit cd84c82c6ad73c804b828bad9caec176e41ab79d Author: Edward Tomasz Napierala AuthorDate: 2021-02-07 21:29:32 +0000 Commit: Edward Tomasz Napierala CommitDate: 2021-03-06 19:48:58 +0000 linux: add support for SO_PEERGROUPS The su(8) and sudo(8) from Ubuntu Bionic use it. Sponsored By: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28165 --- sys/compat/linux/linux_socket.c | 46 ++++++++++++++++++++++++++++++++++++++++- sys/compat/linux/linux_socket.h | 1 + 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/sys/compat/linux/linux_socket.c b/sys/compat/linux/linux_socket.c index a4c5bf0b581e..e9f95098a407 100644 --- a/sys/compat/linux/linux_socket.c +++ b/sys/compat/linux/linux_socket.c @@ -1863,6 +1863,43 @@ linux_setsockopt(struct thread *td, struct linux_setsockopt_args *args) return (error); } +static int +linux_getsockopt_so_peergroups(struct thread *td, + struct linux_getsockopt_args *args) +{ + struct xucred xu; + socklen_t xulen, len; + int error, i; + + xulen = sizeof(xu); + error = kern_getsockopt(td, args->s, 0, + LOCAL_PEERCRED, &xu, UIO_SYSSPACE, &xulen); + if (error != 0) + return (error); + + len = xu.cr_ngroups * sizeof(l_gid_t); + if (args->optlen < len) { + error = copyout(&len, PTRIN(args->optlen), sizeof(len)); + if (error == 0) + error = ERANGE; + return (error); + } + + /* + * "- 1" to skip the primary group. + */ + for (i = 0; i < xu.cr_ngroups - 1; i++) { + error = copyout(xu.cr_groups + i + 1, + (void *)(args->optval + i * sizeof(l_gid_t)), + sizeof(l_gid_t)); + if (error != 0) + return (error); + } + + error = copyout(&len, PTRIN(args->optlen), sizeof(len)); + return (error); +} + static int linux_getsockopt_so_peersec(struct thread *td, struct linux_getsockopt_args *args) @@ -1899,8 +1936,15 @@ linux_getsockopt(struct thread *td, struct linux_getsockopt_args *args) level = linux_to_bsd_sockopt_level(args->level); switch (level) { case SOL_SOCKET: - if (args->optname == LINUX_SO_PEERSEC) + switch (args->optname) { + case LINUX_SO_PEERGROUPS: + return (linux_getsockopt_so_peergroups(td, args)); + case LINUX_SO_PEERSEC: return (linux_getsockopt_so_peersec(td, args)); + default: + break; + } + name = linux_to_bsd_so_sockopt(args->optname); switch (name) { case LOCAL_CREDS_PERSISTENT: diff --git a/sys/compat/linux/linux_socket.h b/sys/compat/linux/linux_socket.h index 32a19a348312..398f184c5e81 100644 --- a/sys/compat/linux/linux_socket.h +++ b/sys/compat/linux/linux_socket.h @@ -199,6 +199,7 @@ int linux_accept(struct thread *td, struct linux_accept_args *args); #define LINUX_SO_SNDBUFFORCE 32 #define LINUX_SO_RCVBUFFORCE 33 #define LINUX_SO_PROTOCOL 38 +#define LINUX_SO_PEERGROUPS 59 /* Socket options */ #define LINUX_IP_TOS 1 From owner-dev-commits-src-main@freebsd.org Sat Mar 6 21:47:32 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AED80573B20; Sat, 6 Mar 2021 21:47:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DtJ9c4YxNz4t15; Sat, 6 Mar 2021 21:47:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8F71828CB; Sat, 6 Mar 2021 21:47:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 126LlWjq079867; Sat, 6 Mar 2021 21:47:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 126LlWMl079866; Sat, 6 Mar 2021 21:47:32 GMT (envelope-from git) Date: Sat, 6 Mar 2021 21:47:32 GMT Message-Id: <202103062147.126LlWMl079866@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brandon Bergren Subject: git: bad9fa56620e - main - [PowerPC] Fix AP bringup on 32-bit AIM SMP MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bdragon X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bad9fa56620eb82395c5ab66d300e91a0222dde2 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2021 21:47:32 -0000 The branch main has been updated by bdragon: URL: https://cgit.FreeBSD.org/src/commit/?id=bad9fa56620eb82395c5ab66d300e91a0222dde2 commit bad9fa56620eb82395c5ab66d300e91a0222dde2 Author: Brandon Bergren AuthorDate: 2021-03-06 21:26:16 +0000 Commit: Brandon Bergren CommitDate: 2021-03-06 21:46:28 +0000 [PowerPC] Fix AP bringup on 32-bit AIM SMP In r361544, the pmap drivers were converted to ifuncs. When doing so, this changed the call type of pmap functions to be called via the secure-plt stubs. These stubs depend on the TOC base being loaded to r30 to run properly. On SMP AIM (i.e. a dual processor G4 or running 32-bit on G5), since the APs were being started up from the reset vector instead of going through __start, they had never had r30 initialized properly, so when the cpu_reset code in trap_subr32.S attempted to branch to pmap_cpu_bootstrap(), it was loading the target from the wrong location. Ensure r30 is set up directly in the cpu_reset trap code, so we can make PLT calls as normal. Fixes boot on my SMP G4. Reviewed by: jhibbits MFC after: 3 days Sponsored by: Tag1 Consulting, Inc. --- sys/powerpc/aim/trap_subr32.S | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/powerpc/aim/trap_subr32.S b/sys/powerpc/aim/trap_subr32.S index 710a222fd84c..9664dcc92d2d 100644 --- a/sys/powerpc/aim/trap_subr32.S +++ b/sys/powerpc/aim/trap_subr32.S @@ -316,6 +316,7 @@ cpu_reset: 1: mflr %r1 addi %r1,%r1,(124-16)@l + lwz %r30,TRAP_TOCBASE(0) bl CNAME(cpudep_ap_early_bootstrap) lis %r3,1@l From owner-dev-commits-src-main@freebsd.org Sun Mar 7 00:31:12 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ABB485778BD; Sun, 7 Mar 2021 00:31:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DtMpS4W4Fz3JqK; Sun, 7 Mar 2021 00:31:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8DB5E4B41; Sun, 7 Mar 2021 00:31:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1270VCoR098626; Sun, 7 Mar 2021 00:31:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1270VCPq098625; Sun, 7 Mar 2021 00:31:12 GMT (envelope-from git) Date: Sun, 7 Mar 2021 00:31:12 GMT Message-Id: <202103070031.1270VCPq098625@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Murray Subject: git: cc011d871957 - main - Remove the never-installed setchannel(1) utility. It only work(s|ed) with the never-committed cxm(4) driver and the now-removed bktr(4) driver. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cc011d87195798c0c279eb4486795f0a1ee7ad7f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Mar 2021 00:31:12 -0000 The branch main has been updated by markm: URL: https://cgit.FreeBSD.org/src/commit/?id=cc011d87195798c0c279eb4486795f0a1ee7ad7f commit cc011d87195798c0c279eb4486795f0a1ee7ad7f Author: Mark Murray AuthorDate: 2021-03-06 23:07:04 +0000 Commit: Mark Murray CommitDate: 2021-03-07 00:06:42 +0000 Remove the never-installed setchannel(1) utility. It only work(s|ed) with the never-committed cxm(4) driver and the now-removed bktr(4) driver. --- usr.bin/setchannel/Makefile | 5 - usr.bin/setchannel/Makefile.depend | 15 -- usr.bin/setchannel/setchannel.1 | 104 -------------- usr.bin/setchannel/setchannel.c | 287 ------------------------------------- 4 files changed, 411 deletions(-) diff --git a/usr.bin/setchannel/Makefile b/usr.bin/setchannel/Makefile deleted file mode 100644 index 0ffb33078592..000000000000 --- a/usr.bin/setchannel/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -# $FreeBSD$ - -PROG= setchannel - -.include diff --git a/usr.bin/setchannel/Makefile.depend b/usr.bin/setchannel/Makefile.depend deleted file mode 100644 index c729e17c52db..000000000000 --- a/usr.bin/setchannel/Makefile.depend +++ /dev/null @@ -1,15 +0,0 @@ -# $FreeBSD$ -# Autogenerated - do NOT edit! - -DIRDEPS = \ - include \ - include/xlocale \ - lib/${CSU_DIR} \ - lib/libc \ - - -.include - -.if ${DEP_RELDIR} == ${_DEP_RELDIR} -# local dependencies - needed for -jN in clean tree -.endif diff --git a/usr.bin/setchannel/setchannel.1 b/usr.bin/setchannel/setchannel.1 deleted file mode 100644 index 604b7e315541..000000000000 --- a/usr.bin/setchannel/setchannel.1 +++ /dev/null @@ -1,104 +0,0 @@ -.\"- -.\" Copyright (C) 2004-2006 The FreeBSD Project. 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 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 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. -.\" -.\" $Id: cxm.4,v 1.1 2004/10/16 00:12:35 mavetju Exp $ -.\" $FreeBSD$ -.\" -.Dd November 30, 2006 -.Dt PVR250-SETCHANNEL 1 -.Os -.Sh NAME -.Nm pvr250-setchannel -.Nd Hauppage PVR250/350 channel selector -.Sh SYNOPSIS -.Cd pvr250-setchannel [-a {on | off}] [-c | -r | -s | -t] [-g geom] [-m channel_set] [channel | freq] -.Sh DESCRIPTION -.Nm -provides support for selecting channels on Hauppauge WinTV cards, -including the PVR 150, PVR 250, PVR 350 and PVR 500. -.Pp -The following options are available: -.Bl -tag -width indent -.It Fl a Cm on -Enable AFC. -.It Fl a Cm off -Disable AFC. -.It Fl c -Select composite input. -.It Fl d -Select the tuner unit number. -This is appended to the base device file name -.Pa /dev/cxm -to form a device name such as -.Pa /dev/cxm0 -or -.Pa /dev/cxm1 . -.It Fl r -Select radio input. -.It Fl s -Select svideo input. -.It Fl t -Select tuner. -.It Fl g Cm geom -Select geometry. -The first resolution is for NTSC, the second for PAL. -.Pp - VCD: 352x240 or 352x288 - SVCD: 480x480 or 480x576 - DVD (half D1): 352x480 or 352x576 - DVD (full D1): 720x480 or 720x576 -.It Fl m Cm channel-set -Select channel set and system. -.Pp - 0 = Tuner Default - 1 = US Broadcast (NTSC) - 2 = US Cable (NTSC) - 4 = Western Europe (PAL) - 5 = Japan Broadcast (NTSC) - 6 = Japan Cable (NTSC) - 8 = Australia (PAL) - 9 = France (SECAM) -.It Cm channel -Channel number to set. -.It Cm freq -Frequency in MHz (must include decimal point). -.El -.Sh SEE ALSO -.Xr bktr 4 , -.Xr cxm 4 , -.Xr meteor 4 -.Sh HISTORY -The -.Nm -program first appeared in the -multimedia mailing-list in January 2004. -The -.Nm -program first appeared in the FreeBSD Ports collection in October 2004. -.Sh AUTHORS -.An -nosplit -This program is made by -.An John Wehle -.Pp -This man page is made by -.An Edwin Groothuis diff --git a/usr.bin/setchannel/setchannel.c b/usr.bin/setchannel/setchannel.c deleted file mode 100644 index a229290c864a..000000000000 --- a/usr.bin/setchannel/setchannel.c +++ /dev/null @@ -1,287 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-2-Clause-FreeBSD - * - * Copyright (c) 2003, 2004, 2005 - * John Wehle . 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 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 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$ - */ - -/* Set the channel of the tuner card. */ - -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -static void -usage(void) -{ - printf - ("Usage: setchannel [-a {on|off}] [-c | -r | -s | -t] " - "[-g geom] [-m chnl_set] [chnl | freq]\n" - " -a Enable / disable AFC.\n" - " -c Select composite input.\n" - " -d Select tuner unit number.\n" - " -r Select radio input.\n" - " -s Select svideo input.\n" - " -t Select tuner.\n" - " -g Select geometry.\n" - " 352x240 or 352x288 = VCD\n" - " 480x480 or 480x576 = SVCD\n" - " 352x480 or 352x576 = DVD (half D1)\n" - " 720x480 or 720x576 = DVD (full D1)\n" - " -m Select channel set / system.\n" - " 0 = Tuner Default\n" - " %u = US Broadcast / NTSC\n" - " %u = US Cable / NTSC\n" - " %u = Western Europe / PAL\n" - " %u = Japan Broadcast / NTSC\n" - " %u = Japan Cable / NTSC\n" - " %u = Australia / PAL\n" - " %u = France / SECAM\n" - " chnl Channel\n" - " freq Frequency in MHz (must include decimal point).\n", - CHNLSET_NABCST, CHNLSET_CABLEIRC, CHNLSET_WEUROPE, CHNLSET_JPNBCST, - CHNLSET_JPNCABLE, CHNLSET_AUSTRALIA, CHNLSET_FRANCE); -} - -#define DEVNAME_BASE "/dev/cxm" -char dev_name[16]; - -int -main(int argc, char *argv[]) -{ - char *ptr; - char *endptr; - int afc; - int audio; - int c; - int channel_set; - int i; - int status; - int unit; - int tfd; - unsigned int channel; - unsigned int fraction; - unsigned int freq; - unsigned int x_size; - unsigned int y_size; - unsigned long device; - struct bktr_capture_area cap; - - afc = -1; - audio = -1; - channel = 0; - channel_set = -1; - device = 0; - freq = 0; - status = 0; - unit = 0; - x_size = 0; - y_size = 0; - - while ((c = getopt(argc, argv, "a:cd:rg:m:st")) != -1) - switch (c) { - - case 'a': - if (strcasecmp(optarg, "on") == 0) - afc = 1; - else if (strcasecmp(optarg, "off") == 0) - afc = 0; - else { - usage(); - exit(1); - } - break; - - case 'c': - device = METEOR_INPUT_DEV2; - audio = -1; - break; - - case 'd': - unit = atoi(optarg); - break; - - case 'r': - device = 0; - audio = AUDIO_INTERN; - break; - - case 's': - device = METEOR_INPUT_DEV_SVIDEO; - audio = -1; - break; - - case 't': - device = METEOR_INPUT_DEV1; - audio = -1; - break; - - case 'g': - if (sscanf(optarg, "%ux%u", &x_size, &y_size) != 2 - || x_size == 0 || y_size == 0) { - usage(); - exit(1); - } - break; - - case 'm': - channel_set = atoi(optarg); - if (channel_set < 0 || channel_set > CHNLSET_MAX) { - usage(); - exit(1); - } - break; - - default: - usage(); - exit(1); - } - - if (optind < argc) { - - /* - * A number containing a decimal point is the frequency in MHz. - */ - - if ((ptr = strchr(argv[optind], '.')) != NULL) { - freq = strtol(argv[optind], &endptr, 10) * 1000; - if (ptr != endptr) { - usage(); - exit(1); - } - - ptr++; - - fraction = strtol(ptr, &endptr, 10); - if (!isdigit(*ptr) || *endptr != '\0') { - usage(); - exit(1); - } - - for (i = endptr - ptr; i > 3; i--) - fraction /= 10; - for (; i < 3; i++) - fraction *= 10; - - freq += fraction; - } - - /* An integer is the channel. */ - else - channel = atoi(argv[optind]); - } - - if (afc == -1 && audio == -1 && !device && x_size == 0 && y_size == 0 - && channel_set == -1 && !channel && !freq) { - usage(); - exit(1); - } - - sprintf(dev_name, DEVNAME_BASE "%d", unit); - tfd = open(dev_name, O_RDONLY); - if (tfd < 0) { - fprintf(stderr, "Can't open %s: %s (%d)\n", dev_name, - strerror(errno), errno); - exit(1); - } - - if (afc != -1) - if (ioctl(tfd, TVTUNER_SETAFC, &afc) < 0) { - perror("ioctl(tfd, TVTUNER_SETAFC) failed."); - status = 1; - } - - if (device) - if (ioctl(tfd, METEORSINPUT, &device) < 0) { - perror("ioctl(tfd, METEORSINPUT) failed."); - status = 1; - } - - if (audio != -1) - if (ioctl(tfd, BT848_SAUDIO, &audio) < 0) { - perror("ioctl(tfd, BT848_SAUDIO) failed."); - status = 1; - } - - if (ioctl(tfd, BT848_GAUDIO, &audio) < 0) { - perror("ioctl(tfd, BT848_GAUDIO) failed."); - status = 1; - } - - if (x_size && y_size) { - memset(&cap, 0, sizeof(cap)); - cap.x_size = x_size; - cap.y_size = y_size; - if (ioctl(tfd, BT848_SCAPAREA, &cap) < 0) { - perror("ioctl(tfd, BT848_SCAPAREA) failed."); - status = 1; - } - } - - if (channel_set != -1) - if (ioctl(tfd, TVTUNER_SETTYPE, &channel_set) < 0) { - perror("ioctl(tfd, TVTUNER_SETTYPE) failed."); - status = 1; - } - - if (channel) { - if (ioctl(tfd, TVTUNER_SETCHNL, &channel) < 0) { - perror("ioctl(tfd, TVTUNER_SETCHNL) failed."); - status = 1; - } - } else if (freq) { - if (audio == AUDIO_INTERN) { - /* Convert from kHz to MHz * 100 */ - freq = freq / 10; - - if (ioctl(tfd, RADIO_SETFREQ, &freq) < 0) { - perror("ioctl(tfd, RADIO_SETFREQ) failed."); - status = 1; - } - } else { - /* Convert from kHz to MHz * 16 */ - freq = (freq * 16) / 1000; - - if (ioctl(tfd, TVTUNER_SETFREQ, &freq) < 0) { - perror("ioctl(tfd, TVTUNER_SETFREQ) failed."); - status = 1; - } - } - } - - close(tfd); - exit(status); -} From owner-dev-commits-src-main@freebsd.org Sun Mar 7 00:31:13 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EB4BB5777E7; Sun, 7 Mar 2021 00:31:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DtMpT57V7z3Jn5; Sun, 7 Mar 2021 00:31:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A3A0E4AEE; Sun, 7 Mar 2021 00:31:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1270VDRw098646; Sun, 7 Mar 2021 00:31:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1270VDLF098645; Sun, 7 Mar 2021 00:31:13 GMT (envelope-from git) Date: Sun, 7 Mar 2021 00:31:13 GMT Message-Id: <202103070031.1270VDLF098645@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Murray Subject: git: fbf8e3245201 - main - Remove references to the now-removed bktr(4) driver. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fbf8e32452016cf83be4288c41811d9e125dbcbe Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Mar 2021 00:31:14 -0000 The branch main has been updated by markm: URL: https://cgit.FreeBSD.org/src/commit/?id=fbf8e32452016cf83be4288c41811d9e125dbcbe commit fbf8e32452016cf83be4288c41811d9e125dbcbe Author: Mark Murray AuthorDate: 2021-03-06 23:15:09 +0000 Commit: Mark Murray CommitDate: 2021-03-07 00:09:22 +0000 Remove references to the now-removed bktr(4) driver. --- share/examples/etc/make.conf | 2 +- share/man/man4/iicbus.4 | 4 +--- share/man/man4/smbus.4 | 6 ++---- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/share/examples/etc/make.conf b/share/examples/etc/make.conf index a7afe4d8b6eb..bd8ca5d2cb4c 100644 --- a/share/examples/etc/make.conf +++ b/share/examples/etc/make.conf @@ -135,7 +135,7 @@ #MODULES_OVERRIDE= linux ipfw # # The list of modules to never build, applied *after* MODULES_OVERRIDE. -#WITHOUT_MODULES= bktr plip +#WITHOUT_MODULES= plip # # If you do not want unformatted manual pages to be compressed # when they are installed: diff --git a/share/man/man4/iicbus.4 b/share/man/man4/iicbus.4 index 698a7897c84a..b96e6eb2ab9b 100644 --- a/share/man/man4/iicbus.4 +++ b/share/man/man4/iicbus.4 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 15, 2017 +.Dd March 7, 2021 .Dt IICBUS 4 .Os .Sh NAME @@ -101,7 +101,6 @@ Some I2C interfaces are available: .It Sy pcf Ta "Philips PCF8584 master/slave interface" .It Sy iicbb Ta "generic bit-banging master-only driver" .It Sy lpbb Ta "parallel port specific bit-banging interface" -.It Sy bktr Ta "Brooktree848 video chipset, hardware and software master-only interface" .El .Sh BUS FREQUENCY CONFIGURATION The operating frequency of an I2C bus may be fixed or configurable. @@ -149,7 +148,6 @@ or the .Va I2CRSTCARD ioctl to make the change take effect. .Sh SEE ALSO -.Xr bktr 4 , .Xr fdt 4 , .Xr iic 4 , .Xr iicbb 4 , diff --git a/share/man/man4/smbus.4 b/share/man/man4/smbus.4 index 1d23117f0ac6..1a117d52fd8a 100644 --- a/share/man/man4/smbus.4 +++ b/share/man/man4/smbus.4 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 10, 1998 +.Dd March 7, 2021 .Dt SMBUS 4 .Os .Sh NAME @@ -34,13 +34,12 @@ .Cd "device smbus" .Pp .Cd "device iicsmb" -.Cd "device bktr" .Sh DESCRIPTION The .Em smbus system provides a uniform, modular and architecture-independent system for the implementation of drivers to control various SMB devices -and to utilize different SMB controllers (I2C, PIIX4, Brooktree848, vm86...). +and to utilize different SMB controllers (I2C, PIIX4, vm86...). .Sh System Management Bus The .Em System Management Bus @@ -61,7 +60,6 @@ The SMBus may share the same host device and physical bus as ACCESS bus components provided that an appropriate electrical bridge is provided between the internal SMB devices and external ACCESS bus devices. .Sh SEE ALSO -.Xr bktr 4 , .Xr iicbus 4 , .Xr iicsmb 4 , .Xr smb 4 From owner-dev-commits-src-main@freebsd.org Sun Mar 7 02:32:26 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0FE0855561D; Sun, 7 Mar 2021 02:32:26 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from mx0a-00273201.pphosted.com (mx0a-00273201.pphosted.com [208.84.65.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.pphosted.com", Issuer "Thawte RSA CA 2018" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DtQVJ4PH9z3jYd; Sun, 7 Mar 2021 02:32:24 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from pps.filterd (m0108156.ppops.net [127.0.0.1]) by mx0a-00273201.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 1272U4df000475; Sat, 6 Mar 2021 18:32:22 -0800 Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2100.outbound.protection.outlook.com [104.47.70.100]) by mx0a-00273201.pphosted.com with ESMTP id 3749murn4n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 06 Mar 2021 18:32:22 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Bpn/NRhsPQgSerQzznv+ZUKvNict8CgVunUywJAxAw8prCNs69JJqYmYSQ53wqo5UAJ+KJecI3QiG5I5iOH8aPo6S0TKKOGeD4fEa2OYLq+Qn7uBmAw8eMa4EIxnT1Klf1sSIYSYYbb1Rzyswst5KjEnuxXdb21Irb5OYctOEb7Hp6ZxhHm1sAfKzM48BkK9LqKLl4lKWXDS0R/jR7hkwp5kWkcAfgf2cGW1svLx1ADG8Jc7YQhFpDaVR/1dl+m4JJbU68/HDm/zu4Fw5mh2iWhLXVCgl6TdQtl0xLXRuLwDQYp9UJ0MKi+hh+MEZXNovIQNPzAJe7Qkpri+HjqNTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mtpGCwEk3NZPSaAx9UNBiX9OGJNaPkm48x5/d53bnK8=; b=Vr9xtmW3+5gl4vGJZ/auLJH+qLUdBFDtB2dlsn4iL3awwC3u/zw9o3dL/oUaNBEMB/yh3XsOvqLYthzgqzuDsiZcZ8KzECIY2/ZKQAAZDhidBg9dmvammSTY9sqTHqi/7pTZbW5WIy6EvVDAOP4IYqKafnjdgZds9/3RvP5inHtXZax0wlBXYQnT1Nli2gKxC5Imcn+Of8HyJzBBDMxKJQpyyQiVuYJ0RHCVxzDVsLzcaT4ppOwRW+TijNHL6KoIa9nE5Z/I5mHPQ1vm0dF0GbHUclGptAU2uhDkCHM90nhBAp81n9PCUdq/KLvOHSW9M+vcQNTEaljTTjZpi4E9Sg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=softfail (sender ip is 66.129.239.12) smtp.rcpttodomain=freebsd.org smtp.mailfrom=juniper.net; dmarc=fail (p=reject sp=reject pct=100) action=oreject header.from=juniper.net; dkim=none (message not signed); arc=none Received: from BN9PR03CA0423.namprd03.prod.outlook.com (2603:10b6:408:113::8) by SA0PR05MB7497.namprd05.prod.outlook.com (2603:10b6:806:b7::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3933.13; Sun, 7 Mar 2021 02:32:20 +0000 Received: from BN8NAM12FT037.eop-nam12.prod.protection.outlook.com (2603:10b6:408:113:cafe::54) by BN9PR03CA0423.outlook.office365.com (2603:10b6:408:113::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3912.17 via Frontend Transport; Sun, 7 Mar 2021 02:32:20 +0000 X-MS-Exchange-Authentication-Results: spf=softfail (sender IP is 66.129.239.12) smtp.mailfrom=juniper.net; freebsd.org; dkim=none (message not signed) header.d=none;freebsd.org; dmarc=fail action=oreject header.from=juniper.net; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning juniper.net discourages use of 66.129.239.12 as permitted sender) Received: from P-EXFEND-EQX-01.jnpr.net (66.129.239.12) by BN8NAM12FT037.mail.protection.outlook.com (10.13.182.128) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.3912.9 via Frontend Transport; Sun, 7 Mar 2021 02:32:20 +0000 Received: from P-EXBEND-EQX-02.jnpr.net (10.104.8.53) by P-EXFEND-EQX-01.jnpr.net (10.104.8.54) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sat, 6 Mar 2021 18:32:19 -0800 Received: from P-EXBEND-EQX-01.jnpr.net (10.104.8.52) by P-EXBEND-EQX-02.jnpr.net (10.104.8.53) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sat, 6 Mar 2021 18:32:19 -0800 Received: from p-mailhub01.juniper.net (10.104.20.6) by P-EXBEND-EQX-01.jnpr.net (10.104.8.52) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Sat, 6 Mar 2021 18:32:19 -0800 Received: from kaos.jnpr.net (kaos.jnpr.net [172.23.255.201]) by p-mailhub01.juniper.net (8.14.4/8.11.3) with ESMTP id 1272WIsw021177; Sat, 6 Mar 2021 18:32:19 -0800 (envelope-from sjg@juniper.net) Received: by kaos.jnpr.net (Postfix, from userid 1377) id 9A0B42F738; Sat, 6 Mar 2021 18:32:18 -0800 (PST) Received: from kaos.jnpr.net (localhost [127.0.0.1]) by kaos.jnpr.net (Postfix) with ESMTP id 987A92F6AA; Sat, 6 Mar 2021 18:32:18 -0800 (PST) To: Warner Losh CC: Nathan Whitehorn , Ed Maste , "Rodney W. Grimes" , Brandon Bergren , src-committers , "" , , Subject: Re: git: 2c26d77d989a - main - Remove /boot/efi from mtree, missed in 0b7472b3d8d2. In-Reply-To: References: <202103021856.122IuYgV048086@gndrsh.dnsmgr.net> <3d947e4c-a529-0b27-a8d7-415600783e53@freebsd.org> Comments: In-reply-to: Warner Losh message dated "Wed, 03 Mar 2021 08:24:05 -0700." From: "Simon J. Gerraty" X-Mailer: MH-E 8.6+git; nmh 1.7.1; GNU Emacs 27.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <91117.1615084338.1@kaos.jnpr.net> Date: Sat, 6 Mar 2021 18:32:18 -0800 Message-ID: <93128.1615084338@kaos.jnpr.net> X-EXCLAIMER-MD-CONFIG: e3cb0ff2-54e7-4646-8a04-0dae4ac7b136 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: aa6161be-1a21-4bbd-c9aa-08d8e1113bae X-MS-TrafficTypeDiagnostic: SA0PR05MB7497: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: I/JxvGpUGDMc66WV8+0XzgBEViC+sPASEmhfzE9s5Jx2eNpH7Tnnx0DCRSzpETk4ReZ0GCq56BK7v8OnFWHOextKXrJVtbLmlzfoyDf086dJbSgTjSXpbZTp1s31oEakGRkV/hAtqNjvzXX9ztaEByfZEML/RV+FlGbHb/m4wjTxL4g6xDmBum0y+nYEqZVSQbRPbZDccNSZQ53PvrA97wn96fCjv6Q9WTOzGOCQXcXktZHyaa2R+6FWEUgozGtiRNITqfdBh5o0uXEz4KwMlGty+9afTpou+VfzRJV2gRcxtoI9F+KcEXQrRWpofmiRYAIvvQy1vVZk3DE7x1jXVPHYQ09UFuLxt+NnkvUgPmLfGGdFrlcnVKQeF0dOGNLQAXMvjLLCNC+neW72LLzx/QaQxcrSXsMh+pwSxISIMbeAVFa6JlmdLi6/eQPr1rjlw9t7wNsCc7r8VMivTVXNjtcXKnjijdSpZch7LxP19V1PruGzYOpSAOjlUbAMUlb/ZEFsRY3DQ83Dl8B4sO41I1t+51lQVcOBMcR8fmsdj2oieH0dcS86PlnyoClJgq7Yh/7wwhC/dqNbhnU36lJKOvV7BvJSAYlR/a75P2UFLyWOXGOt0Axt9PQo31erRhL7IqAyrPuotRN0+R+pkIPYvHZqeAOYq9Am4wncMqc0JVyX/XcSM8FUOirabf7SYIdg X-Forefront-Antispam-Report: CIP:66.129.239.12; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:P-EXFEND-EQX-01.jnpr.net; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(4636009)(136003)(376002)(39860400002)(346002)(396003)(46966006)(36840700001)(7696005)(107886003)(2906002)(5660300002)(70586007)(86362001)(4744005)(82740400003)(54906003)(478600001)(6266002)(82310400003)(26005)(186003)(4326008)(8936002)(36860700001)(8676002)(55016002)(336012)(316002)(356005)(70206006)(9686003)(81166007)(7126003)(47076005)(6916009)(36900700001); DIR:OUT; SFP:1102; X-OriginatorOrg: juniper.net X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Mar 2021 02:32:20.3400 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: aa6161be-1a21-4bbd-c9aa-08d8e1113bae X-MS-Exchange-CrossTenant-Id: bea78b3c-4cdb-4130-854a-1d193232e5f4 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=bea78b3c-4cdb-4130-854a-1d193232e5f4; Ip=[66.129.239.12]; Helo=[P-EXFEND-EQX-01.jnpr.net] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM12FT037.eop-nam12.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR05MB7497 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.369, 18.0.761 definitions=2021-03-06_08:2021-03-03, 2021-03-06 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_spam_notspam policy=outbound_spam score=0 bulkscore=0 spamscore=0 priorityscore=1501 phishscore=0 impostorscore=0 mlxlogscore=828 adultscore=0 suspectscore=0 lowpriorityscore=0 mlxscore=0 clxscore=1011 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2103070014 X-Rspamd-Queue-Id: 4DtQVJ4PH9z3jYd X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.33 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; RBL_DBL_DONT_QUERY_IPS(0.00)[208.84.65.16:from]; R_DKIM_ALLOW(-0.20)[juniper.net:s=PPS1017,juniper.net:s=selector1]; FREEFALL_USER(0.00)[sjg]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:208.84.65.16]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; NEURAL_SPAM_SHORT(0.77)[0.771]; ARC_ALLOW(-1.00)[microsoft.com:s=arcselector9901:i=1]; SPAMHAUS_ZRD(0.00)[208.84.65.16:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[juniper.net:+]; DMARC_POLICY_ALLOW(-0.50)[juniper.net,reject]; RCPT_COUNT_SEVEN(0.00)[9]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:26211, ipnet:208.84.65.0/24, country:US]; RCVD_COUNT_SEVEN(0.00)[11]; MAILMAN_DEST(0.00)[dev-commits-src-all,dev-commits-src-main]; RCVD_IN_DNSWL_LOW(-0.10)[208.84.65.16:from] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Mar 2021 02:32:26 -0000 > The problem here is that the installer needs to know if an ESP has been > made. If /boot/efi is supposed to be the mountpoint for an ESP, its > presence seemed like a reasonable way to signal that. Here are some options: I haven't followed the thread so this may not quite be on point but FWIW in my installer etc, I use `kenv -q efi-version` to know if dealing with EFI. --sjg From owner-dev-commits-src-main@freebsd.org Sun Mar 7 02:51:26 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CCC285561C5; Sun, 7 Mar 2021 02:51:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DtQwG4pv9z3kkZ; Sun, 7 Mar 2021 02:51:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9804A6AB8; Sun, 7 Mar 2021 02:51:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1272pQfd082675; Sun, 7 Mar 2021 02:51:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1272pQb8082674; Sun, 7 Mar 2021 02:51:26 GMT (envelope-from git) Date: Sun, 7 Mar 2021 02:51:26 GMT Message-Id: <202103070251.1272pQb8082674@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jung-uk Kim Subject: git: 2fc640d5bc0a - main - poly1305: Chase xform_poly1305.h removal MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jkim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2fc640d5bc0a17024dc1eb996ab00af42a5c6dbd Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Mar 2021 02:51:26 -0000 The branch main has been updated by jkim: URL: https://cgit.FreeBSD.org/src/commit/?id=2fc640d5bc0a17024dc1eb996ab00af42a5c6dbd commit 2fc640d5bc0a17024dc1eb996ab00af42a5c6dbd Author: Jung-uk Kim AuthorDate: 2021-03-07 02:47:03 +0000 Commit: Jung-uk Kim CommitDate: 2021-03-07 02:47:03 +0000 poly1305: Chase xform_poly1305.h removal It was missed in bb6e84c988d3 and afbee98232f4. --- ObsoleteFiles.inc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 59412729ad7e..8dd33475fe44 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -36,6 +36,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20210305: removed Poly1305_* symbols +OLD_FILES+=usr/include/crypto/xform_poly1305.h + # 20210304: remove old bc and dc support and test files .if !defined(WITHOUT_GH_BC) OLD_FILES+=usr/share/misc/bc.library From owner-dev-commits-src-main@freebsd.org Sun Mar 7 06:29:21 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EA7EB55AF34; Sun, 7 Mar 2021 06:29:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DtWlj6J3Lz4R1J; Sun, 7 Mar 2021 06:29:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CB26311A29; Sun, 7 Mar 2021 06:29:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1276TLDt064698; Sun, 7 Mar 2021 06:29:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1276TLVZ064697; Sun, 7 Mar 2021 06:29:21 GMT (envelope-from git) Date: Sun, 7 Mar 2021 06:29:21 GMT Message-Id: <202103070629.1276TLVZ064697@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Wing Subject: git: 6bb140e3ca89 - main - bhyvectl: print a better error message when vm_open() fails MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6bb140e3ca895a148f32c93d50f93619bf735f73 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Mar 2021 06:29:22 -0000 The branch main has been updated by rew: URL: https://cgit.FreeBSD.org/src/commit/?id=6bb140e3ca895a148f32c93d50f93619bf735f73 commit 6bb140e3ca895a148f32c93d50f93619bf735f73 Author: Robert Wing AuthorDate: 2021-03-07 06:19:30 +0000 Commit: Robert Wing CommitDate: 2021-03-07 06:19:30 +0000 bhyvectl: print a better error message when vm_open() fails Use errno to print a more descriptive error message when vm_open() fails libvmm: preserve errno when vm_device_open() fails vm_destroy() squashes errno by making a dive into sysctlbyname() - we can safely skip vm_destroy() here since it's not doing any critical clean up at this point. Replace vm_destroy() with a free() call. PR: 250671 MFC after: 3 days Submitted by: marko@apache.org Reviewed by: grehan Differential Revision: https://reviews.freebsd.org/D29109 --- lib/libvmmapi/vmmapi.c | 2 +- usr.sbin/bhyvectl/bhyvectl.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/libvmmapi/vmmapi.c b/lib/libvmmapi/vmmapi.c index b36ad1c84423..7d46a85b1cd5 100644 --- a/lib/libvmmapi/vmmapi.c +++ b/lib/libvmmapi/vmmapi.c @@ -133,7 +133,7 @@ vm_open(const char *name) return (vm); err: - vm_destroy(vm); + free(vm); return (NULL); } diff --git a/usr.sbin/bhyvectl/bhyvectl.c b/usr.sbin/bhyvectl/bhyvectl.c index 68cc958e66ec..0f7b9533fe4b 100644 --- a/usr.sbin/bhyvectl/bhyvectl.c +++ b/usr.sbin/bhyvectl/bhyvectl.c @@ -1950,7 +1950,9 @@ main(int argc, char *argv[]) if (!error) { ctx = vm_open(vmname); if (ctx == NULL) { - printf("VM:%s is not created.\n", vmname); + fprintf(stderr, + "vm_open: %s could not be opened: %s\n", + vmname, strerror(errno)); exit (1); } } From owner-dev-commits-src-main@freebsd.org Sun Mar 7 11:31:28 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 32596563B27; Sun, 7 Mar 2021 11:31:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DtfSJ0vSxz4hGd; Sun, 7 Mar 2021 11:31:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 12223155DE; Sun, 7 Mar 2021 11:31:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 127BVSWe069546; Sun, 7 Mar 2021 11:31:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 127BVS7r069545; Sun, 7 Mar 2021 11:31:28 GMT (envelope-from git) Date: Sun, 7 Mar 2021 11:31:28 GMT Message-Id: <202103071131.127BVS7r069545@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michal Meloun Subject: git: 01c6d7918985 - main - mvebu_gpio: Fix settings of gpio pin direction. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mmel X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 01c6d7918985c6e8610d6245af0f745ced86ffd5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Mar 2021 11:31:28 -0000 The branch main has been updated by mmel: URL: https://cgit.FreeBSD.org/src/commit/?id=01c6d7918985c6e8610d6245af0f745ced86ffd5 commit 01c6d7918985c6e8610d6245af0f745ced86ffd5 Author: Michal Meloun AuthorDate: 2021-03-07 08:50:57 +0000 Commit: Michal Meloun CommitDate: 2021-03-07 10:41:30 +0000 mvebu_gpio: Fix settings of gpio pin direction. Data Output Enable Control register is inverted – 0 means output direction. Reflect this fact in code. MFC after: 3 weeks --- sys/arm/mv/mvebu_gpio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/arm/mv/mvebu_gpio.c b/sys/arm/mv/mvebu_gpio.c index c38fbceebf24..21766f57c9b6 100644 --- a/sys/arm/mv/mvebu_gpio.c +++ b/sys/arm/mv/mvebu_gpio.c @@ -167,10 +167,10 @@ mvebu_gpio_pin_configure(struct mvebu_gpio_softc *sc, struct gpio_pin *pin, pin->gp_flags &= ~(GPIO_PIN_INPUT | GPIO_PIN_OUTPUT); if (flags & GPIO_PIN_OUTPUT) { pin->gp_flags |= GPIO_PIN_OUTPUT; - gpio_write(sc, GPIO_CONTROL_SET, pin, 1); + gpio_write(sc, GPIO_CONTROL_CLR, pin, 1); } else { pin->gp_flags |= GPIO_PIN_INPUT; - gpio_write(sc, GPIO_CONTROL_CLR, pin, 1); + gpio_write(sc, GPIO_CONTROL_SET, pin, 1); } } @@ -785,7 +785,7 @@ mvebu_gpio_attach(device_t dev) else pin->gp_caps = GPIO_PIN_INPUT | GPIO_PIN_OUTPUT; pin->gp_flags = - gpio_read(sc, GPIO_CONTROL, &sc->gpio_pins[i]) != 0 ? + gpio_read(sc, GPIO_CONTROL, &sc->gpio_pins[i]) == 0 ? GPIO_PIN_OUTPUT : GPIO_PIN_INPUT; snprintf(pin->gp_name, GPIOMAXNAME, "gpio%d", i); From owner-dev-commits-src-main@freebsd.org Sun Mar 7 17:33:14 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6FD4A56D841; Sun, 7 Mar 2021 17:33:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DtpTk2jmkz3JM7; Sun, 7 Mar 2021 17:33:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 504FA19F4D; Sun, 7 Mar 2021 17:33:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 127HXEP4044224; Sun, 7 Mar 2021 17:33:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 127HXEjR044223; Sun, 7 Mar 2021 17:33:14 GMT (envelope-from git) Date: Sun, 7 Mar 2021 17:33:14 GMT Message-Id: <202103071733.127HXEjR044223@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Li-Wen Hsu Subject: git: 4287fa844f5e - main - TEST gitrepo-dev MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4287fa844f5e8f0021ada77c81ce96f9b547fccf Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Mar 2021 17:33:14 -0000 The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=4287fa844f5e8f0021ada77c81ce96f9b547fccf commit 4287fa844f5e8f0021ada77c81ce96f9b547fccf Author: Li-Wen Hsu AuthorDate: 2021-03-05 06:22:09 +0000 Commit: Li-Wen Hsu CommitDate: 2021-03-07 12:52:38 +0000 TEST gitrepo-dev --- README | 1 + 1 file changed, 1 insertion(+) diff --git a/README b/README index aad363baf9ea..481a079c3314 100644 --- a/README +++ b/README @@ -1,3 +1,4 @@ +TEST This is the top level of the FreeBSD source directory. This file was last revised on: $FreeBSD$ From owner-dev-commits-src-main@freebsd.org Sun Mar 7 17:34:34 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 96CDE56D6F6; Sun, 7 Mar 2021 17:34:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DtpWG3tbPz3JvS; Sun, 7 Mar 2021 17:34:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 786381A4EB; Sun, 7 Mar 2021 17:34:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 127HYY0j044532; Sun, 7 Mar 2021 17:34:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 127HYY6d044531; Sun, 7 Mar 2021 17:34:34 GMT (envelope-from git) Date: Sun, 7 Mar 2021 17:34:34 GMT Message-Id: <202103071734.127HYY6d044531@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Li-Wen Hsu Subject: git: 2c75196236fc - main - Revert "TEST gitrepo-dev" MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2c75196236fc1c8516df64c5a97467b96bfa1da2 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Mar 2021 17:34:34 -0000 The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=2c75196236fc1c8516df64c5a97467b96bfa1da2 commit 2c75196236fc1c8516df64c5a97467b96bfa1da2 Author: Li-Wen Hsu AuthorDate: 2021-03-07 17:34:21 +0000 Commit: Li-Wen Hsu CommitDate: 2021-03-07 17:34:21 +0000 Revert "TEST gitrepo-dev" This reverts commit 4287fa844f5e8f0021ada77c81ce96f9b547fccf. --- README | 1 - 1 file changed, 1 deletion(-) diff --git a/README b/README index 481a079c3314..aad363baf9ea 100644 --- a/README +++ b/README @@ -1,4 +1,3 @@ -TEST This is the top level of the FreeBSD source directory. This file was last revised on: $FreeBSD$ From owner-dev-commits-src-main@freebsd.org Sun Mar 7 17:47:20 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DD8D356DBC8; Sun, 7 Mar 2021 17:47:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dtpp05m8Zz3KDw; Sun, 7 Mar 2021 17:47:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B43DD1A370; Sun, 7 Mar 2021 17:47:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 127HlKUG058582; Sun, 7 Mar 2021 17:47:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 127HlKDQ058581; Sun, 7 Mar 2021 17:47:20 GMT (envelope-from git) Date: Sun, 7 Mar 2021 17:47:20 GMT Message-Id: <202103071747.127HlKDQ058581@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 3fca90af438a - main - net80211: ratectl header guard against multiple inclusions MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3fca90af438ac4232d6b33ee4874297089997dd6 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Mar 2021 17:47:20 -0000 The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=3fca90af438ac4232d6b33ee4874297089997dd6 commit 3fca90af438ac4232d6b33ee4874297089997dd6 Author: Bjoern A. Zeeb AuthorDate: 2021-03-07 17:35:58 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-03-07 17:35:58 +0000 net80211: ratectl header guard against multiple inclusions Add missing #ifndef/#define/#endif guards against multiple inclusions to ieee80211_ratectl.h as they are missing. MFC after: 3 days Sponsored-by: Rubicon Communications, LLC ("Netgate") --- sys/net80211/ieee80211_ratectl.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/net80211/ieee80211_ratectl.h b/sys/net80211/ieee80211_ratectl.h index d147421a0364..6890e74bf518 100644 --- a/sys/net80211/ieee80211_ratectl.h +++ b/sys/net80211/ieee80211_ratectl.h @@ -27,6 +27,9 @@ * $FreeBSD$ */ +#ifndef _NET80211_IEEE80211_RATECTL_H_ +#define _NET80211_IEEE80211_RATECTL_H_ + enum ieee80211_ratealgs { IEEE80211_RATECTL_AMRR = 0, IEEE80211_RATECTL_RSSADAPT = 1, @@ -169,3 +172,5 @@ ieee80211_ratectl_node_stats(struct ieee80211_node *ni, struct sbuf *s) return; vap->iv_rate->ir_node_stats(ni, s); } + +#endif /* _NET80211_IEEE80211_RATECTL_H_ */ From owner-dev-commits-src-main@freebsd.org Sun Mar 7 18:44:08 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3436B56F50E; Sun, 7 Mar 2021 18:44:08 +0000 (UTC) (envelope-from crees@bayofrum.net) Received: from mail56c50.megamailservers.eu (mail168c50.megamailservers.eu [91.136.10.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dtr3W06F5z3NVn; Sun, 7 Mar 2021 18:44:06 +0000 (UTC) (envelope-from crees@bayofrum.net) X-Authenticated-User: crees@uwclub.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1615142638; bh=MiEJIWh2PndqNKC6+ZcTntqfLdJ444BkTjaqoxAJVlQ=; h=Date:From:To:Subject:In-Reply-To:References:From; b=PWcWYS++DEShEx2B+Z4+KtmroZOB6q1V1CH2NC3cN+IDkVEkWWiwh5vJ7LVytWP2M DnJwOHd11NCwixnwhtTFcQ8mV5szdxVcV4hwlQOCFP06U7sfuYdNLcGtlavj+UhtUC FDsoLiLFRaN96EMKhyBq9fsrEx4yNU4YK8kIqBZ4= Feedback-ID: crees@bayofrum. Received: from pegasus.bayofrum.net (81-178-238-223.dsl.pipex.com [81.178.238.223]) (authenticated bits=0) by mail56c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 127Ihuc4029810; Sun, 7 Mar 2021 18:43:58 +0000 X-Spam-Status: No X-bayofrum-MailScanner-From: crees@bayofrum.net X-bayofrum-MailScanner: Found to be clean X-bayofrum-MailScanner-ID: 6EE1135B3.A761C X-bayofrum-MailScanner-Information: Please contact the ISP for more information Received: from www.bayofrum.net (unknown [192.168.1.70]) by pegasus.bayofrum.net (Postfix) with ESMTPSA id 6EE1135B3; Sun, 7 Mar 2021 18:43:50 +0000 (GMT) MIME-Version: 1.0 Date: Sun, 07 Mar 2021 13:43:50 -0500 From: Chris Rees To: dev-commits-src-all@freebsd.org, Baptiste Daroussin , src-committers@freebsd.org, dev-commits-src-main@freebsd.org, Rick Parrish Subject: Re: git: 77e1ccbee3ed - main - rc: implement parallel boot In-Reply-To: <6D4FCE07-B996-430C-8EA8-6CB37A6DEEE8@bayofrum.net> References: <202102231027.11NARYYE041280@gitrepo.freebsd.org> <6D4FCE07-B996-430C-8EA8-6CB37A6DEEE8@bayofrum.net> User-Agent: Roundcube Webmail/1.4.9 Message-ID: <74fde23ead6719ac4e56dacb51bca6ed@bayofrum.net> X-Sender: crees@bayofrum.net Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-CTCH-RefID: str=0001.0A742F21.60451EEE.0026:SCFSTAT83439264, ss=1, re=-4.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: -4.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=UaYvt5aN c=1 sm=1 tr=0 a=VPjlEbx5XC2baNimRf67MQ==:117 a=VPjlEbx5XC2baNimRf67MQ==:17 a=kj9zAlcOel0A:10 a=dESyimp9J3IA:10 a=6I5d2MoRAAAA:8 a=pGLkceISAAAA:8 a=wYKsyiGUE8vJ2gENuAgA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=BPzZvq435JnGatEyYwdK:22 X-Origin-Country: GB X-Rspamd-Queue-Id: 4Dtr3W06F5z3NVn X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=megamailservers.eu header.s=maildub header.b=PWcWYS++; dmarc=none; spf=none (mx1.freebsd.org: domain of crees@bayofrum.net has no SPF policy when checking 91.136.10.178) smtp.mailfrom=crees@bayofrum.net X-Spamd-Result: default: False [-3.03 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[megamailservers.eu:+]; NEURAL_HAM_SHORT(-0.73)[-0.728]; FREEMAIL_TO(0.00)[freebsd.org,gmail.com]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[91.136.10.178:from]; ASN(0.00)[asn:9115, ipnet:91.136.0.0/17, country:CA]; MIME_TRACE(0.00)[0:+]; MID_RHS_MATCH_FROM(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[81.178.238.223:received]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[megamailservers.eu:s=maildub]; FREEFALL_USER(0.00)[crees]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[bayofrum.net]; SPAMHAUS_ZRD(0.00)[91.136.10.178:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; R_SPF_NA(0.00)[no SPF record]; MAILMAN_DEST(0.00)[dev-commits-src-main,dev-commits-src-all] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Mar 2021 18:44:08 -0000 Forgot to CC the actual author! On 2021-02-23 17:03, Chris Rees wrote: > Hi, > > On 23 February 2021 10:27:34 GMT, Baptiste Daroussin > wrote: >> The branch main has been updated by bapt: >> >> URL: >> https://cgit.FreeBSD.org/src/commit/?id=77e1ccbee3ed6c837929e4e232fd07f95bfc8294 >> >> commit 77e1ccbee3ed6c837929e4e232fd07f95bfc8294 >> Author: Rick Parrish >> AuthorDate: 2021-02-07 06:15:21 +0000 >> Commit: Baptiste Daroussin >> CommitDate: 2021-02-23 10:16:53 +0000 >> >> rc: implement parallel boot >> >> take advantage of the rcorder -p argument to implement parallel >> booting in rc. >> >> According to the author non scientific tests: >> on a Core 2 Duo with spinning disk: >> >> | Services enabled | before | after | saving | >> | 0 | 8s | 8s | 0 | >> | 1 | 13s | 13s | 0 | >> | 2 | 17s | 13s | 5 | >> | 3 | 23s | 13s | 10 | >> | 4 | 28s | 13s | 15 | >> | 5 | 33s | 13s | 20 | >> >> PR: 249192 >> MFC after: 3 weeks >> --- >> libexec/rc/rc | 49 ++++++++++++++++++++++++++++++++++--------------- >> 1 file changed, 34 insertions(+), 15 deletions(-) >> >> diff --git a/libexec/rc/rc b/libexec/rc/rc >> index 35db4a850516..722d7fe35884 100644 >> --- a/libexec/rc/rc >> +++ b/libexec/rc/rc >> @@ -91,19 +91,31 @@ if ! [ -e ${firstboot_sentinel} ]; then >> skip_firstboot="-s firstboot" >> fi >> >> +# rc_parallel_start default is "NO" >> +rc_parallel_start=${rc_parallel_start:-NO} > > Should this go in defaults/rc.conf? I think this should be in defaults/rc.conf-- the load_rc_config line is above it. Incidentally, is the plan for this to go into 13 *and* 12, or just 13? It's an exciting step! Chris From owner-dev-commits-src-main@freebsd.org Sun Mar 7 19:30:34 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 67D28570BB2; Sun, 7 Mar 2021 19:30:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dts562Yqfz3QpT; Sun, 7 Mar 2021 19:30:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4AF741B86A; Sun, 7 Mar 2021 19:30:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 127JUYhZ097666; Sun, 7 Mar 2021 19:30:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 127JUY9j097665; Sun, 7 Mar 2021 19:30:34 GMT (envelope-from git) Date: Sun, 7 Mar 2021 19:30:34 GMT Message-Id: <202103071930.127JUY9j097665@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: f7bfe310191c - main - wg(4): Fix an example in the manual page MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f7bfe310191c8292da51c8da166a521ff16e0e46 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Mar 2021 19:30:34 -0000 The branch main has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=f7bfe310191c8292da51c8da166a521ff16e0e46 commit f7bfe310191c8292da51c8da166a521ff16e0e46 Author: Gordon Bergling AuthorDate: 2021-03-07 19:27:59 +0000 Commit: Gordon Bergling CommitDate: 2021-03-07 19:27:59 +0000 wg(4): Fix an example in the manual page The example in the manual page of wg(4) for connecting to a peer was missing the 'public-key' ifconfig(8) keyword and for the addressed peer the port must be specified. PR: 253866 Reported by: Sergey Akhmatov Reviewed by: debdrup MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D29115 --- share/man/man4/wg.4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man4/wg.4 b/share/man/man4/wg.4 index 2a13b98f45e9..760584e3a386 100644 --- a/share/man/man4/wg.4 +++ b/share/man/man4/wg.4 @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 2, 2021 +.Dd March 7, 2021 .Dt WG 4 .Os .Sh NAME @@ -184,7 +184,7 @@ $ ifconfig wg0 | awk '/public-key/ { print $2 }'` .Pp Connect to a specific endpoint using its public-key and set the allowed IP address .Bd -literal -offset indent -# ifconfig wg0 peer '7lWtsDdqaGB3EY9WNxRN3hVaHMtu1zXw71+bOjNOVUw=' endpoint 10.0.1.100 allowed-ips 192.168.2.100/32 +# ifconfig wg0 peer public-key '7lWtsDdqaGB3EY9WNxRN3hVaHMtu1zXw71+bOjNOVUw=' endpoint 10.0.1.100:54321 allowed-ips 192.168.2.100/32 .Ed .Sh DIAGNOSTICS The From owner-dev-commits-src-main@freebsd.org Sun Mar 7 20:08:57 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1BD2E571B93; Sun, 7 Mar 2021 20:08:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DtsxP0HrPz3jWJ; Sun, 7 Mar 2021 20:08:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F10B81C502; Sun, 7 Mar 2021 20:08:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 127K8uEU042977; Sun, 7 Mar 2021 20:08:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 127K8u3V042976; Sun, 7 Mar 2021 20:08:56 GMT (envelope-from git) Date: Sun, 7 Mar 2021 20:08:56 GMT Message-Id: <202103072008.127K8u3V042976@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Oleksandr Tymoshenko Subject: git: 748be78e60cc - main - armv8crypto: fix AES-XTS regression introduced by ed9b7f44 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gonzo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 748be78e60ccc4a26325a636347debb1f7e6749b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Mar 2021 20:08:57 -0000 The branch main has been updated by gonzo: URL: https://cgit.FreeBSD.org/src/commit/?id=748be78e60ccc4a26325a636347debb1f7e6749b commit 748be78e60ccc4a26325a636347debb1f7e6749b Author: Oleksandr Tymoshenko AuthorDate: 2021-03-07 20:03:47 +0000 Commit: Oleksandr Tymoshenko CommitDate: 2021-03-07 20:03:47 +0000 armv8crypto: fix AES-XTS regression introduced by ed9b7f44 Initialization of the XTS key schedule was accidentally dropped when adding AES-GCM support so all-zero schedule was used instead. This rendered previously created GELI partitions unusable. This change restores proper XTS key schedule initialization. Reported by: Peter Jeremy MFC after: immediately --- sys/crypto/armv8/armv8_crypto.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/crypto/armv8/armv8_crypto.c b/sys/crypto/armv8/armv8_crypto.c index 24f6eff5608d..95bb96124323 100644 --- a/sys/crypto/armv8/armv8_crypto.c +++ b/sys/crypto/armv8/armv8_crypto.c @@ -305,6 +305,9 @@ armv8_crypto_cipher_setup(struct armv8_crypto_session *ses, aes_v8_set_decrypt_key(key, keylen * 8, &ses->dec_schedule); + if (csp->csp_cipher_alg == CRYPTO_AES_XTS) + aes_v8_set_encrypt_key(key + keylen, keylen * 8, &ses->xts_schedule); + if (csp->csp_cipher_alg == CRYPTO_AES_NIST_GCM_16) { memset(H.c, 0, sizeof(H.c)); aes_v8_encrypt(H.c, H.c, &ses->enc_schedule); From owner-dev-commits-src-main@freebsd.org Sun Mar 7 22:18:06 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B54D75774DA; Sun, 7 Mar 2021 22:18:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DtwpN4KkCz4TPt; Sun, 7 Mar 2021 22:18:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1E9C01DF5F; Sun, 7 Mar 2021 22:18:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 127MI2ek014076; Sun, 7 Mar 2021 22:18:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 127MI28p014075; Sun, 7 Mar 2021 22:18:02 GMT (envelope-from git) Date: Sun, 7 Mar 2021 22:18:02 GMT Message-Id: <202103072218.127MI28p014075@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: d5be41beb7c4 - main - Fix dpdk/ldradix fib lookup algorithm preference calculation. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: melifaro X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d5be41beb7c44119730791d92782d8e77174d312 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Mar 2021 22:18:06 -0000 The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=d5be41beb7c44119730791d92782d8e77174d312 commit d5be41beb7c44119730791d92782d8e77174d312 Author: Alexander V. Chernikov AuthorDate: 2021-03-07 22:05:34 +0000 Commit: Alexander V. Chernikov CommitDate: 2021-03-07 22:17:53 +0000 Fix dpdk/ldradix fib lookup algorithm preference calculation. The current preference number were copied from IPv4 code, assuming 500k routes to be the full-view. Adjust with the current reality (100k full-view). Reported by: Marek Zarychta MFC after: 3 days --- sys/contrib/dpdk_rte_lpm/dpdk_lpm6.c | 4 ++-- sys/netinet6/in6_fib_algo.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/contrib/dpdk_rte_lpm/dpdk_lpm6.c b/sys/contrib/dpdk_rte_lpm/dpdk_lpm6.c index 250e3e1bde4a..17d35c16346d 100644 --- a/sys/contrib/dpdk_rte_lpm/dpdk_lpm6.c +++ b/sys/contrib/dpdk_rte_lpm/dpdk_lpm6.c @@ -129,8 +129,8 @@ rte6_get_pref(const struct rib_rtable_info *rinfo) return (1); else if (rinfo->num_prefixes < 1000) return (rinfo->num_prefixes / 10); - else if (rinfo->num_prefixes < 500000) - return (100 + rinfo->num_prefixes / 3334); + else if (rinfo->num_prefixes < 100000) + return (100 + rinfo->num_prefixes / 667); else return (250); } diff --git a/sys/netinet6/in6_fib_algo.c b/sys/netinet6/in6_fib_algo.c index c9df9387af37..04d194273168 100644 --- a/sys/netinet6/in6_fib_algo.c +++ b/sys/netinet6/in6_fib_algo.c @@ -118,8 +118,8 @@ lradix6_get_pref(const struct rib_rtable_info *rinfo) if (rinfo->num_prefixes < 10) return (255); - else if (rinfo->num_prefixes < 100000) - return (255 - rinfo->num_prefixes / 394); + else if (rinfo->num_prefixes < 10000) + return (255 - rinfo->num_prefixes / 40); else return (1); } From owner-dev-commits-src-main@freebsd.org Sun Mar 7 23:27:29 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3C3DD5533E9; Sun, 7 Mar 2021 23:27:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DtyLS5pQGz4mmr; Sun, 7 Mar 2021 23:27:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BA8C01EC75; Sun, 7 Mar 2021 23:27:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 127NRSMq006209; Sun, 7 Mar 2021 23:27:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 127NRSLU006208; Sun, 7 Mar 2021 23:27:28 GMT (envelope-from git) Date: Sun, 7 Mar 2021 23:27:28 GMT Message-Id: <202103072327.127NRSLU006208@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Eric van Gyzen Subject: git: 576313b983dc - main - dumpon: do not print errno for resolver failure MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vangyzen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 576313b983dca243d7ba6af8b57517bed419ecb4 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Mar 2021 23:27:29 -0000 The branch main has been updated by vangyzen: URL: https://cgit.FreeBSD.org/src/commit/?id=576313b983dca243d7ba6af8b57517bed419ecb4 commit 576313b983dca243d7ba6af8b57517bed419ecb4 Author: Eric van Gyzen AuthorDate: 2021-03-05 16:39:53 +0000 Commit: Eric van Gyzen CommitDate: 2021-03-07 23:23:04 +0000 dumpon: do not print errno for resolver failure When the netdump host name fails to resolve, don't print errno, since it's irrelevant. We might as well use a different exit status, too. Sponsored by: Dell EMC Isilon --- sbin/dumpon/dumpon.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sbin/dumpon/dumpon.c b/sbin/dumpon/dumpon.c index 2b710a611af3..183ce5f08cb3 100644 --- a/sbin/dumpon/dumpon.c +++ b/sbin/dumpon/dumpon.c @@ -532,10 +532,11 @@ main(int argc, char *argv[]) hints.ai_protocol = IPPROTO_UDP; res = NULL; error = getaddrinfo(server, NULL, &hints, &res); - if (error != 0) - err(1, "%s", gai_strerror(error)); - if (res == NULL) - errx(1, "failed to resolve '%s'", server); + if (error != 0) { + if (error == EAI_SYSTEM) + err(EX_OSERR, "%s", gai_strerror(error)); + errx(EX_NOHOST, "%s", gai_strerror(error)); + } server = inet_ntoa( ((struct sockaddr_in *)(void *)res->ai_addr)->sin_addr); freeaddrinfo(res); From owner-dev-commits-src-main@freebsd.org Sun Mar 7 23:30:24 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 18FBD55369B; Sun, 7 Mar 2021 23:30:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DtyPq3SS2z4mrd; Sun, 7 Mar 2021 23:30:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 448FA1EBF0; Sun, 7 Mar 2021 23:30:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 127NUNl0014086; Sun, 7 Mar 2021 23:30:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 127NUNMQ014085; Sun, 7 Mar 2021 23:30:23 GMT (envelope-from git) Date: Sun, 7 Mar 2021 23:30:23 GMT Message-Id: <202103072330.127NUNMQ014085@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Eric van Gyzen Subject: git: 0424d9ebeb17 - main - decryptcore: do not include sys/sysctl.h MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vangyzen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0424d9ebeb17d669f680c696f0d741b714461b4c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Mar 2021 23:30:24 -0000 The branch main has been updated by vangyzen: URL: https://cgit.FreeBSD.org/src/commit/?id=0424d9ebeb17d669f680c696f0d741b714461b4c commit 0424d9ebeb17d669f680c696f0d741b714461b4c Author: Eric van Gyzen AuthorDate: 2021-03-05 16:38:37 +0000 Commit: Eric van Gyzen CommitDate: 2021-03-07 23:29:03 +0000 decryptcore: do not include sys/sysctl.h It's not needed. Removing it is a small improvement in portability. Sponsored by: Dell EMC Isilon --- sbin/decryptcore/decryptcore.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sbin/decryptcore/decryptcore.c b/sbin/decryptcore/decryptcore.c index cc1807b18a80..fc6599fb0ecc 100644 --- a/sbin/decryptcore/decryptcore.c +++ b/sbin/decryptcore/decryptcore.c @@ -31,7 +31,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include