From owner-svn-src-stable@freebsd.org Sun Jun 21 09:24:48 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 817ED34828A; Sun, 21 Jun 2020 09:24:48 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49qRvh2r5Pz4dLH; Sun, 21 Jun 2020 09:24:48 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5C9F81ADE7; Sun, 21 Jun 2020 09:24:48 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05L9OmpI005687; Sun, 21 Jun 2020 09:24:48 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05L9OmMh005684; Sun, 21 Jun 2020 09:24:48 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202006210924.05L9OmMh005684@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 21 Jun 2020 09:24:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362461 - in stable: 11/contrib/llvm-project/llvm/lib/Analysis 11/lib/clang/include/clang/Config 12/contrib/llvm-project/llvm/lib/Analysis 12/lib/clang/include/clang/Config X-SVN-Group: stable-12 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 11/contrib/llvm-project/llvm/lib/Analysis 11/lib/clang/include/clang/Config 12/contrib/llvm-project/llvm/lib/Analysis 12/lib/clang/include/clang/Config X-SVN-Commit-Revision: 362461 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2020 09:24:48 -0000 Author: dim Date: Sun Jun 21 09:24:47 2020 New Revision: 362461 URL: https://svnweb.freebsd.org/changeset/base/362461 Log: MFC r362341: Merge commit 0cecafd647cc from llvm git (by Alina Sbirlea): [BasicAA] Make BasicAA a cfg pass. Summary: Part of the changes in D44564 made BasicAA not CFG only due to it using PhiAnalysisValues which may have values invalidated. Subsequent patches (rL340613) appear to have addressed this limitation. BasicAA should not be invalidated by non-CFG-altering passes. A concrete example is MemCpyOpt which preserves CFG, but we are testing it invalidates BasicAA. llvm-dev RFC: https://groups.google.com/forum/#!topic/llvm-dev/eSPXuWnNfzM Reviewers: john.brawn, sebpop, hfinkel, brzycki Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D74353 This fixes an issue with clang's -fintegrated-cc1 feature, which could make it output slightly different assembly code, depending on the way it was invoked. In r361755 we attempted to work around it by disabling the integrated cc1 stage, but it did not solve the root cause for all situations. Extensive testing and bisecting showed that the above change finally makes the output deterministic, even if -fintegrated-cc1 is on. Reported by: Fabian Keil PR: 246630 Modified: stable/12/contrib/llvm-project/llvm/lib/Analysis/BasicAliasAnalysis.cpp stable/12/lib/clang/include/clang/Config/config.h Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/contrib/llvm-project/llvm/lib/Analysis/BasicAliasAnalysis.cpp stable/11/lib/clang/include/clang/Config/config.h Directory Properties: stable/11/ (props changed) stable/11/contrib/llvm-project/llvm/ (props changed) Modified: stable/12/contrib/llvm-project/llvm/lib/Analysis/BasicAliasAnalysis.cpp ============================================================================== --- stable/12/contrib/llvm-project/llvm/lib/Analysis/BasicAliasAnalysis.cpp Sun Jun 21 08:51:24 2020 (r362460) +++ stable/12/contrib/llvm-project/llvm/lib/Analysis/BasicAliasAnalysis.cpp Sun Jun 21 09:24:47 2020 (r362461) @@ -2059,12 +2059,13 @@ char BasicAAWrapperPass::ID = 0; void BasicAAWrapperPass::anchor() {} INITIALIZE_PASS_BEGIN(BasicAAWrapperPass, "basicaa", - "Basic Alias Analysis (stateless AA impl)", false, true) + "Basic Alias Analysis (stateless AA impl)", true, true) INITIALIZE_PASS_DEPENDENCY(AssumptionCacheTracker) INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass) INITIALIZE_PASS_DEPENDENCY(TargetLibraryInfoWrapperPass) +INITIALIZE_PASS_DEPENDENCY(PhiValuesWrapperPass) INITIALIZE_PASS_END(BasicAAWrapperPass, "basicaa", - "Basic Alias Analysis (stateless AA impl)", false, true) + "Basic Alias Analysis (stateless AA impl)", true, true) FunctionPass *llvm::createBasicAAWrapperPass() { return new BasicAAWrapperPass(); Modified: stable/12/lib/clang/include/clang/Config/config.h ============================================================================== --- stable/12/lib/clang/include/clang/Config/config.h Sun Jun 21 08:51:24 2020 (r362460) +++ stable/12/lib/clang/include/clang/Config/config.h Sun Jun 21 09:24:47 2020 (r362461) @@ -82,6 +82,6 @@ /* #undef CLANG_ENABLE_STATIC_ANALYZER */ /* Spawn a new process clang.exe for the CC1 tool invocation, when necessary */ -#define CLANG_SPAWN_CC1 1 +#define CLANG_SPAWN_CC1 0 #endif From owner-svn-src-stable@freebsd.org Sun Jun 21 09:24:49 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0AEAE3483C6; Sun, 21 Jun 2020 09:24:49 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49qRvh6QRPz4d6c; Sun, 21 Jun 2020 09:24:48 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D79F81ADE8; Sun, 21 Jun 2020 09:24:48 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05L9Omnh005694; Sun, 21 Jun 2020 09:24:48 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05L9OmHv005692; Sun, 21 Jun 2020 09:24:48 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202006210924.05L9OmHv005692@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 21 Jun 2020 09:24:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r362461 - in stable: 11/contrib/llvm-project/llvm/lib/Analysis 11/lib/clang/include/clang/Config 12/contrib/llvm-project/llvm/lib/Analysis 12/lib/clang/include/clang/Config X-SVN-Group: stable-11 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 11/contrib/llvm-project/llvm/lib/Analysis 11/lib/clang/include/clang/Config 12/contrib/llvm-project/llvm/lib/Analysis 12/lib/clang/include/clang/Config X-SVN-Commit-Revision: 362461 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2020 09:24:49 -0000 Author: dim Date: Sun Jun 21 09:24:47 2020 New Revision: 362461 URL: https://svnweb.freebsd.org/changeset/base/362461 Log: MFC r362341: Merge commit 0cecafd647cc from llvm git (by Alina Sbirlea): [BasicAA] Make BasicAA a cfg pass. Summary: Part of the changes in D44564 made BasicAA not CFG only due to it using PhiAnalysisValues which may have values invalidated. Subsequent patches (rL340613) appear to have addressed this limitation. BasicAA should not be invalidated by non-CFG-altering passes. A concrete example is MemCpyOpt which preserves CFG, but we are testing it invalidates BasicAA. llvm-dev RFC: https://groups.google.com/forum/#!topic/llvm-dev/eSPXuWnNfzM Reviewers: john.brawn, sebpop, hfinkel, brzycki Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D74353 This fixes an issue with clang's -fintegrated-cc1 feature, which could make it output slightly different assembly code, depending on the way it was invoked. In r361755 we attempted to work around it by disabling the integrated cc1 stage, but it did not solve the root cause for all situations. Extensive testing and bisecting showed that the above change finally makes the output deterministic, even if -fintegrated-cc1 is on. Reported by: Fabian Keil PR: 246630 Modified: stable/11/contrib/llvm-project/llvm/lib/Analysis/BasicAliasAnalysis.cpp stable/11/lib/clang/include/clang/Config/config.h Directory Properties: stable/11/ (props changed) stable/11/contrib/llvm-project/llvm/ (props changed) Changes in other areas also in this revision: Modified: stable/12/contrib/llvm-project/llvm/lib/Analysis/BasicAliasAnalysis.cpp stable/12/lib/clang/include/clang/Config/config.h Directory Properties: stable/12/ (props changed) Modified: stable/11/contrib/llvm-project/llvm/lib/Analysis/BasicAliasAnalysis.cpp ============================================================================== --- stable/11/contrib/llvm-project/llvm/lib/Analysis/BasicAliasAnalysis.cpp Sun Jun 21 08:51:24 2020 (r362460) +++ stable/11/contrib/llvm-project/llvm/lib/Analysis/BasicAliasAnalysis.cpp Sun Jun 21 09:24:47 2020 (r362461) @@ -2059,12 +2059,13 @@ char BasicAAWrapperPass::ID = 0; void BasicAAWrapperPass::anchor() {} INITIALIZE_PASS_BEGIN(BasicAAWrapperPass, "basicaa", - "Basic Alias Analysis (stateless AA impl)", false, true) + "Basic Alias Analysis (stateless AA impl)", true, true) INITIALIZE_PASS_DEPENDENCY(AssumptionCacheTracker) INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass) INITIALIZE_PASS_DEPENDENCY(TargetLibraryInfoWrapperPass) +INITIALIZE_PASS_DEPENDENCY(PhiValuesWrapperPass) INITIALIZE_PASS_END(BasicAAWrapperPass, "basicaa", - "Basic Alias Analysis (stateless AA impl)", false, true) + "Basic Alias Analysis (stateless AA impl)", true, true) FunctionPass *llvm::createBasicAAWrapperPass() { return new BasicAAWrapperPass(); Modified: stable/11/lib/clang/include/clang/Config/config.h ============================================================================== --- stable/11/lib/clang/include/clang/Config/config.h Sun Jun 21 08:51:24 2020 (r362460) +++ stable/11/lib/clang/include/clang/Config/config.h Sun Jun 21 09:24:47 2020 (r362461) @@ -82,6 +82,6 @@ /* #undef CLANG_ENABLE_STATIC_ANALYZER */ /* Spawn a new process clang.exe for the CC1 tool invocation, when necessary */ -#define CLANG_SPAWN_CC1 1 +#define CLANG_SPAWN_CC1 0 #endif From owner-svn-src-stable@freebsd.org Sun Jun 21 11:48:55 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CC51834B62F; Sun, 21 Jun 2020 11:48:55 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49qW5z4y2gz3XYS; Sun, 21 Jun 2020 11:48:55 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A0E5E1CD0B; Sun, 21 Jun 2020 11:48:55 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05LBmt8J091428; Sun, 21 Jun 2020 11:48:55 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05LBmtKI091427; Sun, 21 Jun 2020 11:48:55 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202006211148.05LBmtKI091427@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Sun, 21 Jun 2020 11:48:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362465 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: bz X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 362465 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2020 11:48:55 -0000 Author: bz Date: Sun Jun 21 11:48:55 2020 New Revision: 362465 URL: https://svnweb.freebsd.org/changeset/base/362465 Log: MFC r362289: When converting the static arrays to mallocarray() in r356621 I missed one place where we now need to multiply the size of the struct with the number of entries. This lead to problems when restarting user space daemons, as the cleanup was never properly done, resulting in MRT_ADD_VIF EADDRINUSE. Properly zero all array elements to avoid this problem. PR: 246629, 206583 Modified: stable/12/sys/netinet/ip_mroute.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/ip_mroute.c ============================================================================== --- stable/12/sys/netinet/ip_mroute.c Sun Jun 21 11:42:49 2020 (r362464) +++ stable/12/sys/netinet/ip_mroute.c Sun Jun 21 11:48:55 2020 (r362465) @@ -739,7 +739,7 @@ X_ip_mrouter_done(void) if_allmulti(ifp, 0); } } - bzero((caddr_t)V_viftable, sizeof(V_viftable)); + bzero((caddr_t)V_viftable, sizeof(V_viftable) * MAXVIFS); V_numvifs = 0; V_pim_assert_enabled = 0; From owner-svn-src-stable@freebsd.org Sun Jun 21 16:06:02 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3B19B353F7C; Sun, 21 Jun 2020 16:06:02 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49qcpf0s5Gz4Bq8; Sun, 21 Jun 2020 16:06:02 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 182E41FD2C; Sun, 21 Jun 2020 16:06:02 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05LG61qD051213; Sun, 21 Jun 2020 16:06:01 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05LG61u6051211; Sun, 21 Jun 2020 16:06:01 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <202006211606.05LG61u6051211@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 21 Jun 2020 16:06:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362467 - stable/12/bin/sh/tests/execution X-SVN-Group: stable-12 X-SVN-Commit-Author: jilles X-SVN-Commit-Paths: stable/12/bin/sh/tests/execution X-SVN-Commit-Revision: 362467 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2020 16:06:02 -0000 Author: jilles Date: Sun Jun 21 16:06:01 2020 New Revision: 362467 URL: https://svnweb.freebsd.org/changeset/base/362467 Log: MFC r362182: sh/tests: Add tests for SIGINT in non-jobc background commands If job control is not enabled, background commands shall ignore SIGINT and SIGQUIT, and it shall be possible to override that ignore in the same shell. Added: stable/12/bin/sh/tests/execution/bg11.0 - copied unchanged from r362182, head/bin/sh/tests/execution/bg11.0 stable/12/bin/sh/tests/execution/bg12.0 - copied unchanged from r362182, head/bin/sh/tests/execution/bg12.0 Modified: stable/12/bin/sh/tests/execution/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/bin/sh/tests/execution/Makefile ============================================================================== --- stable/12/bin/sh/tests/execution/Makefile Sun Jun 21 13:34:08 2020 (r362466) +++ stable/12/bin/sh/tests/execution/Makefile Sun Jun 21 16:06:01 2020 (r362467) @@ -17,6 +17,8 @@ ${PACKAGE}FILES+= bg7.0 ${PACKAGE}FILES+= bg8.0 ${PACKAGE}FILES+= bg9.0 ${PACKAGE}FILES+= bg10.0 bg10.0.stdout +${PACKAGE}FILES+= bg11.0 +${PACKAGE}FILES+= bg12.0 ${PACKAGE}FILES+= fork1.0 ${PACKAGE}FILES+= fork2.0 ${PACKAGE}FILES+= fork3.0 Copied: stable/12/bin/sh/tests/execution/bg11.0 (from r362182, head/bin/sh/tests/execution/bg11.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/bin/sh/tests/execution/bg11.0 Sun Jun 21 16:06:01 2020 (r362467, copy of r362182, head/bin/sh/tests/execution/bg11.0) @@ -0,0 +1,16 @@ +# $FreeBSD$ + +T=`mktemp -d ${TMPDIR:-/tmp}/sh-test.XXXXXXXX` +trap 'rm -rf $T' 0 +cd $T || exit 3 +mkfifo fifo1 +# Use a trap, not the default action, since the shell may catch SIGINT and +# therefore its processing may be delayed. +{ trap 'exit 5' TERM; read dummy fifo1 +kill -INT "$!" +kill -TERM "$!" +exec 3>&- +wait "$!" +r=$? +[ "$r" = 5 ] Copied: stable/12/bin/sh/tests/execution/bg12.0 (from r362182, head/bin/sh/tests/execution/bg12.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/bin/sh/tests/execution/bg12.0 Sun Jun 21 16:06:01 2020 (r362467, copy of r362182, head/bin/sh/tests/execution/bg12.0) @@ -0,0 +1,12 @@ +# $FreeBSD$ + +T=`mktemp -d ${TMPDIR:-/tmp}/sh-test.XXXXXXXX` +trap 'rm -rf $T' 0 +cd $T || exit 3 +mkfifo fifo1 +{ trap - INT; : >fifo1; sleep 5; exit 4; } & +: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8C43F3319BB; Sun, 21 Jun 2020 20:23:40 +0000 (UTC) (envelope-from pstef@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49qkWw31pWz4Y8X; Sun, 21 Jun 2020 20:23:40 +0000 (UTC) (envelope-from pstef@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6308D228E8; Sun, 21 Jun 2020 20:23:40 +0000 (UTC) (envelope-from pstef@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05LKNeVR011042; Sun, 21 Jun 2020 20:23:40 GMT (envelope-from pstef@FreeBSD.org) Received: (from pstef@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05LKNeJg011040; Sun, 21 Jun 2020 20:23:40 GMT (envelope-from pstef@FreeBSD.org) Message-Id: <202006212023.05LKNeJg011040@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pstef set sender to pstef@FreeBSD.org using -f From: Piotr Pawel Stefaniak Date: Sun, 21 Jun 2020 20:23:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362469 - stable/12/usr.bin/top X-SVN-Group: stable-12 X-SVN-Commit-Author: pstef X-SVN-Commit-Paths: stable/12/usr.bin/top X-SVN-Commit-Revision: 362469 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2020 20:23:40 -0000 Author: pstef Date: Sun Jun 21 20:23:39 2020 New Revision: 362469 URL: https://svnweb.freebsd.org/changeset/base/362469 Log: MFC r349235 (by allanjude): top(1): Don't show the swap line when there are no swap devices Modified: stable/12/usr.bin/top/display.c stable/12/usr.bin/top/machine.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.bin/top/display.c ============================================================================== --- stable/12/usr.bin/top/display.c Sun Jun 21 18:40:17 2020 (r362468) +++ stable/12/usr.bin/top/display.c Sun Jun 21 20:23:39 2020 (r362469) @@ -675,6 +675,9 @@ i_swap(int *stats) { swap_buffer = setup_buffer(swap_buffer, 0); + if (swap_names == NULL) + return; + fputs("\nSwap: ", stdout); lastline++; @@ -689,6 +692,9 @@ u_swap(int *stats) static char *new = NULL; new = setup_buffer(new, 0); + + if (swap_names == NULL) + return; /* format the new line */ summary_format(new, stats, swap_names); Modified: stable/12/usr.bin/top/machine.c ============================================================================== --- stable/12/usr.bin/top/machine.c Sun Jun 21 18:40:17 2020 (r362468) +++ stable/12/usr.bin/top/machine.c Sun Jun 21 20:23:39 2020 (r362469) @@ -150,6 +150,7 @@ static const char *swapnames[] = { }; static int swap_stats[nitems(swapnames)]; +static int has_swap; /* these are for keeping track of the proc array */ @@ -248,12 +249,12 @@ update_layout(void) y_mem = 3; y_arc = 4; y_carc = 5; - y_swap = 4 + arc_enabled + carc_enabled; - y_idlecursor = 5 + arc_enabled + carc_enabled; - y_message = 5 + arc_enabled + carc_enabled; - y_header = 6 + arc_enabled + carc_enabled; - y_procs = 7 + arc_enabled + carc_enabled; - Header_lines = 7 + arc_enabled + carc_enabled; + y_swap = 3 + arc_enabled + carc_enabled + has_swap; + y_idlecursor = 4 + arc_enabled + carc_enabled + has_swap; + y_message = 4 + arc_enabled + carc_enabled + has_swap; + y_header = 5 + arc_enabled + carc_enabled + has_swap; + y_procs = 6 + arc_enabled + carc_enabled + has_swap; + Header_lines = 6 + arc_enabled + carc_enabled + has_swap; if (pcpu_stats) { y_mem += ncpus - 1; @@ -273,7 +274,7 @@ machine_init(struct statics *statics) { int i, j, empty, pagesize; uint64_t arc_size; - int carc_en; + int carc_en, nswapdev; size_t size; size = sizeof(smpmode); @@ -298,6 +299,11 @@ machine_init(struct statics *statics) if (kd == NULL) return (-1); + size = sizeof(nswapdev); + if (sysctlbyname("vm.nswapdev", &nswapdev, &size, NULL, + 0) == 0 && nswapdev != 0) + has_swap = 1; + GETSYSCTL("kern.ccpu", ccpu); /* this is used in calculating WCPU -- calculate it ahead of time */ @@ -332,7 +338,10 @@ machine_init(struct statics *statics) statics->carc_names = carcnames; else statics->carc_names = NULL; - statics->swap_names = swapnames; + if (has_swap) + statics->swap_names = swapnames; + else + statics->swap_names = NULL; statics->order_names = ordernames; /* Allocate state for per-CPU stats. */ From owner-svn-src-stable@freebsd.org Mon Jun 22 10:52:31 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5CC2E347C39; Mon, 22 Jun 2020 10:52:31 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49r5pR0m0pz4Z6c; Mon, 22 Jun 2020 10:52:31 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 15783D3C9; Mon, 22 Jun 2020 10:52:31 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05MAqUZu045236; Mon, 22 Jun 2020 10:52:30 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05MAqUGQ045233; Mon, 22 Jun 2020 10:52:30 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202006221052.05MAqUGQ045233@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Mon, 22 Jun 2020 10:52:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362494 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: bz X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 362494 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2020 10:52:31 -0000 Author: bz Date: Mon Jun 22 10:52:30 2020 New Revision: 362494 URL: https://svnweb.freebsd.org/changeset/base/362494 Log: MFC r362472: Rather than zeroing MAXVIFS times size of pointer [r362289] (still better than sizeof pointer before [r354857]), we need to zero MAXVIFS times the size of the struct. All good things come in threes; I hope this is it on this one. PR: 246629, 206583 Reported by: kib Modified: stable/12/sys/netinet/ip_mroute.c Modified: stable/12/sys/netinet/ip_mroute.c ============================================================================== --- stable/12/sys/netinet/ip_mroute.c Mon Jun 22 10:49:50 2020 (r362493) +++ stable/12/sys/netinet/ip_mroute.c Mon Jun 22 10:52:30 2020 (r362494) @@ -739,7 +739,7 @@ X_ip_mrouter_done(void) if_allmulti(ifp, 0); } } - bzero((caddr_t)V_viftable, sizeof(V_viftable) * MAXVIFS); + bzero((caddr_t)V_viftable, sizeof(*V_viftable) * MAXVIFS); V_numvifs = 0; V_pim_assert_enabled = 0; From owner-svn-src-stable@freebsd.org Mon Jun 22 19:09:17 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DC155338617; Mon, 22 Jun 2020 19:09:17 +0000 (UTC) (envelope-from pstef@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49rJqd5ZSxz4DXL; Mon, 22 Jun 2020 19:09:17 +0000 (UTC) (envelope-from pstef@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BAAD21330E; Mon, 22 Jun 2020 19:09:17 +0000 (UTC) (envelope-from pstef@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05MJ9HAP058125; Mon, 22 Jun 2020 19:09:17 GMT (envelope-from pstef@FreeBSD.org) Received: (from pstef@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05MJ9Hfr058124; Mon, 22 Jun 2020 19:09:17 GMT (envelope-from pstef@FreeBSD.org) Message-Id: <202006221909.05MJ9Hfr058124@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pstef set sender to pstef@FreeBSD.org using -f From: Piotr Pawel Stefaniak Date: Mon, 22 Jun 2020 19:09:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362506 - stable/12/share/man/man4 X-SVN-Group: stable-12 X-SVN-Commit-Author: pstef X-SVN-Commit-Paths: stable/12/share/man/man4 X-SVN-Commit-Revision: 362506 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2020 19:09:17 -0000 Author: pstef Date: Mon Jun 22 19:09:17 2020 New Revision: 362506 URL: https://svnweb.freebsd.org/changeset/base/362506 Log: MFC r357186 (by imp): Remove old device list Modified: stable/12/share/man/man4/umass.4 Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man4/umass.4 ============================================================================== --- stable/12/share/man/man4/umass.4 Mon Jun 22 19:03:02 2020 (r362505) +++ stable/12/share/man/man4/umass.4 Mon Jun 22 19:09:17 2020 (r362506) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 19, 2014 +.Dd January 27, 2020 .Dt UMASS 4 .Os .Sh NAME @@ -73,114 +73,6 @@ requires and .Xr scbus 4 to be included in the kernel. -.Sh HARDWARE -The -.Nm -driver supports USB Mass Storage devices, including: -.Pp -.Bl -bullet -compact -.It -ADTEC Stick Drive AD-UST32M, 64M, 128M, 256M -.It -Denno FireWire/USB2 Removable 2.5-inch HDD Case MIFU-25CB20 -.It -FujiFilm Zip USB Drive ZDR100 USB A -.It -GREEN HOUSE USB Flash Memory "PicoDrive" GH-UFD32M, 64M, 128M -.It -Huawei Mobile (SD slot) -.It -IBM 32MB USB Memory Key (P/N 22P5296) -.It -IBM 256MB USB Drive (MSYSTEM DiskOnKey2) -.It -IBM ThinkPad USB Portable CD-ROM Drive (P/N 33L5151) -.It -I-O DATA USB CD/CD-R/CD-RW/DVD-R/DVD-RW/DVD-RAM/DVD-ROM Drive DVR-iUH2 (CDROM, DVD-RAM only) -.It -I-O DATA USB x6 CD-RW Drive CDRW-i64/USB (CDROM only) -.It -I-O DATA USB/IEEE1394 Portable HD Drive HDP-i30P/CI, HDP-i40P/CI -.It -Iomega USB Zip 100/250 drive -.It -Iomega Zip750 USB2.0 drive -.It -Keian USB1.1/2.0 3.5-inch HDD Case KU350A -.It -Kurouto Shikou USB 2.5-inch HDD Case GAWAP2.5PS-USB2.0 -.It -LaCie P3 HardDrive USB 200GB -.It -Logitec LDR-H443U2 DVD-RAM/-R/+R/-RW/+RW drive -.It -Logitec Mobile USB Memory LMC-256UD -.It -Logitec USB1.1/2.0 HDD Unit SHD-E60U2 -.It -Logitec USB Double-Speed Floppy Drive LFD-31U2 -.It -Logitec USB/IEEE1394 DVD-RAM/R/RW Unit LDR-N21FU2 (CDROM only) -.It -MELCO USB Flash Disk "ClipDrive", RUF-C32M, -C64M, -C128M, -C256M, -C512M -.It -MELCO USB Flash Disk "PetitDrive", RUF-32M, -64M, -128M, -256Mm -.It -MELCO USB2.0 Flash Disk "PetitDrive2", RUF-256M/U2, -512M/U2 -.It -MELCO USB2.0 MO Drive MO-CH640U2 -.It -Matshita CF-VFDU03 floppy drive -.It -Merlin SM300 MP3/WMA Player (256Mb) -.It -Microtech International, Inc.\& USB-SCSI-HD 50 USB to SCSI cable -.It -Motorola E398 Mobile Phone (TransFlash memory card) -.It -NOVAC USB2.0 2.5/3.5-inch HDD Case NV-HD351U -.It -PNY Attache Flash Drive -.It -Panasonic ("Matshita FDD CF-VFDU03") -.It -Panasonic KXL-CB20AN Portable DVD-ROM/CD-R/RW -.It -Panasonic KXL-CB35AN (DVD-ROM & CD-R/RW) -.It -Panasonic USB2.0 Portable CD-RW Drive KXL-RW40AN (CDROM only) -.It -Panasonic floppy drive -.It -Qware BeatZkey!\& Pro -.It -RATOC Systems USB2.0 Removable HDD Case U2-MDK1, U2-MDK1B -.It -SanDisk SDDR-31 (Compact Flash) -.It -SanDisk SDDR-75 (only Compact Flash port works) -.It -Sitecom CN-300 MultiFlash (MMC/SD, SmartMedia, CF, MemoryStick) -.It -Sony Portable CD-R/RW Drive CRX10U (CDROM only) -.It -TEAC Portable USB CD-ROM Unit CD-110PU/210PU -.It -Time DPA20B MP3 Player (1Gb) -.It -Trek Thumbdrive 8MB -.It -VAIO floppy drive (includes Y-E Data Flashbuster-U) -.It -Y-E Data floppy drive (720/1.44/2.88Mb) -.El -.Pp -Among the supported digital cameras are: -.Pp -.Bl -bullet -compact -.It -Asahi Optical (PENTAX) Optio 230 & 330 -.El .Sh EXAMPLES .Bd -literal -offset indent device umass @@ -193,11 +85,6 @@ Add the .Nm driver to the kernel. .Pp -.Dl "camcontrol rescan 0" -.Pp -Rescan a Zip drive that was added after boot. -The command above -assumes that the Zip drive is on the first SCSI bus in the system. .Bd -literal -offset indent camcontrol rescan 0:0:0 camcontrol rescan 0:0:1 @@ -208,46 +95,14 @@ camcontrol rescan 0:0:3 Rescan all slots on a multi-slot flash reader, where the slots map to separate LUNs on a single SCSI ID. Typically only the first slot will be enabled at boot time. -Again, this assumes that the flash reader is the first SCSI bus in the system. -.Bd -literal -offset indent -bsdlabel -w da0 zip100 -newfs da0c -mount -t ufs /dev/da0c /mnt -.Ed -.Pp -Write a disklabel to the Zip drive (see -.Xr vpo 4 -for the -.Xr disktab 5 -entry), creates the file system and mounts the new file system on /mnt. -.Pp -.Dl "newfs_msdos /dev/da0" -.Pp -Create a new FAT type file system. -Care should be taken not to run -.Xr newfs 8 -on devices that already contain data, as this will result in the -information being lost. -.Pp -Many consumer devices such as digital cameras automatically create -.Tn MS-DOS -based file systems when storing information such as images and -videos. -These file systems can be accessed by specifying the file system -type as -.Cm msdosfs -when using -.Xr mount 8 . +This assumes that the flash reader is the first SCSI bus in the system and has 4 slots. .Sh SEE ALSO .Xr cfumass 4 , .Xr ehci 4 , .Xr ohci 4 , .Xr uhci 4 , .Xr usb 4 , -.Xr vpo 4 , .Xr xhci 4 , -.Xr disktab 5 , -.Xr bsdlabel 8 , .Xr camcontrol 8 .\".Sh HISTORY .Sh AUTHORS From owner-svn-src-stable@freebsd.org Mon Jun 22 19:09:48 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7791D338529; Mon, 22 Jun 2020 19:09:48 +0000 (UTC) (envelope-from pstef@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49rJrD2c12z4DpD; Mon, 22 Jun 2020 19:09:48 +0000 (UTC) (envelope-from pstef@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 54B131330F; Mon, 22 Jun 2020 19:09:48 +0000 (UTC) (envelope-from pstef@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05MJ9mYu058198; Mon, 22 Jun 2020 19:09:48 GMT (envelope-from pstef@FreeBSD.org) Received: (from pstef@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05MJ9mZ2058197; Mon, 22 Jun 2020 19:09:48 GMT (envelope-from pstef@FreeBSD.org) Message-Id: <202006221909.05MJ9mZ2058197@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pstef set sender to pstef@FreeBSD.org using -f From: Piotr Pawel Stefaniak Date: Mon, 22 Jun 2020 19:09:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r362507 - stable/11/share/man/man4 X-SVN-Group: stable-11 X-SVN-Commit-Author: pstef X-SVN-Commit-Paths: stable/11/share/man/man4 X-SVN-Commit-Revision: 362507 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2020 19:09:48 -0000 Author: pstef Date: Mon Jun 22 19:09:47 2020 New Revision: 362507 URL: https://svnweb.freebsd.org/changeset/base/362507 Log: MFC r357186 (by imp): Remove old device list Modified: stable/11/share/man/man4/umass.4 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/umass.4 ============================================================================== --- stable/11/share/man/man4/umass.4 Mon Jun 22 19:09:17 2020 (r362506) +++ stable/11/share/man/man4/umass.4 Mon Jun 22 19:09:47 2020 (r362507) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 19, 2014 +.Dd January 27, 2020 .Dt UMASS 4 .Os .Sh NAME @@ -73,114 +73,6 @@ requires and .Xr scbus 4 to be included in the kernel. -.Sh HARDWARE -The -.Nm -driver supports USB Mass Storage devices, including: -.Pp -.Bl -bullet -compact -.It -ADTEC Stick Drive AD-UST32M, 64M, 128M, 256M -.It -Denno FireWire/USB2 Removable 2.5-inch HDD Case MIFU-25CB20 -.It -FujiFilm Zip USB Drive ZDR100 USB A -.It -GREEN HOUSE USB Flash Memory "PicoDrive" GH-UFD32M, 64M, 128M -.It -Huawei Mobile (SD slot) -.It -IBM 32MB USB Memory Key (P/N 22P5296) -.It -IBM 256MB USB Drive (MSYSTEM DiskOnKey2) -.It -IBM ThinkPad USB Portable CD-ROM Drive (P/N 33L5151) -.It -I-O DATA USB CD/CD-R/CD-RW/DVD-R/DVD-RW/DVD-RAM/DVD-ROM Drive DVR-iUH2 (CDROM, DVD-RAM only) -.It -I-O DATA USB x6 CD-RW Drive CDRW-i64/USB (CDROM only) -.It -I-O DATA USB/IEEE1394 Portable HD Drive HDP-i30P/CI, HDP-i40P/CI -.It -Iomega USB Zip 100/250 drive -.It -Iomega Zip750 USB2.0 drive -.It -Keian USB1.1/2.0 3.5-inch HDD Case KU350A -.It -Kurouto Shikou USB 2.5-inch HDD Case GAWAP2.5PS-USB2.0 -.It -LaCie P3 HardDrive USB 200GB -.It -Logitec LDR-H443U2 DVD-RAM/-R/+R/-RW/+RW drive -.It -Logitec Mobile USB Memory LMC-256UD -.It -Logitec USB1.1/2.0 HDD Unit SHD-E60U2 -.It -Logitec USB Double-Speed Floppy Drive LFD-31U2 -.It -Logitec USB/IEEE1394 DVD-RAM/R/RW Unit LDR-N21FU2 (CDROM only) -.It -MELCO USB Flash Disk "ClipDrive", RUF-C32M, -C64M, -C128M, -C256M, -C512M -.It -MELCO USB Flash Disk "PetitDrive", RUF-32M, -64M, -128M, -256Mm -.It -MELCO USB2.0 Flash Disk "PetitDrive2", RUF-256M/U2, -512M/U2 -.It -MELCO USB2.0 MO Drive MO-CH640U2 -.It -Matshita CF-VFDU03 floppy drive -.It -Merlin SM300 MP3/WMA Player (256Mb) -.It -Microtech International, Inc.\& USB-SCSI-HD 50 USB to SCSI cable -.It -Motorola E398 Mobile Phone (TransFlash memory card) -.It -NOVAC USB2.0 2.5/3.5-inch HDD Case NV-HD351U -.It -PNY Attache Flash Drive -.It -Panasonic ("Matshita FDD CF-VFDU03") -.It -Panasonic KXL-CB20AN Portable DVD-ROM/CD-R/RW -.It -Panasonic KXL-CB35AN (DVD-ROM & CD-R/RW) -.It -Panasonic USB2.0 Portable CD-RW Drive KXL-RW40AN (CDROM only) -.It -Panasonic floppy drive -.It -Qware BeatZkey!\& Pro -.It -RATOC Systems USB2.0 Removable HDD Case U2-MDK1, U2-MDK1B -.It -SanDisk SDDR-31 (Compact Flash) -.It -SanDisk SDDR-75 (only Compact Flash port works) -.It -Sitecom CN-300 MultiFlash (MMC/SD, SmartMedia, CF, MemoryStick) -.It -Sony Portable CD-R/RW Drive CRX10U (CDROM only) -.It -TEAC Portable USB CD-ROM Unit CD-110PU/210PU -.It -Time DPA20B MP3 Player (1Gb) -.It -Trek Thumbdrive 8MB -.It -VAIO floppy drive (includes Y-E Data Flashbuster-U) -.It -Y-E Data floppy drive (720/1.44/2.88Mb) -.El -.Pp -Among the supported digital cameras are: -.Pp -.Bl -bullet -compact -.It -Asahi Optical (PENTAX) Optio 230 & 330 -.El .Sh EXAMPLES .Bd -literal -offset indent device umass @@ -193,11 +85,6 @@ Add the .Nm driver to the kernel. .Pp -.Dl "camcontrol rescan 0" -.Pp -Rescan a Zip drive that was added after boot. -The command above -assumes that the Zip drive is on the first SCSI bus in the system. .Bd -literal -offset indent camcontrol rescan 0:0:0 camcontrol rescan 0:0:1 @@ -208,46 +95,14 @@ camcontrol rescan 0:0:3 Rescan all slots on a multi-slot flash reader, where the slots map to separate LUNs on a single SCSI ID. Typically only the first slot will be enabled at boot time. -Again, this assumes that the flash reader is the first SCSI bus in the system. -.Bd -literal -offset indent -bsdlabel -w da0 zip100 -newfs da0c -mount -t ufs /dev/da0c /mnt -.Ed -.Pp -Write a disklabel to the Zip drive (see -.Xr vpo 4 -for the -.Xr disktab 5 -entry), creates the file system and mounts the new file system on /mnt. -.Pp -.Dl "newfs_msdos /dev/da0" -.Pp -Create a new FAT type file system. -Care should be taken not to run -.Xr newfs 8 -on devices that already contain data, as this will result in the -information being lost. -.Pp -Many consumer devices such as digital cameras automatically create -.Tn MS-DOS -based file systems when storing information such as images and -videos. -These file systems can be accessed by specifying the file system -type as -.Cm msdosfs -when using -.Xr mount 8 . +This assumes that the flash reader is the first SCSI bus in the system and has 4 slots. .Sh SEE ALSO .Xr cfumass 4 , .Xr ehci 4 , .Xr ohci 4 , .Xr uhci 4 , .Xr usb 4 , -.Xr vpo 4 , .Xr xhci 4 , -.Xr disktab 5 , -.Xr bsdlabel 8 , .Xr camcontrol 8 .\".Sh HISTORY .Sh AUTHORS From owner-svn-src-stable@freebsd.org Mon Jun 22 19:15:51 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A2D22338B97; Mon, 22 Jun 2020 19:15:51 +0000 (UTC) (envelope-from pstef@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49rJzC3pr9z4F5T; Mon, 22 Jun 2020 19:15:51 +0000 (UTC) (envelope-from pstef@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7E112135A3; Mon, 22 Jun 2020 19:15:51 +0000 (UTC) (envelope-from pstef@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05MJFppj064010; Mon, 22 Jun 2020 19:15:51 GMT (envelope-from pstef@FreeBSD.org) Received: (from pstef@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05MJFoR8064007; Mon, 22 Jun 2020 19:15:50 GMT (envelope-from pstef@FreeBSD.org) Message-Id: <202006221915.05MJFoR8064007@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pstef set sender to pstef@FreeBSD.org using -f From: Piotr Pawel Stefaniak Date: Mon, 22 Jun 2020 19:15:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362508 - stable/12/contrib/tnftp/src X-SVN-Group: stable-12 X-SVN-Commit-Author: pstef X-SVN-Commit-Paths: stable/12/contrib/tnftp/src X-SVN-Commit-Revision: 362508 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2020 19:15:51 -0000 Author: pstef Date: Mon Jun 22 19:15:50 2020 New Revision: 362508 URL: https://svnweb.freebsd.org/changeset/base/362508 Log: MFC r358405 (by hrs): Fix poor performance of ftp(1) due to small SO_SNDBUF and SO_RCVBUF. Modified: stable/12/contrib/tnftp/src/cmds.c stable/12/contrib/tnftp/src/ftp_var.h stable/12/contrib/tnftp/src/main.c stable/12/contrib/tnftp/src/util.c Directory Properties: stable/12/ (props changed) Modified: stable/12/contrib/tnftp/src/cmds.c ============================================================================== --- stable/12/contrib/tnftp/src/cmds.c Mon Jun 22 19:09:47 2020 (r362507) +++ stable/12/contrib/tnftp/src/cmds.c Mon Jun 22 19:15:50 2020 (r362508) @@ -2653,10 +2653,14 @@ setxferbuf(int argc, char *argv[]) goto usage; } - if (dir & RATE_PUT) + if (dir & RATE_PUT) { sndbuf_size = size; - if (dir & RATE_GET) + auto_sndbuf = 0; + } + if (dir & RATE_GET) { rcvbuf_size = size; + auto_rcvbuf = 0; + } fprintf(ttyout, "Socket buffer sizes: send %d, receive %d.\n", sndbuf_size, rcvbuf_size); code = 0; Modified: stable/12/contrib/tnftp/src/ftp_var.h ============================================================================== --- stable/12/contrib/tnftp/src/ftp_var.h Mon Jun 22 19:09:47 2020 (r362507) +++ stable/12/contrib/tnftp/src/ftp_var.h Mon Jun 22 19:15:50 2020 (r362508) @@ -298,6 +298,8 @@ GLOBAL int options; /* used during socket creation */ GLOBAL int sndbuf_size; /* socket send buffer size */ GLOBAL int rcvbuf_size; /* socket receive buffer size */ +GLOBAL int auto_sndbuf; /* flag: if != 0 then use auto sndbuf size */ +GLOBAL int auto_rcvbuf; /* flag: if != 0 then use auto rcvbuf size */ GLOBAL int macnum; /* number of defined macros */ GLOBAL struct macel macros[16]; Modified: stable/12/contrib/tnftp/src/main.c ============================================================================== --- stable/12/contrib/tnftp/src/main.c Mon Jun 22 19:09:47 2020 (r362507) +++ stable/12/contrib/tnftp/src/main.c Mon Jun 22 19:15:50 2020 (r362508) @@ -127,6 +127,9 @@ __RCSID(" NetBSD: main.c,v 1.117 2009/07/13 19:05:41 r #include #endif /* tnftp */ +#ifdef __FreeBSD__ +#include +#endif #define GLOBAL /* force GLOBAL decls in ftp_var.h to be declared */ #include "ftp_var.h" @@ -509,6 +512,13 @@ main(int volatile argc, char **volatile argv) (void)xsignal(SIGUSR1, crankrate); (void)xsignal(SIGUSR2, crankrate); (void)xsignal(SIGWINCH, setttywidth); + + auto_rcvbuf = ((sysctlbyname("net.inet.tcp.recvbuf_auto", + &auto_rcvbuf, &(size_t []){[0] = sizeof(int)}[0], NULL, 0) == 0) && + auto_rcvbuf == 1); + auto_sndbuf = ((sysctlbyname("net.inet.tcp.sendbuf_auto", + &auto_sndbuf, &(size_t []){[0] = sizeof(int)}[0], NULL, 0) == 0) && + auto_sndbuf == 1); if (argc > 0) { if (isupload) { Modified: stable/12/contrib/tnftp/src/util.c ============================================================================== --- stable/12/contrib/tnftp/src/util.c Mon Jun 22 19:09:47 2020 (r362507) +++ stable/12/contrib/tnftp/src/util.c Mon Jun 22 19:15:50 2020 (r362508) @@ -1087,13 +1087,27 @@ setupsockbufsize(int sock) sndbuf_size); } +#ifdef __FreeBSD__ + DPRINTF("auto_rcvbuf = %d\n", auto_rcvbuf); + if (auto_sndbuf == 0) { +#endif if (setsockopt(sock, SOL_SOCKET, SO_SNDBUF, (void *)&sndbuf_size, sizeof(sndbuf_size)) == -1) warn("Unable to set sndbuf size %d", sndbuf_size); +#ifdef __FreeBSD__ + } +#endif +#ifdef __FreeBSD__ + DPRINTF("auto_sndbuf = %d\n", auto_sndbuf); + if (auto_rcvbuf == 0) { +#endif if (setsockopt(sock, SOL_SOCKET, SO_RCVBUF, (void *)&rcvbuf_size, sizeof(rcvbuf_size)) == -1) warn("Unable to set rcvbuf size %d", rcvbuf_size); +#ifdef __FreeBSD__ + } +#endif } /* From owner-svn-src-stable@freebsd.org Mon Jun 22 21:28:52 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B20D433CC54; Mon, 22 Jun 2020 21:28:52 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49rMwh4JfXz4Rtw; Mon, 22 Jun 2020 21:28:52 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8F1F81497E; Mon, 22 Jun 2020 21:28:52 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05MLSquS048471; Mon, 22 Jun 2020 21:28:52 GMT (envelope-from freqlabs@FreeBSD.org) Received: (from freqlabs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05MLSpQZ048464; Mon, 22 Jun 2020 21:28:51 GMT (envelope-from freqlabs@FreeBSD.org) Message-Id: <202006222128.05MLSpQZ048464@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: freqlabs set sender to freqlabs@FreeBSD.org using -f From: Ryan Moeller Date: Mon, 22 Jun 2020 21:28:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r362511 - in stable: 11/sys/dev/cxgb 11/sys/dev/cxgbe 11/sys/dev/mlx4/mlx4_en 11/sys/dev/mlx5/mlx5_en 11/sys/dev/mxge 11/sys/dev/oce 12/sys/dev/cxgb 12/sys/dev/cxgbe 12/sys/dev/mlx4/mlx... X-SVN-Group: stable-11 X-SVN-Commit-Author: freqlabs X-SVN-Commit-Paths: in stable: 11/sys/dev/cxgb 11/sys/dev/cxgbe 11/sys/dev/mlx4/mlx4_en 11/sys/dev/mlx5/mlx5_en 11/sys/dev/mxge 11/sys/dev/oce 12/sys/dev/cxgb 12/sys/dev/cxgbe 12/sys/dev/mlx4/mlx4_en 12/sys/dev/mlx5/mlx5... X-SVN-Commit-Revision: 362511 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2020 21:28:52 -0000 Author: freqlabs Date: Mon Jun 22 21:28:51 2020 New Revision: 362511 URL: https://svnweb.freebsd.org/changeset/base/362511 Log: MFC r362201: Avoid trying to toggle TSO twice Remove TSO from the toggle mask when automatically disabled by TXCKSUM* in various NIC drivers. Reviewed by: hselasky, np, gallatin, jpaetzel Approved by: mav (mentor) Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D25120 Modified: stable/11/sys/dev/cxgb/cxgb_main.c stable/11/sys/dev/cxgbe/t4_main.c stable/11/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c stable/11/sys/dev/mxge/if_mxge.c stable/11/sys/dev/oce/oce_if.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/sys/dev/cxgb/cxgb_main.c stable/12/sys/dev/cxgbe/t4_main.c stable/12/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c stable/12/sys/dev/mxge/if_mxge.c stable/12/sys/dev/oce/oce_if.c Directory Properties: stable/12/ (props changed) Modified: stable/11/sys/dev/cxgb/cxgb_main.c ============================================================================== --- stable/11/sys/dev/cxgb/cxgb_main.c Mon Jun 22 20:55:45 2020 (r362510) +++ stable/11/sys/dev/cxgb/cxgb_main.c Mon Jun 22 21:28:51 2020 (r362511) @@ -1952,6 +1952,7 @@ fail: if (IFCAP_TSO4 & ifp->if_capenable && !(IFCAP_TXCSUM & ifp->if_capenable)) { + mask &= ~IFCAP_TSO4; ifp->if_capenable &= ~IFCAP_TSO4; if_printf(ifp, "tso4 disabled due to -txcsum.\n"); @@ -1963,6 +1964,7 @@ fail: if (IFCAP_TSO6 & ifp->if_capenable && !(IFCAP_TXCSUM_IPV6 & ifp->if_capenable)) { + mask &= ~IFCAP_TSO6; ifp->if_capenable &= ~IFCAP_TSO6; if_printf(ifp, "tso6 disabled due to -txcsum6.\n"); Modified: stable/11/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/11/sys/dev/cxgbe/t4_main.c Mon Jun 22 20:55:45 2020 (r362510) +++ stable/11/sys/dev/cxgbe/t4_main.c Mon Jun 22 21:28:51 2020 (r362511) @@ -1865,6 +1865,7 @@ cxgbe_ioctl(struct ifnet *ifp, unsigned long cmd, cadd if (IFCAP_TSO4 & ifp->if_capenable && !(IFCAP_TXCSUM & ifp->if_capenable)) { + mask &= ~IFCAP_TSO4; ifp->if_capenable &= ~IFCAP_TSO4; if_printf(ifp, "tso4 disabled due to -txcsum.\n"); @@ -1876,6 +1877,7 @@ cxgbe_ioctl(struct ifnet *ifp, unsigned long cmd, cadd if (IFCAP_TSO6 & ifp->if_capenable && !(IFCAP_TXCSUM_IPV6 & ifp->if_capenable)) { + mask &= ~IFCAP_TSO6; ifp->if_capenable &= ~IFCAP_TSO6; if_printf(ifp, "tso6 disabled due to -txcsum6.\n"); Modified: stable/11/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c ============================================================================== --- stable/11/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Mon Jun 22 20:55:45 2020 (r362510) +++ stable/11/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Mon Jun 22 21:28:51 2020 (r362511) @@ -2006,6 +2006,7 @@ static int mlx4_en_ioctl(struct ifnet *dev, u_long com if (IFCAP_TSO4 & dev->if_capenable && !(IFCAP_TXCSUM & dev->if_capenable)) { + mask &= ~IFCAP_TSO4; dev->if_capenable &= ~IFCAP_TSO4; dev->if_hwassist &= ~CSUM_IP_TSO; if_printf(dev, @@ -2018,6 +2019,7 @@ static int mlx4_en_ioctl(struct ifnet *dev, u_long com if (IFCAP_TSO6 & dev->if_capenable && !(IFCAP_TXCSUM_IPV6 & dev->if_capenable)) { + mask &= ~IFCAP_TSO6; dev->if_capenable &= ~IFCAP_TSO6; dev->if_hwassist &= ~CSUM_IP6_TSO; if_printf(dev, Modified: stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Mon Jun 22 20:55:45 2020 (r362510) +++ stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Mon Jun 22 21:28:51 2020 (r362511) @@ -3167,6 +3167,7 @@ mlx5e_ioctl(struct ifnet *ifp, u_long command, caddr_t if (IFCAP_TSO4 & ifp->if_capenable && !(IFCAP_TXCSUM & ifp->if_capenable)) { + mask &= ~IFCAP_TSO4; ifp->if_capenable &= ~IFCAP_TSO4; ifp->if_hwassist &= ~CSUM_IP_TSO; mlx5_en_err(ifp, @@ -3179,6 +3180,7 @@ mlx5e_ioctl(struct ifnet *ifp, u_long command, caddr_t if (IFCAP_TSO6 & ifp->if_capenable && !(IFCAP_TXCSUM_IPV6 & ifp->if_capenable)) { + mask &= ~IFCAP_TSO6; ifp->if_capenable &= ~IFCAP_TSO6; ifp->if_hwassist &= ~CSUM_IP6_TSO; mlx5_en_err(ifp, Modified: stable/11/sys/dev/mxge/if_mxge.c ============================================================================== --- stable/11/sys/dev/mxge/if_mxge.c Mon Jun 22 20:55:45 2020 (r362510) +++ stable/11/sys/dev/mxge/if_mxge.c Mon Jun 22 21:28:51 2020 (r362511) @@ -4201,13 +4201,15 @@ mxge_ioctl(struct ifnet *ifp, u_long command, caddr_t mask = ifr->ifr_reqcap ^ ifp->if_capenable; if (mask & IFCAP_TXCSUM) { if (IFCAP_TXCSUM & ifp->if_capenable) { + mask &= ~IFCAP_TSO4; ifp->if_capenable &= ~(IFCAP_TXCSUM|IFCAP_TSO4); ifp->if_hwassist &= ~(CSUM_TCP | CSUM_UDP); } else { ifp->if_capenable |= IFCAP_TXCSUM; ifp->if_hwassist |= (CSUM_TCP | CSUM_UDP); } - } else if (mask & IFCAP_RXCSUM) { + } + if (mask & IFCAP_RXCSUM) { if (IFCAP_RXCSUM & ifp->if_capenable) { ifp->if_capenable &= ~IFCAP_RXCSUM; } else { @@ -4229,6 +4231,7 @@ mxge_ioctl(struct ifnet *ifp, u_long command, caddr_t #if IFCAP_TSO6 if (mask & IFCAP_TXCSUM_IPV6) { if (IFCAP_TXCSUM_IPV6 & ifp->if_capenable) { + mask &= ~IFCAP_TSO6; ifp->if_capenable &= ~(IFCAP_TXCSUM_IPV6 | IFCAP_TSO6); ifp->if_hwassist &= ~(CSUM_TCP_IPV6 @@ -4238,7 +4241,8 @@ mxge_ioctl(struct ifnet *ifp, u_long command, caddr_t ifp->if_hwassist |= (CSUM_TCP_IPV6 | CSUM_UDP_IPV6); } - } else if (mask & IFCAP_RXCSUM_IPV6) { + } + if (mask & IFCAP_RXCSUM_IPV6) { if (IFCAP_RXCSUM_IPV6 & ifp->if_capenable) { ifp->if_capenable &= ~IFCAP_RXCSUM_IPV6; } else { Modified: stable/11/sys/dev/oce/oce_if.c ============================================================================== --- stable/11/sys/dev/oce/oce_if.c Mon Jun 22 20:55:45 2020 (r362510) +++ stable/11/sys/dev/oce/oce_if.c Mon Jun 22 21:28:51 2020 (r362511) @@ -534,6 +534,7 @@ oce_ioctl(struct ifnet *ifp, u_long command, caddr_t d if (IFCAP_TSO & ifp->if_capenable && !(IFCAP_TXCSUM & ifp->if_capenable)) { + u &= ~IFCAP_TSO; ifp->if_capenable &= ~IFCAP_TSO; ifp->if_hwassist &= ~CSUM_TSO; if_printf(ifp, From owner-svn-src-stable@freebsd.org Mon Jun 22 21:28:54 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0E35933CC5E; Mon, 22 Jun 2020 21:28:54 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49rMwj6dXhz4Rqt; Mon, 22 Jun 2020 21:28:53 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DEEE614A5A; Mon, 22 Jun 2020 21:28:53 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05MLSrSe048484; Mon, 22 Jun 2020 21:28:53 GMT (envelope-from freqlabs@FreeBSD.org) Received: (from freqlabs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05MLSqMV048477; Mon, 22 Jun 2020 21:28:52 GMT (envelope-from freqlabs@FreeBSD.org) Message-Id: <202006222128.05MLSqMV048477@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: freqlabs set sender to freqlabs@FreeBSD.org using -f From: Ryan Moeller Date: Mon, 22 Jun 2020 21:28:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362511 - in stable: 11/sys/dev/cxgb 11/sys/dev/cxgbe 11/sys/dev/mlx4/mlx4_en 11/sys/dev/mlx5/mlx5_en 11/sys/dev/mxge 11/sys/dev/oce 12/sys/dev/cxgb 12/sys/dev/cxgbe 12/sys/dev/mlx4/mlx... X-SVN-Group: stable-12 X-SVN-Commit-Author: freqlabs X-SVN-Commit-Paths: in stable: 11/sys/dev/cxgb 11/sys/dev/cxgbe 11/sys/dev/mlx4/mlx4_en 11/sys/dev/mlx5/mlx5_en 11/sys/dev/mxge 11/sys/dev/oce 12/sys/dev/cxgb 12/sys/dev/cxgbe 12/sys/dev/mlx4/mlx4_en 12/sys/dev/mlx5/mlx5... X-SVN-Commit-Revision: 362511 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2020 21:28:54 -0000 Author: freqlabs Date: Mon Jun 22 21:28:51 2020 New Revision: 362511 URL: https://svnweb.freebsd.org/changeset/base/362511 Log: MFC r362201: Avoid trying to toggle TSO twice Remove TSO from the toggle mask when automatically disabled by TXCKSUM* in various NIC drivers. Reviewed by: hselasky, np, gallatin, jpaetzel Approved by: mav (mentor) Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D25120 Modified: stable/12/sys/dev/cxgb/cxgb_main.c stable/12/sys/dev/cxgbe/t4_main.c stable/12/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c stable/12/sys/dev/mxge/if_mxge.c stable/12/sys/dev/oce/oce_if.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/dev/cxgb/cxgb_main.c stable/11/sys/dev/cxgbe/t4_main.c stable/11/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c stable/11/sys/dev/mlx5/mlx5_en/mlx5_en_main.c stable/11/sys/dev/mxge/if_mxge.c stable/11/sys/dev/oce/oce_if.c Directory Properties: stable/11/ (props changed) Modified: stable/12/sys/dev/cxgb/cxgb_main.c ============================================================================== --- stable/12/sys/dev/cxgb/cxgb_main.c Mon Jun 22 20:55:45 2020 (r362510) +++ stable/12/sys/dev/cxgb/cxgb_main.c Mon Jun 22 21:28:51 2020 (r362511) @@ -1961,6 +1961,7 @@ fail: if (IFCAP_TSO4 & ifp->if_capenable && !(IFCAP_TXCSUM & ifp->if_capenable)) { + mask &= ~IFCAP_TSO4; ifp->if_capenable &= ~IFCAP_TSO4; if_printf(ifp, "tso4 disabled due to -txcsum.\n"); @@ -1972,6 +1973,7 @@ fail: if (IFCAP_TSO6 & ifp->if_capenable && !(IFCAP_TXCSUM_IPV6 & ifp->if_capenable)) { + mask &= ~IFCAP_TSO6; ifp->if_capenable &= ~IFCAP_TSO6; if_printf(ifp, "tso6 disabled due to -txcsum6.\n"); Modified: stable/12/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_main.c Mon Jun 22 20:55:45 2020 (r362510) +++ stable/12/sys/dev/cxgbe/t4_main.c Mon Jun 22 21:28:51 2020 (r362511) @@ -1914,6 +1914,7 @@ cxgbe_ioctl(struct ifnet *ifp, unsigned long cmd, cadd if (IFCAP_TSO4 & ifp->if_capenable && !(IFCAP_TXCSUM & ifp->if_capenable)) { + mask &= ~IFCAP_TSO4; ifp->if_capenable &= ~IFCAP_TSO4; if_printf(ifp, "tso4 disabled due to -txcsum.\n"); @@ -1925,6 +1926,7 @@ cxgbe_ioctl(struct ifnet *ifp, unsigned long cmd, cadd if (IFCAP_TSO6 & ifp->if_capenable && !(IFCAP_TXCSUM_IPV6 & ifp->if_capenable)) { + mask &= ~IFCAP_TSO6; ifp->if_capenable &= ~IFCAP_TSO6; if_printf(ifp, "tso6 disabled due to -txcsum6.\n"); Modified: stable/12/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c ============================================================================== --- stable/12/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Mon Jun 22 20:55:45 2020 (r362510) +++ stable/12/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Mon Jun 22 21:28:51 2020 (r362511) @@ -2008,6 +2008,7 @@ static int mlx4_en_ioctl(struct ifnet *dev, u_long com if (IFCAP_TSO4 & dev->if_capenable && !(IFCAP_TXCSUM & dev->if_capenable)) { + mask &= ~IFCAP_TSO4; dev->if_capenable &= ~IFCAP_TSO4; dev->if_hwassist &= ~CSUM_IP_TSO; if_printf(dev, @@ -2020,6 +2021,7 @@ static int mlx4_en_ioctl(struct ifnet *dev, u_long com if (IFCAP_TSO6 & dev->if_capenable && !(IFCAP_TXCSUM_IPV6 & dev->if_capenable)) { + mask &= ~IFCAP_TSO6; dev->if_capenable &= ~IFCAP_TSO6; dev->if_hwassist &= ~CSUM_IP6_TSO; if_printf(dev, Modified: stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c ============================================================================== --- stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Mon Jun 22 20:55:45 2020 (r362510) +++ stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Mon Jun 22 21:28:51 2020 (r362511) @@ -3285,6 +3285,7 @@ mlx5e_ioctl(struct ifnet *ifp, u_long command, caddr_t if (IFCAP_TSO4 & ifp->if_capenable && !(IFCAP_TXCSUM & ifp->if_capenable)) { + mask &= ~IFCAP_TSO4; ifp->if_capenable &= ~IFCAP_TSO4; ifp->if_hwassist &= ~CSUM_IP_TSO; mlx5_en_err(ifp, @@ -3297,6 +3298,7 @@ mlx5e_ioctl(struct ifnet *ifp, u_long command, caddr_t if (IFCAP_TSO6 & ifp->if_capenable && !(IFCAP_TXCSUM_IPV6 & ifp->if_capenable)) { + mask &= ~IFCAP_TSO6; ifp->if_capenable &= ~IFCAP_TSO6; ifp->if_hwassist &= ~CSUM_IP6_TSO; mlx5_en_err(ifp, Modified: stable/12/sys/dev/mxge/if_mxge.c ============================================================================== --- stable/12/sys/dev/mxge/if_mxge.c Mon Jun 22 20:55:45 2020 (r362510) +++ stable/12/sys/dev/mxge/if_mxge.c Mon Jun 22 21:28:51 2020 (r362511) @@ -4246,13 +4246,15 @@ mxge_ioctl(struct ifnet *ifp, u_long command, caddr_t mask = ifr->ifr_reqcap ^ ifp->if_capenable; if (mask & IFCAP_TXCSUM) { if (IFCAP_TXCSUM & ifp->if_capenable) { + mask &= ~IFCAP_TSO4; ifp->if_capenable &= ~(IFCAP_TXCSUM|IFCAP_TSO4); ifp->if_hwassist &= ~(CSUM_TCP | CSUM_UDP); } else { ifp->if_capenable |= IFCAP_TXCSUM; ifp->if_hwassist |= (CSUM_TCP | CSUM_UDP); } - } else if (mask & IFCAP_RXCSUM) { + } + if (mask & IFCAP_RXCSUM) { if (IFCAP_RXCSUM & ifp->if_capenable) { ifp->if_capenable &= ~IFCAP_RXCSUM; } else { @@ -4274,6 +4276,7 @@ mxge_ioctl(struct ifnet *ifp, u_long command, caddr_t #if IFCAP_TSO6 if (mask & IFCAP_TXCSUM_IPV6) { if (IFCAP_TXCSUM_IPV6 & ifp->if_capenable) { + mask &= ~IFCAP_TSO6; ifp->if_capenable &= ~(IFCAP_TXCSUM_IPV6 | IFCAP_TSO6); ifp->if_hwassist &= ~(CSUM_TCP_IPV6 @@ -4283,7 +4286,8 @@ mxge_ioctl(struct ifnet *ifp, u_long command, caddr_t ifp->if_hwassist |= (CSUM_TCP_IPV6 | CSUM_UDP_IPV6); } - } else if (mask & IFCAP_RXCSUM_IPV6) { + } + if (mask & IFCAP_RXCSUM_IPV6) { if (IFCAP_RXCSUM_IPV6 & ifp->if_capenable) { ifp->if_capenable &= ~IFCAP_RXCSUM_IPV6; } else { Modified: stable/12/sys/dev/oce/oce_if.c ============================================================================== --- stable/12/sys/dev/oce/oce_if.c Mon Jun 22 20:55:45 2020 (r362510) +++ stable/12/sys/dev/oce/oce_if.c Mon Jun 22 21:28:51 2020 (r362511) @@ -539,6 +539,7 @@ oce_ioctl(struct ifnet *ifp, u_long command, caddr_t d if (IFCAP_TSO & ifp->if_capenable && !(IFCAP_TXCSUM & ifp->if_capenable)) { + u &= ~IFCAP_TSO; ifp->if_capenable &= ~IFCAP_TSO; ifp->if_hwassist &= ~CSUM_TSO; if_printf(ifp, From owner-svn-src-stable@freebsd.org Mon Jun 22 21:41:51 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CFF8133CDD4; Mon, 22 Jun 2020 21:41:51 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49rNCg52kXz4SQK; Mon, 22 Jun 2020 21:41:51 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A852015017; Mon, 22 Jun 2020 21:41:51 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05MLfpHa060349; Mon, 22 Jun 2020 21:41:51 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05MLfpvQ060348; Mon, 22 Jun 2020 21:41:51 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <202006222141.05MLfpvQ060348@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Mon, 22 Jun 2020 21:41:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r362512 - stable/11/release/doc/en_US.ISO8859-1/hardware X-SVN-Group: stable-11 X-SVN-Commit-Author: hrs X-SVN-Commit-Paths: stable/11/release/doc/en_US.ISO8859-1/hardware X-SVN-Commit-Revision: 362512 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2020 21:41:51 -0000 Author: hrs Date: Mon Jun 22 21:41:51 2020 New Revision: 362512 URL: https://svnweb.freebsd.org/changeset/base/362512 Log: Fix a build error due to removal of hardware section in umass(4). Modified: stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml Mon Jun 22 21:28:51 2020 (r362511) +++ stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml Mon Jun 22 21:41:51 2020 (r362512) @@ -1543,8 +1543,6 @@ &hwlist.umct; - &hwlist.umass; - [&arch.amd64;, &arch.i386;, &arch.pc98;] Audio Devices (&man.uaudio.4; driver) From owner-svn-src-stable@freebsd.org Mon Jun 22 21:59:43 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2A92533DDA0; Mon, 22 Jun 2020 21:59:43 +0000 (UTC) (envelope-from pstef@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49rNcH0Lbwz4TXl; Mon, 22 Jun 2020 21:59:43 +0000 (UTC) (envelope-from pstef@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1403) id E05181963E; Mon, 22 Jun 2020 21:59:42 +0000 (UTC) Date: Mon, 22 Jun 2020 23:59:42 +0200 From: "Piotr P. Stefaniak" To: Hiroki Sato Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: Re: svn commit: r362512 - stable/11/release/doc/en_US.ISO8859-1/hardware Message-ID: <20200622215942.GD28243@freefall.freebsd.org> References: <202006222141.05MLfpvQ060348@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <202006222141.05MLfpvQ060348@repo.freebsd.org> X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2020 21:59:43 -0000 On 2020-06-22 21:41:51, Hiroki Sato wrote: >Author: hrs >Date: Mon Jun 22 21:41:51 2020 >New Revision: 362512 >URL: https://svnweb.freebsd.org/changeset/base/362512 > >Log: > Fix a build error due to removal of hardware section in umass(4). Oops, sorry, I didn't predict that. Thank you for the fix! From owner-svn-src-stable@freebsd.org Tue Jun 23 03:17:15 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8D4203462DC; Tue, 23 Jun 2020 03:17:15 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49rWfg37qzz3ZZV; Tue, 23 Jun 2020 03:17:15 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6648718F7E; Tue, 23 Jun 2020 03:17:15 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05N3HFe5064018; Tue, 23 Jun 2020 03:17:15 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05N3HFKe064017; Tue, 23 Jun 2020 03:17:15 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202006230317.05N3HFKe064017@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 23 Jun 2020 03:17:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362524 - stable/12/libexec/rtld-elf X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/libexec/rtld-elf X-SVN-Commit-Revision: 362524 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jun 2020 03:17:15 -0000 Author: kib Date: Tue Jun 23 03:17:14 2020 New Revision: 362524 URL: https://svnweb.freebsd.org/changeset/base/362524 Log: MFC r362249: Systematically pass RTLD_LO_TRACE to load_needed_objects(). Modified: stable/12/libexec/rtld-elf/rtld.c Directory Properties: stable/12/ (props changed) Modified: stable/12/libexec/rtld-elf/rtld.c ============================================================================== --- stable/12/libexec/rtld-elf/rtld.c Tue Jun 23 00:02:28 2020 (r362523) +++ stable/12/libexec/rtld-elf/rtld.c Tue Jun 23 03:17:14 2020 (r362524) @@ -685,7 +685,8 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entr preload_tail = globallist_curr(TAILQ_LAST(&obj_list, obj_entry_q)); dbg("loading needed objects"); - if (load_needed_objects(obj_main, 0) == -1) + if (load_needed_objects(obj_main, ld_tracing != NULL ? RTLD_LO_TRACE : + 0) == -1) rtld_die(); /* Make a list of all objects loaded at startup. */ @@ -3425,7 +3426,7 @@ dlopen_object(const char *name, int fd, Obj_Entry *ref } if (result != -1) result = load_needed_objects(obj, lo_flags & (RTLD_LO_DLOPEN | - RTLD_LO_EARLY | RTLD_LO_IGNSTLS)); + RTLD_LO_EARLY | RTLD_LO_IGNSTLS | RTLD_LO_TRACE)); init_dag(obj); ref_dag(obj); if (result != -1) From owner-svn-src-stable@freebsd.org Tue Jun 23 03:18:08 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 05110346574; Tue, 23 Jun 2020 03:18:08 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49rWgg6MCCz3ZmG; Tue, 23 Jun 2020 03:18:07 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D57B819321; Tue, 23 Jun 2020 03:18:07 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05N3I787064118; Tue, 23 Jun 2020 03:18:07 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05N3I7pk064117; Tue, 23 Jun 2020 03:18:07 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202006230318.05N3I7pk064117@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 23 Jun 2020 03:18:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362525 - stable/12/libexec/rtld-elf X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/libexec/rtld-elf X-SVN-Commit-Revision: 362525 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jun 2020 03:18:08 -0000 Author: kib Date: Tue Jun 23 03:18:07 2020 New Revision: 362525 URL: https://svnweb.freebsd.org/changeset/base/362525 Log: MFC r362250: rtld: Add debug line for dlopen_object(). Modified: stable/12/libexec/rtld-elf/rtld.c Directory Properties: stable/12/ (props changed) Modified: stable/12/libexec/rtld-elf/rtld.c ============================================================================== --- stable/12/libexec/rtld-elf/rtld.c Tue Jun 23 03:17:14 2020 (r362524) +++ stable/12/libexec/rtld-elf/rtld.c Tue Jun 23 03:18:07 2020 (r362525) @@ -3391,6 +3391,9 @@ dlopen_object(const char *name, int fd, Obj_Entry *ref RtldLockState mlockstate; int result; + dbg("dlopen_object name \"%s\" fd %d refobj \"%s\" lo_flags %#x mode %#x", + name != NULL ? name : "", fd, refobj == NULL ? "" : + refobj->path, lo_flags, mode); objlist_init(&initlist); if (lockstate == NULL && !(lo_flags & RTLD_LO_EARLY)) { From owner-svn-src-stable@freebsd.org Tue Jun 23 03:18:57 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BE527346848; Tue, 23 Jun 2020 03:18:57 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49rWhd4Ywdz3Zxb; Tue, 23 Jun 2020 03:18:57 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 97E5519322; Tue, 23 Jun 2020 03:18:57 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05N3IvbB064204; Tue, 23 Jun 2020 03:18:57 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05N3IviG064203; Tue, 23 Jun 2020 03:18:57 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202006230318.05N3IviG064203@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 23 Jun 2020 03:18:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362526 - stable/12/libexec/rtld-elf X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/libexec/rtld-elf X-SVN-Commit-Revision: 362526 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jun 2020 03:18:57 -0000 Author: kib Date: Tue Jun 23 03:18:57 2020 New Revision: 362526 URL: https://svnweb.freebsd.org/changeset/base/362526 Log: MFC r362251: rtld: Allow to load ET_DYN && DF_1_PIE when tracing. Modified: stable/12/libexec/rtld-elf/rtld.c Directory Properties: stable/12/ (props changed) Modified: stable/12/libexec/rtld-elf/rtld.c ============================================================================== --- stable/12/libexec/rtld-elf/rtld.c Tue Jun 23 03:18:07 2020 (r362525) +++ stable/12/libexec/rtld-elf/rtld.c Tue Jun 23 03:18:57 2020 (r362526) @@ -2565,12 +2565,13 @@ do_load_object(int fd, const char *name, char *path, s obj->path = path; if (!digest_dynamic(obj, 0)) goto errp; - if (obj->z_pie) { + dbg("%s valid_hash_sysv %d valid_hash_gnu %d dynsymcount %d", obj->path, + obj->valid_hash_sysv, obj->valid_hash_gnu, obj->dynsymcount); + if (obj->z_pie && (flags & RTLD_LO_TRACE) == 0) { + dbg("refusing to load PIE executable \"%s\"", obj->path); _rtld_error("Cannot load PIE binary %s as DSO", obj->path); goto errp; } - dbg("%s valid_hash_sysv %d valid_hash_gnu %d dynsymcount %d", obj->path, - obj->valid_hash_sysv, obj->valid_hash_gnu, obj->dynsymcount); if (obj->z_noopen && (flags & (RTLD_LO_DLOPEN | RTLD_LO_TRACE)) == RTLD_LO_DLOPEN) { dbg("refusing to load non-loadable \"%s\"", obj->path); From owner-svn-src-stable@freebsd.org Tue Jun 23 03:31:35 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 77F9C347272; Tue, 23 Jun 2020 03:31:35 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49rWzC2d51z3f1T; Tue, 23 Jun 2020 03:31:35 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 556A619E6F; Tue, 23 Jun 2020 03:31:35 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05N3VZaA075995; Tue, 23 Jun 2020 03:31:35 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05N3VZIE075994; Tue, 23 Jun 2020 03:31:35 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202006230331.05N3VZIE075994@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 23 Jun 2020 03:31:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r362527 - stable/11/libexec/rtld-elf X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/libexec/rtld-elf X-SVN-Commit-Revision: 362527 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jun 2020 03:31:35 -0000 Author: kib Date: Tue Jun 23 03:31:34 2020 New Revision: 362527 URL: https://svnweb.freebsd.org/changeset/base/362527 Log: MFC r362249: Systematically pass RTLD_LO_TRACE to load_needed_objects(). Modified: stable/11/libexec/rtld-elf/rtld.c Directory Properties: stable/11/ (props changed) Modified: stable/11/libexec/rtld-elf/rtld.c ============================================================================== --- stable/11/libexec/rtld-elf/rtld.c Tue Jun 23 03:18:57 2020 (r362526) +++ stable/11/libexec/rtld-elf/rtld.c Tue Jun 23 03:31:34 2020 (r362527) @@ -689,7 +689,8 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entr preload_tail = globallist_curr(TAILQ_LAST(&obj_list, obj_entry_q)); dbg("loading needed objects"); - if (load_needed_objects(obj_main, 0) == -1) + if (load_needed_objects(obj_main, ld_tracing != NULL ? RTLD_LO_TRACE : + 0) == -1) rtld_die(); /* Make a list of all objects loaded at startup. */ @@ -3398,7 +3399,7 @@ dlopen_object(const char *name, int fd, Obj_Entry *ref } if (result != -1) result = load_needed_objects(obj, lo_flags & (RTLD_LO_DLOPEN | - RTLD_LO_EARLY | RTLD_LO_IGNSTLS)); + RTLD_LO_EARLY | RTLD_LO_IGNSTLS | RTLD_LO_TRACE)); init_dag(obj); ref_dag(obj); if (result != -1) From owner-svn-src-stable@freebsd.org Tue Jun 23 03:32:21 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 26FAE347122; Tue, 23 Jun 2020 03:32:21 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49rX050GZxz3f41; Tue, 23 Jun 2020 03:32:21 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0461119E7E; Tue, 23 Jun 2020 03:32:21 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05N3WKlL076084; Tue, 23 Jun 2020 03:32:20 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05N3WKtw076083; Tue, 23 Jun 2020 03:32:20 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202006230332.05N3WKtw076083@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 23 Jun 2020 03:32:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r362528 - stable/11/libexec/rtld-elf X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/libexec/rtld-elf X-SVN-Commit-Revision: 362528 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jun 2020 03:32:21 -0000 Author: kib Date: Tue Jun 23 03:32:20 2020 New Revision: 362528 URL: https://svnweb.freebsd.org/changeset/base/362528 Log: MFC r362250: rtld: Add debug line for dlopen_object(). Modified: stable/11/libexec/rtld-elf/rtld.c Directory Properties: stable/11/ (props changed) Modified: stable/11/libexec/rtld-elf/rtld.c ============================================================================== --- stable/11/libexec/rtld-elf/rtld.c Tue Jun 23 03:31:34 2020 (r362527) +++ stable/11/libexec/rtld-elf/rtld.c Tue Jun 23 03:32:20 2020 (r362528) @@ -3364,6 +3364,9 @@ dlopen_object(const char *name, int fd, Obj_Entry *ref RtldLockState mlockstate; int result; + dbg("dlopen_object name \"%s\" fd %d refobj \"%s\" lo_flags %#x mode %#x", + name != NULL ? name : "", fd, refobj == NULL ? "" : + refobj->path, lo_flags, mode); objlist_init(&initlist); if (lockstate == NULL && !(lo_flags & RTLD_LO_EARLY)) { From owner-svn-src-stable@freebsd.org Tue Jun 23 03:32:58 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B11FC34729D; Tue, 23 Jun 2020 03:32:58 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49rX0p4GXlz3fP3; Tue, 23 Jun 2020 03:32:58 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8DC271A04A; Tue, 23 Jun 2020 03:32:58 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05N3Ww04076164; Tue, 23 Jun 2020 03:32:58 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05N3WwTt076163; Tue, 23 Jun 2020 03:32:58 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202006230332.05N3WwTt076163@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 23 Jun 2020 03:32:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r362529 - stable/11/libexec/rtld-elf X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/libexec/rtld-elf X-SVN-Commit-Revision: 362529 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jun 2020 03:32:58 -0000 Author: kib Date: Tue Jun 23 03:32:58 2020 New Revision: 362529 URL: https://svnweb.freebsd.org/changeset/base/362529 Log: MFC r362251: rtld: Allow to load ET_DYN && DF_1_PIE when tracing. Modified: stable/11/libexec/rtld-elf/rtld.c Directory Properties: stable/11/ (props changed) Modified: stable/11/libexec/rtld-elf/rtld.c ============================================================================== --- stable/11/libexec/rtld-elf/rtld.c Tue Jun 23 03:32:20 2020 (r362528) +++ stable/11/libexec/rtld-elf/rtld.c Tue Jun 23 03:32:58 2020 (r362529) @@ -2541,12 +2541,13 @@ do_load_object(int fd, const char *name, char *path, s obj->path = path; if (!digest_dynamic(obj, 0)) goto errp; - if (obj->z_pie) { + dbg("%s valid_hash_sysv %d valid_hash_gnu %d dynsymcount %d", obj->path, + obj->valid_hash_sysv, obj->valid_hash_gnu, obj->dynsymcount); + if (obj->z_pie && (flags & RTLD_LO_TRACE) == 0) { + dbg("refusing to load PIE executable \"%s\"", obj->path); _rtld_error("Cannot load PIE binary %s as DSO", obj->path); goto errp; } - dbg("%s valid_hash_sysv %d valid_hash_gnu %d dynsymcount %d", obj->path, - obj->valid_hash_sysv, obj->valid_hash_gnu, obj->dynsymcount); if (obj->z_noopen && (flags & (RTLD_LO_DLOPEN | RTLD_LO_TRACE)) == RTLD_LO_DLOPEN) { dbg("refusing to load non-loadable \"%s\"", obj->path); From owner-svn-src-stable@freebsd.org Tue Jun 23 20:41:11 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B2D4F338DF3; Tue, 23 Jun 2020 20:41:11 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49ryqC4MnSz46N5; Tue, 23 Jun 2020 20:41:11 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9135B262FE; Tue, 23 Jun 2020 20:41:11 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05NKfBjt007149; Tue, 23 Jun 2020 20:41:11 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05NKfAmY006801; Tue, 23 Jun 2020 20:41:10 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <202006232041.05NKfAmY006801@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Tue, 23 Jun 2020 20:41:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362554 - in stable/12/sys/dev: netmap virtio/network X-SVN-Group: stable-12 X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: in stable/12/sys/dev: netmap virtio/network X-SVN-Commit-Revision: 362554 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jun 2020 20:41:11 -0000 Author: vmaffione Date: Tue Jun 23 20:41:10 2020 New Revision: 362554 URL: https://svnweb.freebsd.org/changeset/base/362554 Log: MFC r362183 netmap: vtnet: fix races in vtnet_netmap_reg() The nm_register callback needs to call nm_set_native_flags() or nm_clear_native_flags() once the device has been stopped. However, in the current implementation this is not true, as the device is stopped by vtnet_init_locked(). This causes race conditions where the driver crashes as soon as it dequeues netmap buffers assuming they are mbufs (or the other way around). To fix the issue, we extend vtnet_init_locked() with a second argument that, if not zero, will set/clear the netmap flags. This results in a huge simplification of the nm_register callback itself. Also, use netmap_reset() to check if a ring is going to be re-initialized in netmap mode. Modified: stable/12/sys/dev/netmap/if_vtnet_netmap.h stable/12/sys/dev/virtio/network/if_vtnet.c stable/12/sys/dev/virtio/network/if_vtnetvar.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/netmap/if_vtnet_netmap.h ============================================================================== --- stable/12/sys/dev/netmap/if_vtnet_netmap.h Tue Jun 23 20:23:56 2020 (r362553) +++ stable/12/sys/dev/netmap/if_vtnet_netmap.h Tue Jun 23 20:41:10 2020 (r362554) @@ -39,52 +39,18 @@ vtnet_netmap_reg(struct netmap_adapter *na, int state) { struct ifnet *ifp = na->ifp; struct vtnet_softc *sc = ifp->if_softc; - int success; - int i; - /* Drain the taskqueues to make sure that there are no worker threads - * accessing the virtqueues. */ - vtnet_drain_taskqueues(sc); - + /* + * Trigger a device reinit, asking vtnet_init_locked() to + * also enter or exit netmap mode. + */ VTNET_CORE_LOCK(sc); - - /* We need nm_netmap_on() to return true when called by - * vtnet_init_locked() below. */ - if (state) - nm_set_native_flags(na); - - /* We need to trigger a device reset in order to unexpose guest buffers - * published to the host. */ - ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); - /* Get pending used buffers. The way they are freed depends on whether - * they are netmap buffer or they are mbufs. We can tell apart the two - * cases by looking at kring->nr_mode, before this is possibly updated - * in the loop below. */ - for (i = 0; i < sc->vtnet_act_vq_pairs; i++) { - struct vtnet_txq *txq = &sc->vtnet_txqs[i]; - struct vtnet_rxq *rxq = &sc->vtnet_rxqs[i]; - - VTNET_TXQ_LOCK(txq); - vtnet_txq_free_mbufs(txq); - VTNET_TXQ_UNLOCK(txq); - - VTNET_RXQ_LOCK(rxq); - vtnet_rxq_free_mbufs(rxq); - VTNET_RXQ_UNLOCK(rxq); - } - vtnet_init_locked(sc); - success = (ifp->if_drv_flags & IFF_DRV_RUNNING) ? 0 : ENXIO; - - if (state) { - netmap_krings_mode_commit(na, state); - } else { - nm_clear_native_flags(na); - netmap_krings_mode_commit(na, state); - } - + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + vtnet_init_locked(sc, state ? VTNET_INIT_NETMAP_ENTER + : VTNET_INIT_NETMAP_EXIT); VTNET_CORE_UNLOCK(sc); - return success; + return 0; } @@ -245,15 +211,13 @@ vtnet_netmap_rxq_populate(struct vtnet_rxq *rxq) { struct netmap_adapter *na = NA(rxq->vtnrx_sc->vtnet_ifp); struct netmap_kring *kring; + struct netmap_slot *slot; int error; - if (!nm_native_on(na) || rxq->vtnrx_id >= na->num_rx_rings) + slot = netmap_reset(na, NR_RX, rxq->vtnrx_id, 0); + if (slot == NULL) return -1; - kring = na->rx_rings[rxq->vtnrx_id]; - if (!(nm_kring_pending_on(kring) || - kring->nr_pending_mode == NKR_NETMAP_ON)) - return -1; /* Expose all the RX netmap buffers we can. In case of no indirect * buffers, the number of netmap slots in the RX ring matches the Modified: stable/12/sys/dev/virtio/network/if_vtnet.c ============================================================================== --- stable/12/sys/dev/virtio/network/if_vtnet.c Tue Jun 23 20:23:56 2020 (r362553) +++ stable/12/sys/dev/virtio/network/if_vtnet.c Tue Jun 23 20:41:10 2020 (r362554) @@ -180,7 +180,7 @@ static int vtnet_init_tx_queues(struct vtnet_softc *); static int vtnet_init_rxtx_queues(struct vtnet_softc *); static void vtnet_set_active_vq_pairs(struct vtnet_softc *); static int vtnet_reinit(struct vtnet_softc *); -static void vtnet_init_locked(struct vtnet_softc *); +static void vtnet_init_locked(struct vtnet_softc *, int); static void vtnet_init(void *); static void vtnet_free_ctrl_vq(struct vtnet_softc *); @@ -512,7 +512,7 @@ vtnet_resume(device_t dev) VTNET_CORE_LOCK(sc); if (ifp->if_flags & IFF_UP) - vtnet_init_locked(sc); + vtnet_init_locked(sc, 0); sc->vtnet_flags &= ~VTNET_FLAG_SUSPENDED; VTNET_CORE_UNLOCK(sc); @@ -1065,7 +1065,7 @@ vtnet_change_mtu(struct vtnet_softc *sc, int new_mtu) if (ifp->if_drv_flags & IFF_DRV_RUNNING) { ifp->if_drv_flags &= ~IFF_DRV_RUNNING; - vtnet_init_locked(sc); + vtnet_init_locked(sc, 0); } return (0); @@ -1109,7 +1109,7 @@ vtnet_ioctl(struct ifnet *ifp, u_long cmd, caddr_t dat } } } else - vtnet_init_locked(sc); + vtnet_init_locked(sc, 0); if (error == 0) sc->vtnet_if_flags = ifp->if_flags; @@ -1167,7 +1167,7 @@ vtnet_ioctl(struct ifnet *ifp, u_long cmd, caddr_t dat if (reinit && (ifp->if_drv_flags & IFF_DRV_RUNNING)) { ifp->if_drv_flags &= ~IFF_DRV_RUNNING; - vtnet_init_locked(sc); + vtnet_init_locked(sc, 0); } VTNET_CORE_UNLOCK(sc); @@ -2716,7 +2716,7 @@ vtnet_tick(void *xsc) if (timedout != 0) { ifp->if_drv_flags &= ~IFF_DRV_RUNNING; - vtnet_init_locked(sc); + vtnet_init_locked(sc, 0); } else callout_schedule(&sc->vtnet_tick_ch, hz); } @@ -3001,6 +3001,9 @@ vtnet_init_tx_queues(struct vtnet_softc *sc) for (i = 0; i < sc->vtnet_act_vq_pairs; i++) { txq = &sc->vtnet_txqs[i]; txq->vtntx_watchdog = 0; +#ifdef DEV_NETMAP + netmap_reset(NA(sc->vtnet_ifp), NR_TX, i, 0); +#endif /* DEV_NETMAP */ } return (0); @@ -3084,7 +3087,7 @@ vtnet_reinit(struct vtnet_softc *sc) } static void -vtnet_init_locked(struct vtnet_softc *sc) +vtnet_init_locked(struct vtnet_softc *sc, int init_mode) { device_t dev; struct ifnet *ifp; @@ -3099,6 +3102,18 @@ vtnet_init_locked(struct vtnet_softc *sc) vtnet_stop(sc); +#ifdef DEV_NETMAP + /* Once stopped we can update the netmap flags, if necessary. */ + switch (init_mode) { + case VTNET_INIT_NETMAP_ENTER: + nm_set_native_flags(NA(ifp)); + break; + case VTNET_INIT_NETMAP_EXIT: + nm_clear_native_flags(NA(ifp)); + break; + } +#endif /* DEV_NETMAP */ + /* Reinitialize with the host. */ if (vtnet_virtio_reinit(sc) != 0) goto fail; @@ -3125,7 +3140,7 @@ vtnet_init(void *xsc) sc = xsc; VTNET_CORE_LOCK(sc); - vtnet_init_locked(sc); + vtnet_init_locked(sc, 0); VTNET_CORE_UNLOCK(sc); } Modified: stable/12/sys/dev/virtio/network/if_vtnetvar.h ============================================================================== --- stable/12/sys/dev/virtio/network/if_vtnetvar.h Tue Jun 23 20:23:56 2020 (r362553) +++ stable/12/sys/dev/virtio/network/if_vtnetvar.h Tue Jun 23 20:41:10 2020 (r362554) @@ -365,4 +365,10 @@ CTASSERT(((VTNET_MAX_TX_SEGS - 1) * MCLBYTES) >= VTNET "VTNET Core Lock", MTX_DEF); \ } while (0) +/* + * Values for the init_mode argument of vtnet_init_locked(). + */ +#define VTNET_INIT_NETMAP_ENTER 1 +#define VTNET_INIT_NETMAP_EXIT 2 + #endif /* _IF_VTNETVAR_H */ From owner-svn-src-stable@freebsd.org Tue Jun 23 20:44:06 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 08A9B339113; Tue, 23 Jun 2020 20:44:06 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49rytY6Tm4z46XK; Tue, 23 Jun 2020 20:44:05 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D982626361; Tue, 23 Jun 2020 20:44:05 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05NKi5Za009275; Tue, 23 Jun 2020 20:44:05 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05NKi5Kb009274; Tue, 23 Jun 2020 20:44:05 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <202006232044.05NKi5Kb009274@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Tue, 23 Jun 2020 20:44:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362555 - stable/12/sys/net X-SVN-Group: stable-12 X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: stable/12/sys/net X-SVN-Commit-Revision: 362555 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jun 2020 20:44:06 -0000 Author: vmaffione Date: Tue Jun 23 20:44:05 2020 New Revision: 362555 URL: https://svnweb.freebsd.org/changeset/base/362555 Log: MFC r362185 iflib: netmap: enter/exit netmap mode after device stops Avoid possible race conditions by calling nm_set_native_flags() and nm_clear_native_flags() only after the device has been stopped. Modified: stable/12/sys/net/iflib.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/net/iflib.c ============================================================================== --- stable/12/sys/net/iflib.c Tue Jun 23 20:41:10 2020 (r362554) +++ stable/12/sys/net/iflib.c Tue Jun 23 20:44:05 2020 (r362555) @@ -793,13 +793,19 @@ iflib_netmap_register(struct netmap_adapter *na, int o if (!CTX_IS_VF(ctx)) IFDI_CRCSTRIP_SET(ctx, onoff, iflib_crcstrip); - /* enable or disable flags and callbacks in na and ifp */ + iflib_stop(ctx); + + /* + * Enable (or disable) netmap flags, and intercept (or restore) + * ifp->if_transmit. This is done once the device has been stopped + * to prevent race conditions. + */ if (onoff) { nm_set_native_flags(na); } else { nm_clear_native_flags(na); } - iflib_stop(ctx); + iflib_init_locked(ctx); IFDI_CRCSTRIP_SET(ctx, onoff, iflib_crcstrip); // XXX why twice ? status = ifp->if_drv_flags & IFF_DRV_RUNNING ? 0 : 1; From owner-svn-src-stable@freebsd.org Tue Jun 23 20:48:44 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 67D40338F49; Tue, 23 Jun 2020 20:48:44 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49ryzw26J4z476g; Tue, 23 Jun 2020 20:48:44 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4305626759; Tue, 23 Jun 2020 20:48:44 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05NKmibL009565; Tue, 23 Jun 2020 20:48:44 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05NKmitJ009564; Tue, 23 Jun 2020 20:48:44 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <202006232048.05NKmitJ009564@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Tue, 23 Jun 2020 20:48:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362556 - stable/12/sys/net X-SVN-Group: stable-12 X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: stable/12/sys/net X-SVN-Commit-Revision: 362556 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jun 2020 20:48:44 -0000 Author: vmaffione Date: Tue Jun 23 20:48:43 2020 New Revision: 362556 URL: https://svnweb.freebsd.org/changeset/base/362556 Log: MFC r361982 iflib: netmap: honor netmap_irx_irq return values In the receive interrupt routine, always call netmap_rx_irq(). The latter function will return != NM_IRQ_PASS if netmap is not active on that specific receive queue, so that the driver can go on with iflib_rxeof(). Note that netmap supports partial opening, where only a subset of the RX or TX rings can be open in netmap mode. Checking the IFCAP_NETMAP flag is not enough to make sure that the queue is indeed in netmap mode. Moreover, in case netmap_rx_irq() returns NM_IRQ_RESCHED, it means that netmap expects the driver to call netmap_rx_irq() again as soon as possible. Currently, this may happen when the device is attached to a VALE switch. Reviewed by: gallatin Differential Revision: https://reviews.freebsd.org/D25167 Modified: stable/12/sys/net/iflib.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/net/iflib.c ============================================================================== --- stable/12/sys/net/iflib.c Tue Jun 23 20:44:05 2020 (r362555) +++ stable/12/sys/net/iflib.c Tue Jun 23 20:48:43 2020 (r362556) @@ -3785,6 +3785,10 @@ _task_fn_rx(void *context) if_ctx_t ctx = rxq->ifr_ctx; uint8_t more; uint16_t budget; +#ifdef DEV_NETMAP + u_int work = 0; + int nmirq; +#endif #ifdef IFLIB_DIAGNOSTICS rxq->ifr_cpu_exec_count[curcpu]++; @@ -3793,12 +3797,10 @@ _task_fn_rx(void *context) if (__predict_false(!(if_getdrvflags(ctx->ifc_ifp) & IFF_DRV_RUNNING))) return; #ifdef DEV_NETMAP - if (if_getcapenable(ctx->ifc_ifp) & IFCAP_NETMAP) { - u_int work = 0; - if (netmap_rx_irq(ctx->ifc_ifp, rxq->ifr_id, &work)) { - more = 0; - goto skip_rxeof; - } + nmirq = netmap_rx_irq(ctx->ifc_ifp, rxq->ifr_id, &work); + if (nmirq != NM_IRQ_PASS) { + more = (nmirq == NM_IRQ_RESCHED) ? IFLIB_RXEOF_MORE : 0; + goto skip_rxeof; } #endif budget = ctx->ifc_sysctl_rx_budget; From owner-svn-src-stable@freebsd.org Wed Jun 24 05:10:41 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BE3C0343258; Wed, 24 Jun 2020 05:10:41 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49sB754cQHz4Z8T; Wed, 24 Jun 2020 05:10:41 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 99949C74D; Wed, 24 Jun 2020 05:10:41 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05O5AfRS017406; Wed, 24 Jun 2020 05:10:41 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05O5Af39017405; Wed, 24 Jun 2020 05:10:41 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202006240510.05O5Af39017405@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 24 Jun 2020 05:10:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362570 - stable/12/sys/dev/mlx4/mlx4_en X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/dev/mlx4/mlx4_en X-SVN-Commit-Revision: 362570 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jun 2020 05:10:41 -0000 Author: hselasky Date: Wed Jun 24 05:10:41 2020 New Revision: 362570 URL: https://svnweb.freebsd.org/changeset/base/362570 Log: MFC r362271: Allow multicast packets to be received in promiscious mode, in mlx4en(4). Make sure we disable the multicast filter in promiscious mode aswell as when the all multicast flag is set. Found by: Tycho Nightingale Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c ============================================================================== --- stable/12/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Wed Jun 24 02:08:08 2020 (r362569) +++ stable/12/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Wed Jun 24 05:10:41 2020 (r362570) @@ -852,9 +852,11 @@ static void mlx4_en_do_multicast(struct mlx4_en_priv * int err = 0; u64 mcast_addr = 0; - - /* Enable/disable the multicast filter according to IFF_ALLMULTI */ - if (dev->if_flags & IFF_ALLMULTI) { + /* + * Enable/disable the multicast filter according to + * IFF_ALLMULTI and IFF_PROMISC: + */ + if (dev->if_flags & (IFF_ALLMULTI | IFF_PROMISC)) { err = mlx4_SET_MCAST_FLTR(mdev->dev, priv->port, 0, 0, MLX4_MCAST_DISABLE); if (err) From owner-svn-src-stable@freebsd.org Wed Jun 24 05:12:01 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3F24D343726; Wed, 24 Jun 2020 05:12:01 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49sB8d0zjJz4ZZc; Wed, 24 Jun 2020 05:12:01 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1D023C3F7; Wed, 24 Jun 2020 05:12:01 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05O5C1rf020224; Wed, 24 Jun 2020 05:12:01 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05O5C0ci020223; Wed, 24 Jun 2020 05:12:00 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202006240512.05O5C0ci020223@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 24 Jun 2020 05:12:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r362571 - stable/11/sys/dev/mlx4/mlx4_en X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/mlx4/mlx4_en X-SVN-Commit-Revision: 362571 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jun 2020 05:12:01 -0000 Author: hselasky Date: Wed Jun 24 05:12:00 2020 New Revision: 362571 URL: https://svnweb.freebsd.org/changeset/base/362571 Log: MFC r362271: Allow multicast packets to be received in promiscious mode, in mlx4en(4). Make sure we disable the multicast filter in promiscious mode aswell as when the all multicast flag is set. Found by: Tycho Nightingale Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c ============================================================================== --- stable/11/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Wed Jun 24 05:10:41 2020 (r362570) +++ stable/11/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Wed Jun 24 05:12:00 2020 (r362571) @@ -850,9 +850,11 @@ static void mlx4_en_do_multicast(struct mlx4_en_priv * int err = 0; u64 mcast_addr = 0; - - /* Enable/disable the multicast filter according to IFF_ALLMULTI */ - if (dev->if_flags & IFF_ALLMULTI) { + /* + * Enable/disable the multicast filter according to + * IFF_ALLMULTI and IFF_PROMISC: + */ + if (dev->if_flags & (IFF_ALLMULTI | IFF_PROMISC)) { err = mlx4_SET_MCAST_FLTR(mdev->dev, priv->port, 0, 0, MLX4_MCAST_DISABLE); if (err) From owner-svn-src-stable@freebsd.org Wed Jun 24 06:35:51 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AAFCB344C73; Wed, 24 Jun 2020 06:35:51 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49sD1M4398z4db2; Wed, 24 Jun 2020 06:35:51 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 86081D1DB; Wed, 24 Jun 2020 06:35:51 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05O6Zp7o071471; Wed, 24 Jun 2020 06:35:51 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05O6Zof9071465; Wed, 24 Jun 2020 06:35:50 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202006240635.05O6Zof9071465@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 24 Jun 2020 06:35:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362572 - in stable/12/sys: amd64/amd64 i386/i386 x86/include x86/x86 X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/12/sys: amd64/amd64 i386/i386 x86/include x86/x86 X-SVN-Commit-Revision: 362572 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jun 2020 06:35:51 -0000 Author: kib Date: Wed Jun 24 06:35:50 2020 New Revision: 362572 URL: https://svnweb.freebsd.org/changeset/base/362572 Log: MFC r362031, r362065, r362075: amd64 pmap: reorder IPI send and local TLB flush in TLB invalidations. Modified: stable/12/sys/amd64/amd64/pmap.c stable/12/sys/i386/i386/pmap.c stable/12/sys/i386/i386/vm_machdep.c stable/12/sys/x86/include/x86_smp.h stable/12/sys/x86/x86/mp_x86.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/amd64/amd64/pmap.c ============================================================================== --- stable/12/sys/amd64/amd64/pmap.c Wed Jun 24 05:12:00 2020 (r362571) +++ stable/12/sys/amd64/amd64/pmap.c Wed Jun 24 06:35:50 2020 (r362572) @@ -2412,6 +2412,20 @@ DEFINE_IFUNC(static, void, pmap_invalidate_page_mode, return (pmap_invalidate_page_nopcid); } +static void +pmap_invalidate_page_curcpu_cb(pmap_t pmap, vm_offset_t va, + vm_offset_t addr2 __unused) +{ + + if (pmap == kernel_pmap) { + invlpg(va); + } else { + if (pmap == PCPU_GET(curpmap)) + invlpg(va); + pmap_invalidate_page_mode(pmap, va); + } +} + void pmap_invalidate_page(pmap_t pmap, vm_offset_t va) { @@ -2424,16 +2438,8 @@ pmap_invalidate_page(pmap_t pmap, vm_offset_t va) KASSERT(pmap->pm_type == PT_X86, ("pmap_invalidate_page: invalid type %d", pmap->pm_type)); - sched_pin(); - if (pmap == kernel_pmap) { - invlpg(va); - } else { - if (pmap == PCPU_GET(curpmap)) - invlpg(va); - pmap_invalidate_page_mode(pmap, va); - } - smp_masked_invlpg(pmap_invalidate_cpu_mask(pmap), va, pmap); - sched_unpin(); + smp_masked_invlpg(pmap_invalidate_cpu_mask(pmap), va, pmap, + pmap_invalidate_page_curcpu_cb); } /* 4k PTEs -- Chosen to exceed the total size of Broadwell L2 TLB */ @@ -2509,10 +2515,26 @@ DEFINE_IFUNC(static, void, pmap_invalidate_range_mode, return (pmap_invalidate_range_nopcid); } +static void +pmap_invalidate_range_curcpu_cb(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) +{ + vm_offset_t addr; + + if (pmap == kernel_pmap) { + for (addr = sva; addr < eva; addr += PAGE_SIZE) + invlpg(addr); + } else { + if (pmap == PCPU_GET(curpmap)) { + for (addr = sva; addr < eva; addr += PAGE_SIZE) + invlpg(addr); + } + pmap_invalidate_range_mode(pmap, sva, eva); + } +} + void pmap_invalidate_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) { - vm_offset_t addr; if (eva - sva >= PMAP_INVLPG_THRESHOLD) { pmap_invalidate_all(pmap); @@ -2527,19 +2549,8 @@ pmap_invalidate_range(pmap_t pmap, vm_offset_t sva, vm KASSERT(pmap->pm_type == PT_X86, ("pmap_invalidate_range: invalid type %d", pmap->pm_type)); - sched_pin(); - if (pmap == kernel_pmap) { - for (addr = sva; addr < eva; addr += PAGE_SIZE) - invlpg(addr); - } else { - if (pmap == PCPU_GET(curpmap)) { - for (addr = sva; addr < eva; addr += PAGE_SIZE) - invlpg(addr); - } - pmap_invalidate_range_mode(pmap, sva, eva); - } - smp_masked_invlpg_range(pmap_invalidate_cpu_mask(pmap), sva, eva, pmap); - sched_unpin(); + smp_masked_invlpg_range(pmap_invalidate_cpu_mask(pmap), sva, eva, pmap, + pmap_invalidate_range_curcpu_cb); } static inline void @@ -2626,6 +2637,14 @@ DEFINE_IFUNC(static, void, pmap_invalidate_all_mode, ( return (pmap_invalidate_all_nopcid); } +static void +pmap_invalidate_all_curcpu_cb(pmap_t pmap, vm_offset_t addr1 __unused, + vm_offset_t addr2 __unused) +{ + + pmap_invalidate_all_mode(pmap); +} + void pmap_invalidate_all(pmap_t pmap) { @@ -2638,20 +2657,23 @@ pmap_invalidate_all(pmap_t pmap) KASSERT(pmap->pm_type == PT_X86, ("pmap_invalidate_all: invalid type %d", pmap->pm_type)); - sched_pin(); - pmap_invalidate_all_mode(pmap); - smp_masked_invltlb(pmap_invalidate_cpu_mask(pmap), pmap); - sched_unpin(); + smp_masked_invltlb(pmap_invalidate_cpu_mask(pmap), pmap, + pmap_invalidate_all_curcpu_cb); } +static void +pmap_invalidate_cache_curcpu_cb(pmap_t pmap __unused, vm_offset_t va __unused, + vm_offset_t addr2 __unused) +{ + + wbinvd(); +} + void pmap_invalidate_cache(void) { - sched_pin(); - wbinvd(); - smp_cache_flush(); - sched_unpin(); + smp_cache_flush(pmap_invalidate_cache_curcpu_cb); } struct pde_action { Modified: stable/12/sys/i386/i386/pmap.c ============================================================================== --- stable/12/sys/i386/i386/pmap.c Wed Jun 24 05:12:00 2020 (r362571) +++ stable/12/sys/i386/i386/pmap.c Wed Jun 24 06:35:50 2020 (r362572) @@ -1164,6 +1164,13 @@ invltlb_glob(void) #ifdef SMP + +static void +pmap_curcpu_cb_dummy(pmap_t pmap __unused, vm_offset_t addr1 __unused, + vm_offset_t addr2 __unused) +{ +} + /* * For SMP, these functions have to use the IPI mechanism for coherence. * @@ -1202,7 +1209,7 @@ pmap_invalidate_page(pmap_t pmap, vm_offset_t va) CPU_AND(&other_cpus, &pmap->pm_active); mask = &other_cpus; } - smp_masked_invlpg(*mask, va, pmap); + smp_masked_invlpg(*mask, va, pmap, pmap_curcpu_cb_dummy); sched_unpin(); } @@ -1235,7 +1242,7 @@ pmap_invalidate_range(pmap_t pmap, vm_offset_t sva, vm CPU_AND(&other_cpus, &pmap->pm_active); mask = &other_cpus; } - smp_masked_invlpg_range(*mask, sva, eva, pmap); + smp_masked_invlpg_range(*mask, sva, eva, pmap, pmap_curcpu_cb_dummy); sched_unpin(); } @@ -1258,18 +1265,21 @@ pmap_invalidate_all(pmap_t pmap) CPU_AND(&other_cpus, &pmap->pm_active); mask = &other_cpus; } - smp_masked_invltlb(*mask, pmap); + smp_masked_invltlb(*mask, pmap, pmap_curcpu_cb_dummy); sched_unpin(); } +static void +pmap_invalidate_cache_curcpu_cb(pmap_t pmap __unused, + vm_offset_t addr1 __unused, vm_offset_t addr2 __unused) +{ + wbinvd(); +} + void pmap_invalidate_cache(void) { - - sched_pin(); - wbinvd(); - smp_cache_flush(); - sched_unpin(); + smp_cache_flush(pmap_invalidate_cache_curcpu_cb); } struct pde_action { Modified: stable/12/sys/i386/i386/vm_machdep.c ============================================================================== --- stable/12/sys/i386/i386/vm_machdep.c Wed Jun 24 05:12:00 2020 (r362571) +++ stable/12/sys/i386/i386/vm_machdep.c Wed Jun 24 06:35:50 2020 (r362572) @@ -615,6 +615,12 @@ sf_buf_map(struct sf_buf *sf, int flags) } #ifdef SMP +static void +sf_buf_shootdown_curcpu_cb(pmap_t pmap __unused, + vm_offset_t addr1 __unused, vm_offset_t addr2 __unused) +{ +} + void sf_buf_shootdown(struct sf_buf *sf, int flags) { @@ -633,7 +639,8 @@ sf_buf_shootdown(struct sf_buf *sf, int flags) CPU_NAND(&other_cpus, &sf->cpumask); if (!CPU_EMPTY(&other_cpus)) { CPU_OR(&sf->cpumask, &other_cpus); - smp_masked_invlpg(other_cpus, sf->kva, kernel_pmap); + smp_masked_invlpg(other_cpus, sf->kva, kernel_pmap, + sf_buf_shootdown_curcpu_cb); } } sched_unpin(); Modified: stable/12/sys/x86/include/x86_smp.h ============================================================================== --- stable/12/sys/x86/include/x86_smp.h Wed Jun 24 05:12:00 2020 (r362571) +++ stable/12/sys/x86/include/x86_smp.h Wed Jun 24 06:35:50 2020 (r362572) @@ -80,6 +80,9 @@ inthand_t IDTVEC(cpususpend), /* CPU suspends & waits to be resumed */ IDTVEC(rendezvous); /* handle CPU rendezvous */ +typedef void (*smp_invl_cb_t)(struct pmap *, vm_offset_t addr1, + vm_offset_t addr2); + /* functions in x86_mp.c */ void assign_cpu_ids(void); void cpu_add(u_int apic_id, char boot_cpu); @@ -99,11 +102,13 @@ void ipi_cpu(int cpu, u_int ipi); int ipi_nmi_handler(void); void ipi_selected(cpuset_t cpus, u_int ipi); void set_interrupt_apic_ids(void); -void smp_cache_flush(void); -void smp_masked_invlpg(cpuset_t mask, vm_offset_t addr, struct pmap *pmap); +void smp_cache_flush(smp_invl_cb_t curcpu_cb); +void smp_masked_invlpg(cpuset_t mask, vm_offset_t addr, struct pmap *pmap, + smp_invl_cb_t curcpu_cb); void smp_masked_invlpg_range(cpuset_t mask, vm_offset_t startva, - vm_offset_t endva, struct pmap *pmap); -void smp_masked_invltlb(cpuset_t mask, struct pmap *pmap); + vm_offset_t endva, struct pmap *pmap, smp_invl_cb_t curcpu_cb); +void smp_masked_invltlb(cpuset_t mask, struct pmap *pmap, + smp_invl_cb_t curcpu_cb); void mem_range_AP_init(void); void topo_probe(void); void ipi_send_cpu(int cpu, u_int ipi); Modified: stable/12/sys/x86/x86/mp_x86.c ============================================================================== --- stable/12/sys/x86/x86/mp_x86.c Wed Jun 24 05:12:00 2020 (r362571) +++ stable/12/sys/x86/x86/mp_x86.c Wed Jun 24 06:35:50 2020 (r362572) @@ -1613,29 +1613,48 @@ volatile uint32_t smp_tlb_generation; #define read_eflags() read_rflags() #endif +/* + * Used by pmap to request invalidation of TLB or cache on local and + * remote processors. Mask provides the set of remote CPUs which are + * to be signalled with the IPI specified by vector. The curcpu_cb + * callback is invoked on the calling CPU while waiting for remote + * CPUs to complete the operation. + * + * The callback function is called unconditionally on the caller's + * underlying processor, even when this processor is not set in the + * mask. So, the callback function must be prepared to handle such + * spurious invocations. + */ static void smp_targeted_tlb_shootdown(cpuset_t mask, u_int vector, pmap_t pmap, - vm_offset_t addr1, vm_offset_t addr2) + vm_offset_t addr1, vm_offset_t addr2, smp_invl_cb_t curcpu_cb) { cpuset_t other_cpus; volatile uint32_t *p_cpudone; uint32_t generation; int cpu; - /* It is not necessary to signal other CPUs while in the debugger. */ - if (kdb_active || panicstr != NULL) + /* + * It is not necessary to signal other CPUs while booting or + * when in the debugger. + */ + if (kdb_active || panicstr != NULL || !smp_started) { + curcpu_cb(pmap, addr1, addr2); return; + } + sched_pin(); + /* * Check for other cpus. Return if none. */ if (CPU_ISFULLSET(&mask)) { if (mp_ncpus <= 1) - return; + goto nospinexit; } else { CPU_CLR(PCPU_GET(cpuid), &mask); if (CPU_EMPTY(&mask)) - return; + goto nospinexit; } if (!(read_eflags() & PSL_I)) @@ -1659,6 +1678,7 @@ smp_targeted_tlb_shootdown(cpuset_t mask, u_int vector ipi_send_cpu(cpu, vector); } } + curcpu_cb(pmap, addr1, addr2); while ((cpu = CPU_FFS(&other_cpus)) != 0) { cpu--; CPU_CLR(cpu, &other_cpus); @@ -1667,55 +1687,54 @@ smp_targeted_tlb_shootdown(cpuset_t mask, u_int vector ia32_pause(); } mtx_unlock_spin(&smp_ipi_mtx); + sched_unpin(); + return; + +nospinexit: + curcpu_cb(pmap, addr1, addr2); + sched_unpin(); } void -smp_masked_invltlb(cpuset_t mask, pmap_t pmap) +smp_masked_invltlb(cpuset_t mask, pmap_t pmap, smp_invl_cb_t curcpu_cb) { - if (smp_started) { - smp_targeted_tlb_shootdown(mask, IPI_INVLTLB, pmap, 0, 0); + smp_targeted_tlb_shootdown(mask, IPI_INVLTLB, pmap, 0, 0, curcpu_cb); #ifdef COUNT_XINVLTLB_HITS - ipi_global++; + ipi_global++; #endif - } } void -smp_masked_invlpg(cpuset_t mask, vm_offset_t addr, pmap_t pmap) +smp_masked_invlpg(cpuset_t mask, vm_offset_t addr, pmap_t pmap, + smp_invl_cb_t curcpu_cb) { - if (smp_started) { - smp_targeted_tlb_shootdown(mask, IPI_INVLPG, pmap, addr, 0); + smp_targeted_tlb_shootdown(mask, IPI_INVLPG, pmap, addr, 0, curcpu_cb); #ifdef COUNT_XINVLTLB_HITS - ipi_page++; + ipi_page++; #endif - } } void smp_masked_invlpg_range(cpuset_t mask, vm_offset_t addr1, vm_offset_t addr2, - pmap_t pmap) + pmap_t pmap, smp_invl_cb_t curcpu_cb) { - if (smp_started) { - smp_targeted_tlb_shootdown(mask, IPI_INVLRNG, pmap, - addr1, addr2); + smp_targeted_tlb_shootdown(mask, IPI_INVLRNG, pmap, addr1, addr2, + curcpu_cb); #ifdef COUNT_XINVLTLB_HITS - ipi_range++; - ipi_range_size += (addr2 - addr1) / PAGE_SIZE; + ipi_range++; + ipi_range_size += (addr2 - addr1) / PAGE_SIZE; #endif - } } void -smp_cache_flush(void) +smp_cache_flush(smp_invl_cb_t curcpu_cb) { - if (smp_started) { - smp_targeted_tlb_shootdown(all_cpus, IPI_INVLCACHE, NULL, - 0, 0); - } + smp_targeted_tlb_shootdown(all_cpus, IPI_INVLCACHE, NULL, 0, 0, + curcpu_cb); } /* From owner-svn-src-stable@freebsd.org Wed Jun 24 13:48:16 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CA9B334F68C; Wed, 24 Jun 2020 13:48:16 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49sPcJ50hKz48tX; Wed, 24 Jun 2020 13:48:16 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A6E9312648; Wed, 24 Jun 2020 13:48:16 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05ODmGqX039643; Wed, 24 Jun 2020 13:48:16 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05ODmGRB039642; Wed, 24 Jun 2020 13:48:16 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202006241348.05ODmGRB039642@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 24 Jun 2020 13:48:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362578 - stable/12/sys/dev/nvme X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/dev/nvme X-SVN-Commit-Revision: 362578 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jun 2020 13:48:16 -0000 Author: mav Date: Wed Jun 24 13:48:16 2020 New Revision: 362578 URL: https://svnweb.freebsd.org/changeset/base/362578 Log: MFC r362282: Fix admin qpair leak if detached during initial reset. Modified: stable/12/sys/dev/nvme/nvme_ctrlr.c stable/12/sys/dev/nvme/nvme_qpair.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/nvme/nvme_ctrlr.c ============================================================================== --- stable/12/sys/dev/nvme/nvme_ctrlr.c Wed Jun 24 13:42:42 2020 (r362577) +++ stable/12/sys/dev/nvme/nvme_ctrlr.c Wed Jun 24 13:48:16 2020 (r362578) @@ -1422,8 +1422,8 @@ nvme_ctrlr_destruct(struct nvme_controller *ctrlr, dev nvme_io_qpair_destroy(&ctrlr->ioq[i]); free(ctrlr->ioq, M_NVME); nvme_ctrlr_hmb_free(ctrlr); - nvme_admin_qpair_destroy(&ctrlr->adminq); } + nvme_admin_qpair_destroy(&ctrlr->adminq); /* * Notify the controller of a shutdown, even though this is due to Modified: stable/12/sys/dev/nvme/nvme_qpair.c ============================================================================== --- stable/12/sys/dev/nvme/nvme_qpair.c Wed Jun 24 13:42:42 2020 (r362577) +++ stable/12/sys/dev/nvme/nvme_qpair.c Wed Jun 24 13:48:16 2020 (r362578) @@ -729,6 +729,8 @@ nvme_qpair_construct(struct nvme_qpair *qpair, if (bus_dmamap_load(qpair->dma_tag, qpair->queuemem_map, queuemem, allocsz, nvme_single_map, &queuemem_phys, 0) != 0) { nvme_printf(ctrlr, "failed to load qpair memory\n"); + bus_dmamem_free(qpair->dma_tag, qpair->cmd, + qpair->queuemem_map); goto out; } @@ -811,24 +813,15 @@ nvme_qpair_destroy(struct nvme_qpair *qpair) { struct nvme_tracker *tr; - if (qpair->tag) + if (qpair->tag) { bus_teardown_intr(qpair->ctrlr->dev, qpair->res, qpair->tag); - - if (mtx_initialized(&qpair->lock)) - mtx_destroy(&qpair->lock); - - if (qpair->res) - bus_release_resource(qpair->ctrlr->dev, SYS_RES_IRQ, - rman_get_rid(qpair->res), qpair->res); - - if (qpair->cmd != NULL) { - bus_dmamap_unload(qpair->dma_tag, qpair->queuemem_map); - bus_dmamem_free(qpair->dma_tag, qpair->cmd, - qpair->queuemem_map); + qpair->tag = NULL; } - if (qpair->act_tr) + if (qpair->act_tr) { free_domain(qpair->act_tr, M_NVME); + qpair->act_tr = NULL; + } while (!TAILQ_EMPTY(&qpair->free_tr)) { tr = TAILQ_FIRST(&qpair->free_tr); @@ -838,11 +831,31 @@ nvme_qpair_destroy(struct nvme_qpair *qpair) free_domain(tr, M_NVME); } - if (qpair->dma_tag) + if (qpair->cmd != NULL) { + bus_dmamap_unload(qpair->dma_tag, qpair->queuemem_map); + bus_dmamem_free(qpair->dma_tag, qpair->cmd, + qpair->queuemem_map); + qpair->cmd = NULL; + } + + if (qpair->dma_tag) { bus_dma_tag_destroy(qpair->dma_tag); + qpair->dma_tag = NULL; + } - if (qpair->dma_tag_payload) + if (qpair->dma_tag_payload) { bus_dma_tag_destroy(qpair->dma_tag_payload); + qpair->dma_tag_payload = NULL; + } + + if (mtx_initialized(&qpair->lock)) + mtx_destroy(&qpair->lock); + + if (qpair->res) { + bus_release_resource(qpair->ctrlr->dev, SYS_RES_IRQ, + rman_get_rid(qpair->res), qpair->res); + qpair->res = NULL; + } } static void From owner-svn-src-stable@freebsd.org Wed Jun 24 13:49:31 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0A98234F793; Wed, 24 Jun 2020 13:49:31 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49sPdk6W5nz49D8; Wed, 24 Jun 2020 13:49:30 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DAC0212649; Wed, 24 Jun 2020 13:49:30 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05ODnULs039753; Wed, 24 Jun 2020 13:49:30 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05ODnUO7039751; Wed, 24 Jun 2020 13:49:30 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202006241349.05ODnUO7039751@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 24 Jun 2020 13:49:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362579 - stable/12/sys/dev/nvme X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/dev/nvme X-SVN-Commit-Revision: 362579 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jun 2020 13:49:31 -0000 Author: mav Date: Wed Jun 24 13:49:30 2020 New Revision: 362579 URL: https://svnweb.freebsd.org/changeset/base/362579 Log: MFC r362337: Make polled request timeout less invasive. Instead of panic after one second of polling, make the normal timeout handler to activate, reset the controller and abort the outstanding requests. If all of it won't happen within 10 seconds then something in the driver is likely stuck bad and panic is the only way out. In particular this fixed device hot unplug during execution of those polled commands, allowing clean device detach instead of panic. Modified: stable/12/sys/dev/nvme/nvme_ctrlr.c stable/12/sys/dev/nvme/nvme_private.h stable/12/sys/dev/nvme/nvme_qpair.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/nvme/nvme_ctrlr.c ============================================================================== --- stable/12/sys/dev/nvme/nvme_ctrlr.c Wed Jun 24 13:48:16 2020 (r362578) +++ stable/12/sys/dev/nvme/nvme_ctrlr.c Wed Jun 24 13:49:30 2020 (r362579) @@ -489,7 +489,7 @@ nvme_ctrlr_create_qpairs(struct nvme_controller *ctrlr } status.done = 0; - nvme_ctrlr_cmd_create_io_sq(qpair->ctrlr, qpair, + nvme_ctrlr_cmd_create_io_sq(ctrlr, qpair, nvme_completion_poll_cb, &status); nvme_completion_poll(&status); if (nvme_completion_is_error(&status.cpl)) { Modified: stable/12/sys/dev/nvme/nvme_private.h ============================================================================== --- stable/12/sys/dev/nvme/nvme_private.h Wed Jun 24 13:48:16 2020 (r362578) +++ stable/12/sys/dev/nvme/nvme_private.h Wed Jun 24 13:49:30 2020 (r362579) @@ -463,20 +463,22 @@ int nvme_detach(device_t dev); * Wait for a command to complete using the nvme_completion_poll_cb. * Used in limited contexts where the caller knows it's OK to block * briefly while the command runs. The ISR will run the callback which - * will set status->done to true.usually within microseconds. A 1s - * pause means something is seriously AFU and we should panic to - * provide the proper context to diagnose. + * will set status->done to true, usually within microseconds. If not, + * then after one second timeout handler should reset the controller + * and abort all outstanding requests including this polled one. If + * still not after ten seconds, then something is wrong with the driver, + * and panic is the only way to recover. */ static __inline void nvme_completion_poll(struct nvme_completion_poll_status *status) { - int sanity = hz * 1; + int sanity = hz * 10; while (!atomic_load_acq_int(&status->done) && --sanity > 0) pause("nvme", 1); if (sanity <= 0) - panic("NVME polled command failed to complete within 1s."); + panic("NVME polled command failed to complete within 10s."); } static __inline void Modified: stable/12/sys/dev/nvme/nvme_qpair.c ============================================================================== --- stable/12/sys/dev/nvme/nvme_qpair.c Wed Jun 24 13:48:16 2020 (r362578) +++ stable/12/sys/dev/nvme/nvme_qpair.c Wed Jun 24 13:49:30 2020 (r362579) @@ -956,6 +956,7 @@ nvme_qpair_submit_tracker(struct nvme_qpair *qpair, st { struct nvme_request *req; struct nvme_controller *ctrlr; + int timeout; mtx_assert(&qpair->lock, MA_OWNED); @@ -964,9 +965,14 @@ nvme_qpair_submit_tracker(struct nvme_qpair *qpair, st qpair->act_tr[tr->cid] = tr; ctrlr = qpair->ctrlr; - if (req->timeout) - callout_reset_on(&tr->timer, ctrlr->timeout_period * hz, - nvme_timeout, tr, qpair->cpu); + if (req->timeout) { + if (req->cb_fn == nvme_completion_poll_cb) + timeout = hz; + else + timeout = ctrlr->timeout_period * hz; + callout_reset_on(&tr->timer, timeout, nvme_timeout, tr, + qpair->cpu); + } /* Copy the command from the tracker to the submission queue. */ memcpy(&qpair->cmd[qpair->sq_tail], &req->cmd, sizeof(req->cmd)); From owner-svn-src-stable@freebsd.org Wed Jun 24 16:17:59 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 74E6A35235B; Wed, 24 Jun 2020 16:17:59 +0000 (UTC) (envelope-from rscheff@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49sSx32VcLz4LkL; Wed, 24 Jun 2020 16:17:59 +0000 (UTC) (envelope-from rscheff@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5112B14640; Wed, 24 Jun 2020 16:17:59 +0000 (UTC) (envelope-from rscheff@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05OGHxkE033098; Wed, 24 Jun 2020 16:17:59 GMT (envelope-from rscheff@FreeBSD.org) Received: (from rscheff@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05OGHwkX033096; Wed, 24 Jun 2020 16:17:58 GMT (envelope-from rscheff@FreeBSD.org) Message-Id: <202006241617.05OGHwkX033096@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rscheff set sender to rscheff@FreeBSD.org using -f From: Richard Scheffenegger Date: Wed, 24 Jun 2020 16:17:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362586 - in stable/12/sys/netinet: . tcp_stacks X-SVN-Group: stable-12 X-SVN-Commit-Author: rscheff X-SVN-Commit-Paths: in stable/12/sys/netinet: . tcp_stacks X-SVN-Commit-Revision: 362586 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jun 2020 16:17:59 -0000 Author: rscheff Date: Wed Jun 24 16:17:58 2020 New Revision: 362586 URL: https://svnweb.freebsd.org/changeset/base/362586 Log: MFC r361347: With RFC3168 ECN, CWR SHOULD only be sent with new data Overly conservative data receivers may ignore the CWR flag on other packets, and keep ECE latched. This can result in continous reduction of the congestion window, and very poor performance when ECN is enabled. PR: 243590 Reviewed by: rgrimes (mentor), rrs Approved by: rgrimes (mentor, blanket) MFC after: 3 weeks Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D23364 Modified: stable/12/sys/netinet/tcp_input.c stable/12/sys/netinet/tcp_output.c stable/12/sys/netinet/tcp_stacks/rack.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/tcp_input.c ============================================================================== --- stable/12/sys/netinet/tcp_input.c Wed Jun 24 15:46:33 2020 (r362585) +++ stable/12/sys/netinet/tcp_input.c Wed Jun 24 16:17:58 2020 (r362586) @@ -417,9 +417,15 @@ cc_cong_signal(struct tcpcb *tp, struct tcphdr *th, ui } break; case CC_ECN: - if (!IN_CONGRECOVERY(tp->t_flags)) { + if (!IN_CONGRECOVERY(tp->t_flags) || + /* + * Allow ECN reaction on ACK to CWR, if + * that data segment was also CE marked. + */ + SEQ_GEQ(th->th_ack, tp->snd_recover)) { + EXIT_CONGRECOVERY(tp->t_flags); TCPSTAT_INC(tcps_ecn_rcwnd); - tp->snd_recover = tp->snd_max; + tp->snd_recover = tp->snd_max + 1; if (tp->t_flags & TF_ECN_PERMIT) tp->t_flags |= TF_ECN_SND_CWR; } Modified: stable/12/sys/netinet/tcp_output.c ============================================================================== --- stable/12/sys/netinet/tcp_output.c Wed Jun 24 15:46:33 2020 (r362585) +++ stable/12/sys/netinet/tcp_output.c Wed Jun 24 16:17:58 2020 (r362586) @@ -1132,7 +1132,8 @@ send: * Ignore pure ack packets, retransmissions and window probes. */ if (len > 0 && SEQ_GEQ(tp->snd_nxt, tp->snd_max) && - !((tp->t_flags & TF_FORCEDATA) && len == 1)) { + !((tp->t_flags & TF_FORCEDATA) && len == 1 && + SEQ_LT(tp->snd_una, tp->snd_max))) { #ifdef INET6 if (isipv6) ip6->ip6_flow |= htonl(IPTOS_ECN_ECT0 << 20); @@ -1140,15 +1141,15 @@ send: #endif ip->ip_tos |= IPTOS_ECN_ECT0; TCPSTAT_INC(tcps_ecn_ect0); + /* + * Reply with proper ECN notifications. + * Only set CWR on new data segments. + */ + if (tp->t_flags & TF_ECN_SND_CWR) { + flags |= TH_CWR; + tp->t_flags &= ~TF_ECN_SND_CWR; + } } - - /* - * Reply with proper ECN notifications. - */ - if (tp->t_flags & TF_ECN_SND_CWR) { - flags |= TH_CWR; - tp->t_flags &= ~TF_ECN_SND_CWR; - } if (tp->t_flags & TF_ECN_SND_ECE) flags |= TH_ECE; } Modified: stable/12/sys/netinet/tcp_stacks/rack.c ============================================================================== --- stable/12/sys/netinet/tcp_stacks/rack.c Wed Jun 24 15:46:33 2020 (r362585) +++ stable/12/sys/netinet/tcp_stacks/rack.c Wed Jun 24 16:17:58 2020 (r362586) @@ -1415,9 +1415,15 @@ rack_cong_signal(struct tcpcb *tp, struct tcphdr *th, } break; case CC_ECN: - if (!IN_CONGRECOVERY(tp->t_flags)) { + if (!IN_CONGRECOVERY(tp->t_flags) || + /* + * Allow ECN reaction on ACK to CWR, if + * that data segment was also CE marked. + */ + SEQ_GEQ(th->th_ack, tp->snd_recover)) { + EXIT_CONGRECOVERY(tp->t_flags); TCPSTAT_INC(tcps_ecn_rcwnd); - tp->snd_recover = tp->snd_max; + tp->snd_recover = tp->snd_max + 1; if (tp->t_flags & TF_ECN_PERMIT) tp->t_flags |= TF_ECN_SND_CWR; } @@ -8283,13 +8289,14 @@ send: #endif ip->ip_tos |= IPTOS_ECN_ECT0; TCPSTAT_INC(tcps_ecn_ect0); - } - /* - * Reply with proper ECN notifications. - */ - if (tp->t_flags & TF_ECN_SND_CWR) { - flags |= TH_CWR; - tp->t_flags &= ~TF_ECN_SND_CWR; + /* + * Reply with proper ECN notifications. + * Only set CWR on new data segments. + */ + if (tp->t_flags & TF_ECN_SND_CWR) { + flags |= TH_CWR; + tp->t_flags &= ~TF_ECN_SND_CWR; + } } if (tp->t_flags & TF_ECN_SND_ECE) flags |= TH_ECE; From owner-svn-src-stable@freebsd.org Thu Jun 25 00:00:05 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1850834671C; Thu, 25 Jun 2020 00:00:05 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49sgBD6wshz4Fng; Thu, 25 Jun 2020 00:00:04 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E913D19ECB; Thu, 25 Jun 2020 00:00:04 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05P004AZ050628; Thu, 25 Jun 2020 00:00:04 GMT (envelope-from wulf@FreeBSD.org) Received: (from wulf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05P004QJ050627; Thu, 25 Jun 2020 00:00:04 GMT (envelope-from wulf@FreeBSD.org) Message-Id: <202006250000.05P004QJ050627@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wulf set sender to wulf@FreeBSD.org using -f From: Vladimir Kondratyev Date: Thu, 25 Jun 2020 00:00:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362597 - stable/12/sys/dev/evdev X-SVN-Group: stable-12 X-SVN-Commit-Author: wulf X-SVN-Commit-Paths: stable/12/sys/dev/evdev X-SVN-Commit-Revision: 362597 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2020 00:00:05 -0000 Author: wulf Date: Thu Jun 25 00:00:04 2020 New Revision: 362597 URL: https://svnweb.freebsd.org/changeset/base/362597 Log: MFC r362260: evdev: Add AT translated set1 scancodes for 'Eisu' & 'Kana' keys. PR: 247292 Submitted by: Yuichiro NAITO Modified: stable/12/sys/dev/evdev/evdev_utils.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/evdev/evdev_utils.c ============================================================================== --- stable/12/sys/dev/evdev/evdev_utils.c Wed Jun 24 23:22:36 2020 (r362596) +++ stable/12/sys/dev/evdev/evdev_utils.c Thu Jun 25 00:00:04 2020 (r362597) @@ -146,7 +146,7 @@ static uint16_t evdev_at_set1_scancodes[] = { NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE, - KEY_KATAKANAHIRAGANA, NONE, NONE, KEY_RO, + KEY_KATAKANAHIRAGANA, KEY_HANGEUL, KEY_HANJA, KEY_RO, NONE, NONE, KEY_ZENKAKUHANKAKU, KEY_HIRAGANA, KEY_KATAKANA, KEY_HENKAN, NONE, KEY_MUHENKAN, NONE, KEY_YEN, KEY_KPCOMMA, NONE, From owner-svn-src-stable@freebsd.org Thu Jun 25 00:01:25 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5197B346A05; Thu, 25 Jun 2020 00:01:25 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49sgCn1XPtz4Fk9; Thu, 25 Jun 2020 00:01:25 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2DF361A1B8; Thu, 25 Jun 2020 00:01:25 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05P01Pjb055461; Thu, 25 Jun 2020 00:01:25 GMT (envelope-from wulf@FreeBSD.org) Received: (from wulf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05P01PN1055455; Thu, 25 Jun 2020 00:01:25 GMT (envelope-from wulf@FreeBSD.org) Message-Id: <202006250001.05P01PN1055455@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wulf set sender to wulf@FreeBSD.org using -f From: Vladimir Kondratyev Date: Thu, 25 Jun 2020 00:01:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r362598 - stable/11/sys/dev/evdev X-SVN-Group: stable-11 X-SVN-Commit-Author: wulf X-SVN-Commit-Paths: stable/11/sys/dev/evdev X-SVN-Commit-Revision: 362598 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2020 00:01:25 -0000 Author: wulf Date: Thu Jun 25 00:01:24 2020 New Revision: 362598 URL: https://svnweb.freebsd.org/changeset/base/362598 Log: MFC r362260: evdev: Add AT translated set1 scancodes for 'Eisu' & 'Kana' keys. PR: 247292 Submitted by: Yuichiro NAITO Modified: stable/11/sys/dev/evdev/evdev_utils.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/evdev/evdev_utils.c ============================================================================== --- stable/11/sys/dev/evdev/evdev_utils.c Thu Jun 25 00:00:04 2020 (r362597) +++ stable/11/sys/dev/evdev/evdev_utils.c Thu Jun 25 00:01:24 2020 (r362598) @@ -148,7 +148,7 @@ static uint16_t evdev_at_set1_scancodes[] = { NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE, NONE, - KEY_KATAKANAHIRAGANA, NONE, NONE, KEY_RO, + KEY_KATAKANAHIRAGANA, KEY_HANGEUL, KEY_HANJA, KEY_RO, NONE, NONE, KEY_ZENKAKUHANKAKU, KEY_HIRAGANA, KEY_KATAKANA, KEY_HENKAN, NONE, KEY_MUHENKAN, NONE, KEY_YEN, KEY_KPCOMMA, NONE, From owner-svn-src-stable@freebsd.org Thu Jun 25 02:45:49 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AC88534B0DF; Thu, 25 Jun 2020 02:45:49 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49sksT43ZDz4PlH; Thu, 25 Jun 2020 02:45:49 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6D2F51BA57; Thu, 25 Jun 2020 02:45:49 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05P2jnSr054287; Thu, 25 Jun 2020 02:45:49 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05P2jnCD054286; Thu, 25 Jun 2020 02:45:49 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <202006250245.05P2jnCD054286@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Thu, 25 Jun 2020 02:45:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362602 - stable/12/usr.sbin/mountd X-SVN-Group: stable-12 X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: stable/12/usr.sbin/mountd X-SVN-Commit-Revision: 362602 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2020 02:45:49 -0000 Author: rmacklem Date: Thu Jun 25 02:45:49 2020 New Revision: 362602 URL: https://svnweb.freebsd.org/changeset/base/362602 Log: MFC: r361780, r361956 Fix mountd to handle getgrouplist() not returning groups[0] == groups[1]. Prior to r174547, getgrouplist(3) always returned a groups list with element 0 and 1 set to the basegid argument, so long as ngroups was > 1. Post-r174547 this is not the case. r328304 disabled the deduplication that removed the duplicate, but the duplicate still does not occur unless the group for a user in the password database is also entered in the group database. This patch fixes mountd so that it handles the case where a user specified with the -maproot or -mapall exports option has a getgrouplist(3) groups list where groups[0] != groups[1]. Relnotes: yes Modified: stable/12/usr.sbin/mountd/mountd.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/mountd/mountd.c ============================================================================== --- stable/12/usr.sbin/mountd/mountd.c Thu Jun 25 02:00:51 2020 (r362601) +++ stable/12/usr.sbin/mountd/mountd.c Thu Jun 25 02:45:49 2020 (r362602) @@ -3434,10 +3434,18 @@ parsecred(char *namelist, struct xucred *cr) /* * Compress out duplicate. */ - cr->cr_ngroups = ngroups - 1; cr->cr_groups[0] = groups[0]; - for (cnt = 2; cnt < ngroups; cnt++) - cr->cr_groups[cnt - 1] = groups[cnt]; + if (ngroups > 1 && groups[0] == groups[1]) { + cr->cr_ngroups = ngroups - 1; + for (cnt = 2; cnt < ngroups; cnt++) + cr->cr_groups[cnt - 1] = groups[cnt]; + } else { + cr->cr_ngroups = ngroups; + if (cr->cr_ngroups > XU_NGROUPS) + cr->cr_ngroups = XU_NGROUPS; + for (cnt = 1; cnt < cr->cr_ngroups; cnt++) + cr->cr_groups[cnt] = groups[cnt]; + } return; } /* From owner-svn-src-stable@freebsd.org Thu Jun 25 05:17:37 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5A0D0350A4C; Thu, 25 Jun 2020 05:17:37 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49spDd1kWfz4ZT4; Thu, 25 Jun 2020 05:17:37 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 368351DF14; Thu, 25 Jun 2020 05:17:37 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05P5HbkT048260; Thu, 25 Jun 2020 05:17:37 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05P5Hbg3048259; Thu, 25 Jun 2020 05:17:37 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202006250517.05P5Hbg3048259@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 25 Jun 2020 05:17:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362603 - stable/12/libexec/rtld-elf X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/libexec/rtld-elf X-SVN-Commit-Revision: 362603 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2020 05:17:37 -0000 Author: kib Date: Thu Jun 25 05:17:36 2020 New Revision: 362603 URL: https://svnweb.freebsd.org/changeset/base/362603 Log: MFC r362346: rtld: Parse own phdr and notes. Modified: stable/12/libexec/rtld-elf/rtld.c Directory Properties: stable/12/ (props changed) Modified: stable/12/libexec/rtld-elf/rtld.c ============================================================================== --- stable/12/libexec/rtld-elf/rtld.c Thu Jun 25 02:45:49 2020 (r362602) +++ stable/12/libexec/rtld-elf/rtld.c Thu Jun 25 05:17:36 2020 (r362603) @@ -2135,6 +2135,34 @@ process_z(Obj_Entry *root) } } } + +static void +parse_rtld_phdr(Obj_Entry *obj) +{ + const Elf_Phdr *ph; + Elf_Addr note_start, note_end; + + obj->stack_flags = PF_X | PF_R | PF_W; + for (ph = obj->phdr; (const char *)ph < (const char *)obj->phdr + + obj->phsize; ph++) { + switch (ph->p_type) { + case PT_GNU_STACK: + obj->stack_flags = ph->p_flags; + break; + case PT_GNU_RELRO: + obj->relro_page = obj->relocbase + + trunc_page(ph->p_vaddr); + obj->relro_size = round_page(ph->p_memsz); + break; + case PT_NOTE: + note_start = (Elf_Addr)obj->relocbase + ph->p_vaddr; + note_end = note_start + ph->p_filesz; + digest_notes(obj, note_start, note_end); + break; + } + } +} + /* * Initialize the dynamic linker. The argument is the address at which * the dynamic linker has been mapped into memory. The primary task of @@ -2203,6 +2231,8 @@ init_rtld(caddr_t mapbase, Elf_Auxinfo **aux_info) /* Replace the path with a dynamically allocated copy. */ obj_rtld.path = xstrdup(ld_path_rtld); + + parse_rtld_phdr(&obj_rtld); r_debug.r_brk = r_debug_state; r_debug.r_state = RT_CONSISTENT; From owner-svn-src-stable@freebsd.org Thu Jun 25 05:20:01 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 93C7D350AF8; Thu, 25 Jun 2020 05:20:01 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49spHP3Rk2z4Zyw; Thu, 25 Jun 2020 05:20:01 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 71ACF1DB63; Thu, 25 Jun 2020 05:20:01 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05P5K1Bt048462; Thu, 25 Jun 2020 05:20:01 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05P5K1D7048461; Thu, 25 Jun 2020 05:20:01 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202006250520.05P5K1D7048461@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 25 Jun 2020 05:20:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362604 - stable/12/libexec/rtld-elf X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/libexec/rtld-elf X-SVN-Commit-Revision: 362604 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2020 05:20:01 -0000 Author: kib Date: Thu Jun 25 05:20:00 2020 New Revision: 362604 URL: https://svnweb.freebsd.org/changeset/base/362604 Log: MFC r362347: rtld: Apply relro to itself. Modified: stable/12/libexec/rtld-elf/rtld.c Directory Properties: stable/12/ (props changed) Modified: stable/12/libexec/rtld-elf/rtld.c ============================================================================== --- stable/12/libexec/rtld-elf/rtld.c Thu Jun 25 05:17:36 2020 (r362603) +++ stable/12/libexec/rtld-elf/rtld.c Thu Jun 25 05:20:00 2020 (r362604) @@ -2233,6 +2233,7 @@ init_rtld(caddr_t mapbase, Elf_Auxinfo **aux_info) obj_rtld.path = xstrdup(ld_path_rtld); parse_rtld_phdr(&obj_rtld); + obj_enforce_relro(&obj_rtld); r_debug.r_brk = r_debug_state; r_debug.r_state = RT_CONSISTENT; From owner-svn-src-stable@freebsd.org Thu Jun 25 05:24:36 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6AA88351073; Thu, 25 Jun 2020 05:24:36 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49spNh2DvKz4bWS; Thu, 25 Jun 2020 05:24:36 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 47EA41E030; Thu, 25 Jun 2020 05:24:36 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05P5OaGd054728; Thu, 25 Jun 2020 05:24:36 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05P5OaQg054727; Thu, 25 Jun 2020 05:24:36 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202006250524.05P5OaQg054727@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 25 Jun 2020 05:24:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362605 - stable/12/sys/compat/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/compat/linux X-SVN-Commit-Revision: 362605 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2020 05:24:36 -0000 Author: kib Date: Thu Jun 25 05:24:35 2020 New Revision: 362605 URL: https://svnweb.freebsd.org/changeset/base/362605 Log: MFC r362342: Fix execution of linux binary from multithreaded non-Linux process. Modified: stable/12/sys/compat/linux/linux_emul.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linux/linux_emul.c ============================================================================== --- stable/12/sys/compat/linux/linux_emul.c Thu Jun 25 05:20:00 2020 (r362604) +++ stable/12/sys/compat/linux/linux_emul.c Thu Jun 25 05:24:35 2020 (r362605) @@ -261,22 +261,13 @@ linux_common_execve(struct thread *td, struct image_ar void linux_proc_exec(void *arg __unused, struct proc *p, struct image_params *imgp) { - struct thread *td = curthread; + struct thread *td; struct thread *othertd; #if defined(__amd64__) struct linux_pemuldata *pem; #endif - /* - * In a case of execing from Linux binary properly detach - * other threads from the user space. - */ - if (__predict_false(SV_PROC_ABI(p) == SV_ABI_LINUX)) { - FOREACH_THREAD_IN_PROC(p, othertd) { - if (td != othertd) - (p->p_sysent->sv_thread_detach)(othertd); - } - } + td = curthread; /* * In a case of execing to Linux binary we create Linux @@ -284,11 +275,32 @@ linux_proc_exec(void *arg __unused, struct proc *p, st */ if (__predict_false((imgp->sysent->sv_flags & SV_ABI_MASK) == SV_ABI_LINUX)) { - - if (SV_PROC_ABI(p) == SV_ABI_LINUX) + if (SV_PROC_ABI(p) == SV_ABI_LINUX) { + /* + * Process already was under Linuxolator + * before exec. Update emuldata to reflect + * single-threaded cleaned state after exec. + */ linux_proc_init(td, NULL, 0); - else + } else { + /* + * We are switching the process to Linux emulator. + */ linux_proc_init(td, td, 0); + + /* + * Create a transient td_emuldata for all suspended + * threads, so that p->p_sysent->sv_thread_detach() == + * linux_thread_detach() can find expected but unused + * emuldata. + */ + FOREACH_THREAD_IN_PROC(td->td_proc, othertd) { + if (othertd != td) { + linux_proc_init(td, othertd, + LINUX_CLONE_THREAD); + } + } + } #if defined(__amd64__) /* * An IA32 executable which has executable stack will have the From owner-svn-src-stable@freebsd.org Thu Jun 25 05:35:46 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D2D9A3510DA; Thu, 25 Jun 2020 05:35:46 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49spdZ5Cwqz4c20; Thu, 25 Jun 2020 05:35:46 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AE5001E481; Thu, 25 Jun 2020 05:35:46 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05P5ZkhZ060690; Thu, 25 Jun 2020 05:35:46 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05P5ZkU2060689; Thu, 25 Jun 2020 05:35:46 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202006250535.05P5ZkU2060689@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 25 Jun 2020 05:35:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r362606 - stable/11/sys/compat/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/compat/linux X-SVN-Commit-Revision: 362606 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2020 05:35:46 -0000 Author: kib Date: Thu Jun 25 05:35:46 2020 New Revision: 362606 URL: https://svnweb.freebsd.org/changeset/base/362606 Log: MFC r362342: Fix execution of linux binary from multithreaded non-Linux process. Modified: stable/11/sys/compat/linux/linux_emul.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linux/linux_emul.c ============================================================================== --- stable/11/sys/compat/linux/linux_emul.c Thu Jun 25 05:24:35 2020 (r362605) +++ stable/11/sys/compat/linux/linux_emul.c Thu Jun 25 05:35:46 2020 (r362606) @@ -261,22 +261,13 @@ linux_common_execve(struct thread *td, struct image_ar void linux_proc_exec(void *arg __unused, struct proc *p, struct image_params *imgp) { - struct thread *td = curthread; + struct thread *td; struct thread *othertd; #if defined(__amd64__) struct linux_pemuldata *pem; #endif - /* - * In a case of execing from Linux binary properly detach - * other threads from the user space. - */ - if (__predict_false(SV_PROC_ABI(p) == SV_ABI_LINUX)) { - FOREACH_THREAD_IN_PROC(p, othertd) { - if (td != othertd) - (p->p_sysent->sv_thread_detach)(othertd); - } - } + td = curthread; /* * In a case of execing to Linux binary we create Linux @@ -284,11 +275,32 @@ linux_proc_exec(void *arg __unused, struct proc *p, st */ if (__predict_false((imgp->sysent->sv_flags & SV_ABI_MASK) == SV_ABI_LINUX)) { - - if (SV_PROC_ABI(p) == SV_ABI_LINUX) + if (SV_PROC_ABI(p) == SV_ABI_LINUX) { + /* + * Process already was under Linuxolator + * before exec. Update emuldata to reflect + * single-threaded cleaned state after exec. + */ linux_proc_init(td, NULL, 0); - else + } else { + /* + * We are switching the process to Linux emulator. + */ linux_proc_init(td, td, 0); + + /* + * Create a transient td_emuldata for all suspended + * threads, so that p->p_sysent->sv_thread_detach() == + * linux_thread_detach() can find expected but unused + * emuldata. + */ + FOREACH_THREAD_IN_PROC(td->td_proc, othertd) { + if (othertd != td) { + linux_proc_init(td, othertd, + LINUX_CLONE_THREAD); + } + } + } #if defined(__amd64__) /* * An IA32 executable which has executable stack will have the From owner-svn-src-stable@freebsd.org Thu Jun 25 05:44:07 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7275735191B; Thu, 25 Jun 2020 05:44:07 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49spqC2SpMz4cLX; Thu, 25 Jun 2020 05:44:07 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4FE4A1E425; Thu, 25 Jun 2020 05:44:07 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05P5i7Xn066800; Thu, 25 Jun 2020 05:44:07 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05P5i7Uk066799; Thu, 25 Jun 2020 05:44:07 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202006250544.05P5i7Uk066799@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 25 Jun 2020 05:44:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r362607 - stable/11/libexec/rtld-elf X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/libexec/rtld-elf X-SVN-Commit-Revision: 362607 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2020 05:44:07 -0000 Author: kib Date: Thu Jun 25 05:44:06 2020 New Revision: 362607 URL: https://svnweb.freebsd.org/changeset/base/362607 Log: MFC r362346: rtld: Parse own phdr and notes. Modified: stable/11/libexec/rtld-elf/rtld.c Directory Properties: stable/11/ (props changed) Modified: stable/11/libexec/rtld-elf/rtld.c ============================================================================== --- stable/11/libexec/rtld-elf/rtld.c Thu Jun 25 05:35:46 2020 (r362606) +++ stable/11/libexec/rtld-elf/rtld.c Thu Jun 25 05:44:06 2020 (r362607) @@ -2111,6 +2111,34 @@ process_z(Obj_Entry *root) } } } + +static void +parse_rtld_phdr(Obj_Entry *obj) +{ + const Elf_Phdr *ph; + Elf_Addr note_start, note_end; + + obj->stack_flags = PF_X | PF_R | PF_W; + for (ph = obj->phdr; (const char *)ph < (const char *)obj->phdr + + obj->phsize; ph++) { + switch (ph->p_type) { + case PT_GNU_STACK: + obj->stack_flags = ph->p_flags; + break; + case PT_GNU_RELRO: + obj->relro_page = obj->relocbase + + trunc_page(ph->p_vaddr); + obj->relro_size = round_page(ph->p_memsz); + break; + case PT_NOTE: + note_start = (Elf_Addr)obj->relocbase + ph->p_vaddr; + note_end = note_start + ph->p_filesz; + digest_notes(obj, note_start, note_end); + break; + } + } +} + /* * Initialize the dynamic linker. The argument is the address at which * the dynamic linker has been mapped into memory. The primary task of @@ -2179,6 +2207,8 @@ init_rtld(caddr_t mapbase, Elf_Auxinfo **aux_info) /* Replace the path with a dynamically allocated copy. */ obj_rtld.path = xstrdup(ld_path_rtld); + + parse_rtld_phdr(&obj_rtld); r_debug.r_brk = r_debug_state; r_debug.r_state = RT_CONSISTENT; From owner-svn-src-stable@freebsd.org Thu Jun 25 06:39:19 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 511F6352DE7; Thu, 25 Jun 2020 06:39:19 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49sr2v1Rvvz4g56; Thu, 25 Jun 2020 06:39:19 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2C7E11ED3D; Thu, 25 Jun 2020 06:39:19 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05P6dJMT098316; Thu, 25 Jun 2020 06:39:19 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05P6dJfY098315; Thu, 25 Jun 2020 06:39:19 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202006250639.05P6dJfY098315@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 25 Jun 2020 06:39:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r362608 - stable/11/libexec/rtld-elf X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/libexec/rtld-elf X-SVN-Commit-Revision: 362608 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2020 06:39:19 -0000 Author: kib Date: Thu Jun 25 06:39:18 2020 New Revision: 362608 URL: https://svnweb.freebsd.org/changeset/base/362608 Log: MFC r362347: rtld: Apply relro to itself. Modified: stable/11/libexec/rtld-elf/rtld.c Directory Properties: stable/11/ (props changed) Modified: stable/11/libexec/rtld-elf/rtld.c ============================================================================== --- stable/11/libexec/rtld-elf/rtld.c Thu Jun 25 05:44:06 2020 (r362607) +++ stable/11/libexec/rtld-elf/rtld.c Thu Jun 25 06:39:18 2020 (r362608) @@ -2209,6 +2209,7 @@ init_rtld(caddr_t mapbase, Elf_Auxinfo **aux_info) obj_rtld.path = xstrdup(ld_path_rtld); parse_rtld_phdr(&obj_rtld); + obj_enforce_relro(&obj_rtld); r_debug.r_brk = r_debug_state; r_debug.r_state = RT_CONSISTENT; From owner-svn-src-stable@freebsd.org Thu Jun 25 06:44:59 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 784A3353174; Thu, 25 Jun 2020 06:44:59 +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 49sr9M2qxLz3Rmh; Thu, 25 Jun 2020 06:44:55 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id 05P6ien8042127 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 25 Jun 2020 09:44:43 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 05P6ien8042127 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id 05P6ie7f042125; Thu, 25 Jun 2020 09:44:40 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 25 Jun 2020 09:44:40 +0300 From: Konstantin Belousov To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: Re: svn commit: r362608 - stable/11/libexec/rtld-elf Message-ID: <20200625064440.GA32126@kib.kiev.ua> References: <202006250639.05P6dJfY098315@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202006250639.05P6dJfY098315@repo.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: 49sr9M2qxLz3Rmh X-Spamd-Bar: + Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=gmail.com (policy=none); spf=softfail (mx1.freebsd.org: 2001:470:d5e7:1::1 is neither permitted nor denied by domain of kostikbel@gmail.com) smtp.mailfrom=kostikbel@gmail.com X-Spamd-Result: default: False [1.38 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; FREEMAIL_FROM(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; HAS_XAW(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all]; NEURAL_SPAM_MEDIUM(0.72)[0.721]; NEURAL_HAM_SHORT(-0.10)[-0.103]; NEURAL_SPAM_LONG(0.76)[0.759]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; FREEMAIL_ENVFROM(0.00)[gmail.com]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : No valid SPF, No valid DKIM,none] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2020 06:44:59 -0000 On Thu, Jun 25, 2020 at 06:39:19AM +0000, Konstantin Belousov wrote: > Author: kib > Date: Thu Jun 25 06:39:18 2020 > New Revision: 362608 > URL: https://svnweb.freebsd.org/changeset/base/362608 > > Log: > MFC r362347: > rtld: Apply relro to itself. On stable/11, due to the configuration of old bfd ld, rtld does not have relro segment, so this is a merge to keep code similar between branches. > > Modified: > stable/11/libexec/rtld-elf/rtld.c > Directory Properties: > stable/11/ (props changed) > > Modified: stable/11/libexec/rtld-elf/rtld.c > ============================================================================== > --- stable/11/libexec/rtld-elf/rtld.c Thu Jun 25 05:44:06 2020 (r362607) > +++ stable/11/libexec/rtld-elf/rtld.c Thu Jun 25 06:39:18 2020 (r362608) > @@ -2209,6 +2209,7 @@ init_rtld(caddr_t mapbase, Elf_Auxinfo **aux_info) > obj_rtld.path = xstrdup(ld_path_rtld); > > parse_rtld_phdr(&obj_rtld); > + obj_enforce_relro(&obj_rtld); > > r_debug.r_brk = r_debug_state; > r_debug.r_state = RT_CONSISTENT; From owner-svn-src-stable@freebsd.org Fri Jun 26 00:59:00 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 19955349BB4; Fri, 26 Jun 2020 00:59:00 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49tJRl6hCbz3ZMw; Fri, 26 Jun 2020 00:58:59 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E0C81BFBA; Fri, 26 Jun 2020 00:58:59 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05Q0wxe4074135; Fri, 26 Jun 2020 00:58:59 GMT (envelope-from freqlabs@FreeBSD.org) Received: (from freqlabs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05Q0wxcS074134; Fri, 26 Jun 2020 00:58:59 GMT (envelope-from freqlabs@FreeBSD.org) Message-Id: <202006260058.05Q0wxcS074134@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: freqlabs set sender to freqlabs@FreeBSD.org using -f From: Ryan Moeller Date: Fri, 26 Jun 2020 00:58:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362638 - in stable: 11/lib/libdevdctl 12/lib/libdevdctl X-SVN-Group: stable-12 X-SVN-Commit-Author: freqlabs X-SVN-Commit-Paths: in stable: 11/lib/libdevdctl 12/lib/libdevdctl X-SVN-Commit-Revision: 362638 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jun 2020 00:59:00 -0000 Author: freqlabs Date: Fri Jun 26 00:58:59 2020 New Revision: 362638 URL: https://svnweb.freebsd.org/changeset/base/362638 Log: MFC r362544: libdevdctl: Force full match of "timestamp" field name OpenZFS generates events with a "zio_timestamp" field, which gets mistaken for "timestamp" by libdevdctl due to imprecise string matching. Then later it is assumed a "timestamp" field exists when it doesn't and an exception is thrown. Add a space to the search string so we match exactly "timestamp" rather than anything with that as a suffix. Approved by: mav (mentor) Sponsored by: iXsystems, Inc. Modified: stable/12/lib/libdevdctl/event.cc Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/lib/libdevdctl/event.cc Directory Properties: stable/11/ (props changed) Modified: stable/12/lib/libdevdctl/event.cc ============================================================================== --- stable/12/lib/libdevdctl/event.cc Fri Jun 26 00:01:31 2020 (r362637) +++ stable/12/lib/libdevdctl/event.cc Fri Jun 26 00:58:59 2020 (r362638) @@ -427,7 +427,7 @@ Event::TimestampEventString(std::string &eventString) * Add a timestamp as the final field of the event if it is * not already present. */ - if (eventString.find("timestamp=") == string::npos) { + if (eventString.find(" timestamp=") == string::npos) { const size_t bufsize = 32; // Long enough for a 64-bit int timeval now; char timebuf[bufsize]; From owner-svn-src-stable@freebsd.org Fri Jun 26 00:58:59 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 99E37349AB0; Fri, 26 Jun 2020 00:58:59 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49tJRl3Yn8z3ZVY; Fri, 26 Jun 2020 00:58:59 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7564AC125; Fri, 26 Jun 2020 00:58:59 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05Q0wxgY074129; Fri, 26 Jun 2020 00:58:59 GMT (envelope-from freqlabs@FreeBSD.org) Received: (from freqlabs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05Q0wxSf074128; Fri, 26 Jun 2020 00:58:59 GMT (envelope-from freqlabs@FreeBSD.org) Message-Id: <202006260058.05Q0wxSf074128@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: freqlabs set sender to freqlabs@FreeBSD.org using -f From: Ryan Moeller Date: Fri, 26 Jun 2020 00:58:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r362638 - in stable: 11/lib/libdevdctl 12/lib/libdevdctl X-SVN-Group: stable-11 X-SVN-Commit-Author: freqlabs X-SVN-Commit-Paths: in stable: 11/lib/libdevdctl 12/lib/libdevdctl X-SVN-Commit-Revision: 362638 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jun 2020 00:58:59 -0000 Author: freqlabs Date: Fri Jun 26 00:58:59 2020 New Revision: 362638 URL: https://svnweb.freebsd.org/changeset/base/362638 Log: MFC r362544: libdevdctl: Force full match of "timestamp" field name OpenZFS generates events with a "zio_timestamp" field, which gets mistaken for "timestamp" by libdevdctl due to imprecise string matching. Then later it is assumed a "timestamp" field exists when it doesn't and an exception is thrown. Add a space to the search string so we match exactly "timestamp" rather than anything with that as a suffix. Approved by: mav (mentor) Sponsored by: iXsystems, Inc. Modified: stable/11/lib/libdevdctl/event.cc Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/lib/libdevdctl/event.cc Directory Properties: stable/12/ (props changed) Modified: stable/11/lib/libdevdctl/event.cc ============================================================================== --- stable/11/lib/libdevdctl/event.cc Fri Jun 26 00:01:31 2020 (r362637) +++ stable/11/lib/libdevdctl/event.cc Fri Jun 26 00:58:59 2020 (r362638) @@ -427,7 +427,7 @@ Event::TimestampEventString(std::string &eventString) * Add a timestamp as the final field of the event if it is * not already present. */ - if (eventString.find("timestamp=") == string::npos) { + if (eventString.find(" timestamp=") == string::npos) { const size_t bufsize = 32; // Long enough for a 64-bit int timeval now; char timebuf[bufsize]; From owner-svn-src-stable@freebsd.org Fri Jun 26 09:52:44 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4C69C3537B1; Fri, 26 Jun 2020 09:52:44 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49tXHc1GwHz4NwC; Fri, 26 Jun 2020 09:52:44 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 26FD9126FF; Fri, 26 Jun 2020 09:52:44 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05Q9qioO013621; Fri, 26 Jun 2020 09:52:44 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05Q9qhZx013619; Fri, 26 Jun 2020 09:52:43 GMT (envelope-from kp@FreeBSD.org) Message-Id: <202006260952.05Q9qhZx013619@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Fri, 26 Jun 2020 09:52:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362648 - stable/12/sys/net X-SVN-Group: stable-12 X-SVN-Commit-Author: kp X-SVN-Commit-Paths: stable/12/sys/net X-SVN-Commit-Revision: 362648 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jun 2020 09:52:44 -0000 Author: kp Date: Fri Jun 26 09:52:43 2020 New Revision: 362648 URL: https://svnweb.freebsd.org/changeset/base/362648 Log: MFC r358325: bridge: Move locking defines into if_bridge.c The locking defines for if_bridge used to live in if_bridgevar.h, but they're only ever used by the bridge implementation itself (in if_bridge.c). Moving them into the .c file. Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/net/if_bridge.c stable/12/sys/net/if_bridgevar.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/net/if_bridge.c ============================================================================== --- stable/12/sys/net/if_bridge.c Fri Jun 26 09:46:03 2020 (r362647) +++ stable/12/sys/net/if_bridge.c Fri Jun 26 09:52:43 2020 (r362648) @@ -185,6 +185,47 @@ extern void nd6_setmtu(struct ifnet *); #define BRIDGE_IFCAPS_STRIP IFCAP_LRO /* + * Bridge locking + */ +#define BRIDGE_LOCK_INIT(_sc) do { \ + mtx_init(&(_sc)->sc_mtx, "if_bridge", NULL, MTX_DEF); \ + cv_init(&(_sc)->sc_cv, "if_bridge_cv"); \ +} while (0) +#define BRIDGE_LOCK_DESTROY(_sc) do { \ + mtx_destroy(&(_sc)->sc_mtx); \ + cv_destroy(&(_sc)->sc_cv); \ +} while (0) +#define BRIDGE_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) +#define BRIDGE_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) +#define BRIDGE_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->sc_mtx, MA_OWNED) +#define BRIDGE_UNLOCK_ASSERT(_sc) mtx_assert(&(_sc)->sc_mtx, MA_NOTOWNED) +#define BRIDGE_LOCK2REF(_sc, _err) do { \ + mtx_assert(&(_sc)->sc_mtx, MA_OWNED); \ + if ((_sc)->sc_iflist_xcnt > 0) \ + (_err) = EBUSY; \ + else \ + (_sc)->sc_iflist_ref++; \ + mtx_unlock(&(_sc)->sc_mtx); \ +} while (0) +#define BRIDGE_UNREF(_sc) do { \ + mtx_lock(&(_sc)->sc_mtx); \ + (_sc)->sc_iflist_ref--; \ + if (((_sc)->sc_iflist_xcnt > 0) && ((_sc)->sc_iflist_ref == 0)) \ + cv_broadcast(&(_sc)->sc_cv); \ + mtx_unlock(&(_sc)->sc_mtx); \ +} while (0) +#define BRIDGE_XLOCK(_sc) do { \ + mtx_assert(&(_sc)->sc_mtx, MA_OWNED); \ + (_sc)->sc_iflist_xcnt++; \ + while ((_sc)->sc_iflist_ref > 0) \ + cv_wait(&(_sc)->sc_cv, &(_sc)->sc_mtx); \ +} while (0) +#define BRIDGE_XDROP(_sc) do { \ + mtx_assert(&(_sc)->sc_mtx, MA_OWNED); \ + (_sc)->sc_iflist_xcnt--; \ +} while (0) + +/* * Bridge interface list entry. */ struct bridge_iflist { Modified: stable/12/sys/net/if_bridgevar.h ============================================================================== --- stable/12/sys/net/if_bridgevar.h Fri Jun 26 09:46:03 2020 (r362647) +++ stable/12/sys/net/if_bridgevar.h Fri Jun 26 09:52:43 2020 (r362648) @@ -271,44 +271,6 @@ struct ifbpstpconf { #ifdef _KERNEL -#define BRIDGE_LOCK_INIT(_sc) do { \ - mtx_init(&(_sc)->sc_mtx, "if_bridge", NULL, MTX_DEF); \ - cv_init(&(_sc)->sc_cv, "if_bridge_cv"); \ -} while (0) -#define BRIDGE_LOCK_DESTROY(_sc) do { \ - mtx_destroy(&(_sc)->sc_mtx); \ - cv_destroy(&(_sc)->sc_cv); \ -} while (0) -#define BRIDGE_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) -#define BRIDGE_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) -#define BRIDGE_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->sc_mtx, MA_OWNED) -#define BRIDGE_UNLOCK_ASSERT(_sc) mtx_assert(&(_sc)->sc_mtx, MA_NOTOWNED) -#define BRIDGE_LOCK2REF(_sc, _err) do { \ - mtx_assert(&(_sc)->sc_mtx, MA_OWNED); \ - if ((_sc)->sc_iflist_xcnt > 0) \ - (_err) = EBUSY; \ - else \ - (_sc)->sc_iflist_ref++; \ - mtx_unlock(&(_sc)->sc_mtx); \ -} while (0) -#define BRIDGE_UNREF(_sc) do { \ - mtx_lock(&(_sc)->sc_mtx); \ - (_sc)->sc_iflist_ref--; \ - if (((_sc)->sc_iflist_xcnt > 0) && ((_sc)->sc_iflist_ref == 0)) \ - cv_broadcast(&(_sc)->sc_cv); \ - mtx_unlock(&(_sc)->sc_mtx); \ -} while (0) -#define BRIDGE_XLOCK(_sc) do { \ - mtx_assert(&(_sc)->sc_mtx, MA_OWNED); \ - (_sc)->sc_iflist_xcnt++; \ - while ((_sc)->sc_iflist_ref > 0) \ - cv_wait(&(_sc)->sc_cv, &(_sc)->sc_mtx); \ -} while (0) -#define BRIDGE_XDROP(_sc) do { \ - mtx_assert(&(_sc)->sc_mtx, MA_OWNED); \ - (_sc)->sc_iflist_xcnt--; \ -} while (0) - #define BRIDGE_INPUT(_ifp, _m) do { \ KASSERT((_ifp)->if_bridge_input != NULL, \ ("%s: if_bridge not loaded!", __func__)); \ From owner-svn-src-stable@freebsd.org Fri Jun 26 10:08:57 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8A49C353DA1; Fri, 26 Jun 2020 10:08:57 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49tXfK3H03z4Q1Y; Fri, 26 Jun 2020 10:08:57 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6B67312A05; Fri, 26 Jun 2020 10:08:57 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05QA8v1g019989; Fri, 26 Jun 2020 10:08:57 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05QA8vun019988; Fri, 26 Jun 2020 10:08:57 GMT (envelope-from kp@FreeBSD.org) Message-Id: <202006261008.05QA8vun019988@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Fri, 26 Jun 2020 10:08:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362649 - stable/12/sys/net X-SVN-Group: stable-12 X-SVN-Commit-Author: kp X-SVN-Commit-Paths: stable/12/sys/net X-SVN-Commit-Revision: 362649 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jun 2020 10:08:57 -0000 Author: kp Date: Fri Jun 26 10:08:57 2020 New Revision: 362649 URL: https://svnweb.freebsd.org/changeset/base/362649 Log: MFC r359641: bridge: Change lists to CK_LIST as a peparation for epochification Prepare the ground for a rework of the bridge locking approach. We will use an epoch-based approach in the datapath and making it safe to iterate over the interface, span and rtnode lists without holding the BRIDGE_LOCK. Replace the relevant lists by their ConcurrencyKit equivalents. No functional change in this commit. Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/net/if_bridge.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/net/if_bridge.c ============================================================================== --- stable/12/sys/net/if_bridge.c Fri Jun 26 09:52:43 2020 (r362648) +++ stable/12/sys/net/if_bridge.c Fri Jun 26 10:08:57 2020 (r362649) @@ -229,7 +229,7 @@ extern void nd6_setmtu(struct ifnet *); * Bridge interface list entry. */ struct bridge_iflist { - LIST_ENTRY(bridge_iflist) bif_next; + CK_LIST_ENTRY(bridge_iflist) bif_next; struct ifnet *bif_ifp; /* member if */ struct bstp_port bif_stp; /* STP state */ uint32_t bif_flags; /* member if flags */ @@ -243,8 +243,8 @@ struct bridge_iflist { * Bridge route node. */ struct bridge_rtnode { - LIST_ENTRY(bridge_rtnode) brt_hash; /* hash table linkage */ - LIST_ENTRY(bridge_rtnode) brt_list; /* list linkage */ + CK_LIST_ENTRY(bridge_rtnode) brt_hash; /* hash table linkage */ + CK_LIST_ENTRY(bridge_rtnode) brt_list; /* list linkage */ struct bridge_iflist *brt_dst; /* destination if */ unsigned long brt_expire; /* expiration time */ uint8_t brt_flags; /* address flags */ @@ -267,11 +267,11 @@ struct bridge_softc { struct callout sc_brcallout; /* bridge callout */ uint32_t sc_iflist_ref; /* refcount for sc_iflist */ uint32_t sc_iflist_xcnt; /* refcount for sc_iflist */ - LIST_HEAD(, bridge_iflist) sc_iflist; /* member interface list */ - LIST_HEAD(, bridge_rtnode) *sc_rthash; /* our forwarding table */ - LIST_HEAD(, bridge_rtnode) sc_rtlist; /* list version of above */ + CK_LIST_HEAD(, bridge_iflist) sc_iflist; /* member interface list */ + CK_LIST_HEAD(, bridge_rtnode) *sc_rthash; /* our forwarding table */ + CK_LIST_HEAD(, bridge_rtnode) sc_rtlist; /* list version of above */ uint32_t sc_rthash_key; /* key for hash */ - LIST_HEAD(, bridge_iflist) sc_spanlist; /* span ports list */ + CK_LIST_HEAD(, bridge_iflist) sc_spanlist; /* span ports list */ struct bstp_state sc_stp; /* STP state */ uint32_t sc_brtexceeded; /* # of cache drops */ struct ifnet *sc_ifaddr; /* member mac copied from */ @@ -696,8 +696,8 @@ bridge_clone_create(struct if_clone *ifc, int unit, ca callout_init_mtx(&sc->sc_brcallout, &sc->sc_mtx, 0); - LIST_INIT(&sc->sc_iflist); - LIST_INIT(&sc->sc_spanlist); + CK_LIST_INIT(&sc->sc_iflist); + CK_LIST_INIT(&sc->sc_spanlist); ifp->if_softc = sc; if_initname(ifp, bridge_name, unit); @@ -773,10 +773,10 @@ bridge_clone_destroy(struct ifnet *ifp) bridge_stop(ifp, 1); ifp->if_flags &= ~IFF_UP; - while ((bif = LIST_FIRST(&sc->sc_iflist)) != NULL) + while ((bif = CK_LIST_FIRST(&sc->sc_iflist)) != NULL) bridge_delete_member(sc, bif, 0); - while ((bif = LIST_FIRST(&sc->sc_spanlist)) != NULL) { + while ((bif = CK_LIST_FIRST(&sc->sc_spanlist)) != NULL) { bridge_delete_span(sc, bif); } @@ -915,12 +915,12 @@ bridge_ioctl(struct ifnet *ifp, u_long cmd, caddr_t da error = EINVAL; break; } - if (LIST_EMPTY(&sc->sc_iflist)) { + if (CK_LIST_EMPTY(&sc->sc_iflist)) { sc->sc_ifp->if_mtu = ifr->ifr_mtu; break; } BRIDGE_LOCK(sc); - LIST_FOREACH(bif, &sc->sc_iflist, bif_next) { + CK_LIST_FOREACH(bif, &sc->sc_iflist, bif_next) { if (bif->bif_ifp->if_mtu != ifr->ifr_mtu) { log(LOG_NOTICE, "%s: invalid MTU: %u(%s)" " != %d\n", sc->sc_ifp->if_xname, @@ -960,13 +960,13 @@ bridge_mutecaps(struct bridge_softc *sc) /* Initial bitmask of capabilities to test */ mask = BRIDGE_IFCAPS_MASK; - LIST_FOREACH(bif, &sc->sc_iflist, bif_next) { + CK_LIST_FOREACH(bif, &sc->sc_iflist, bif_next) { /* Every member must support it or its disabled */ mask &= bif->bif_savedcaps; } BRIDGE_XLOCK(sc); - LIST_FOREACH(bif, &sc->sc_iflist, bif_next) { + CK_LIST_FOREACH(bif, &sc->sc_iflist, bif_next) { enabled = bif->bif_ifp->if_capenable; enabled &= ~BRIDGE_IFCAPS_STRIP; /* strip off mask bits and enable them again if allowed */ @@ -1020,7 +1020,7 @@ bridge_lookup_member(struct bridge_softc *sc, const ch BRIDGE_LOCK_ASSERT(sc); - LIST_FOREACH(bif, &sc->sc_iflist, bif_next) { + CK_LIST_FOREACH(bif, &sc->sc_iflist, bif_next) { ifp = bif->bif_ifp; if (strcmp(ifp->if_xname, name) == 0) return (bif); @@ -1041,7 +1041,7 @@ bridge_lookup_member_if(struct bridge_softc *sc, struc BRIDGE_LOCK_ASSERT(sc); - LIST_FOREACH(bif, &sc->sc_iflist, bif_next) { + CK_LIST_FOREACH(bif, &sc->sc_iflist, bif_next) { if (bif->bif_ifp == member_ifp) return (bif); } @@ -1060,6 +1060,7 @@ bridge_delete_member(struct bridge_softc *sc, struct b { struct ifnet *ifs = bif->bif_ifp; struct ifnet *fif = NULL; + struct bridge_iflist *bifl; BRIDGE_LOCK_ASSERT(sc); @@ -1068,7 +1069,7 @@ bridge_delete_member(struct bridge_softc *sc, struct b ifs->if_bridge = NULL; BRIDGE_XLOCK(sc); - LIST_REMOVE(bif, bif_next); + CK_LIST_REMOVE(bif, bif_next); BRIDGE_XDROP(sc); /* @@ -1077,12 +1078,13 @@ bridge_delete_member(struct bridge_softc *sc, struct b * to its default address if no members are left. */ if (V_bridge_inherit_mac && sc->sc_ifaddr == ifs) { - if (LIST_EMPTY(&sc->sc_iflist)) { + if (CK_LIST_EMPTY(&sc->sc_iflist)) { bcopy(&sc->sc_defaddr, IF_LLADDR(sc->sc_ifp), ETHER_ADDR_LEN); sc->sc_ifaddr = NULL; } else { - fif = LIST_FIRST(&sc->sc_iflist)->bif_ifp; + bifl = CK_LIST_FIRST(&sc->sc_iflist); + fif = bifl->bif_ifp; bcopy(IF_LLADDR(fif), IF_LLADDR(sc->sc_ifp), ETHER_ADDR_LEN); sc->sc_ifaddr = fif; @@ -1143,7 +1145,7 @@ bridge_delete_span(struct bridge_softc *sc, struct bri KASSERT(bif->bif_ifp->if_bridge == NULL, ("%s: not a span interface", __func__)); - LIST_REMOVE(bif, bif_next); + CK_LIST_REMOVE(bif, bif_next); free(bif, M_DEVBUF); } @@ -1162,7 +1164,7 @@ bridge_ioctl_add(struct bridge_softc *sc, void *arg) return (EINVAL); /* If it's in the span list, it can't be a member. */ - LIST_FOREACH(bif, &sc->sc_spanlist, bif_next) + CK_LIST_FOREACH(bif, &sc->sc_spanlist, bif_next) if (ifs == bif->bif_ifp) return (EBUSY); @@ -1201,7 +1203,7 @@ bridge_ioctl_add(struct bridge_softc *sc, void *arg) * interfaces. */ BRIDGE_XLOCK(sc); - LIST_FOREACH(bif, &sc->sc_iflist, bif_next) { + CK_LIST_FOREACH(bif, &sc->sc_iflist, bif_next) { if (in6ifa_llaonifp(bif->bif_ifp)) { BRIDGE_UNLOCK(sc); in6_ifdetach(bif->bif_ifp); @@ -1227,7 +1229,7 @@ bridge_ioctl_add(struct bridge_softc *sc, void *arg) } #endif /* Allow the first Ethernet member to define the MTU */ - if (LIST_EMPTY(&sc->sc_iflist)) + if (CK_LIST_EMPTY(&sc->sc_iflist)) sc->sc_ifp->if_mtu = ifs->if_mtu; else if (sc->sc_ifp->if_mtu != ifs->if_mtu) { if_printf(sc->sc_ifp, "invalid MTU: %u(%s) != %u\n", @@ -1248,7 +1250,7 @@ bridge_ioctl_add(struct bridge_softc *sc, void *arg) * member and the MAC address of the bridge has not been changed from * the default randomly generated one. */ - if (V_bridge_inherit_mac && LIST_EMPTY(&sc->sc_iflist) && + if (V_bridge_inherit_mac && CK_LIST_EMPTY(&sc->sc_iflist) && !memcmp(IF_LLADDR(sc->sc_ifp), sc->sc_defaddr.octet, ETHER_ADDR_LEN)) { bcopy(IF_LLADDR(ifs), IF_LLADDR(sc->sc_ifp), ETHER_ADDR_LEN); sc->sc_ifaddr = ifs; @@ -1265,7 +1267,7 @@ bridge_ioctl_add(struct bridge_softc *sc, void *arg) * * NOTE: insert_***HEAD*** should be safe for the traversals. */ - LIST_INSERT_HEAD(&sc->sc_iflist, bif, bif_next); + CK_LIST_INSERT_HEAD(&sc->sc_iflist, bif, bif_next); /* Set interface capabilities to the intersection set of all members */ bridge_mutecaps(sc); @@ -1412,9 +1414,9 @@ bridge_ioctl_gifs(struct bridge_softc *sc, void *arg) int count, buflen, len, error = 0; count = 0; - LIST_FOREACH(bif, &sc->sc_iflist, bif_next) + CK_LIST_FOREACH(bif, &sc->sc_iflist, bif_next) count++; - LIST_FOREACH(bif, &sc->sc_spanlist, bif_next) + CK_LIST_FOREACH(bif, &sc->sc_spanlist, bif_next) count++; buflen = sizeof(breq) * count; @@ -1430,7 +1432,7 @@ bridge_ioctl_gifs(struct bridge_softc *sc, void *arg) buf = outbuf; len = min(bifc->ifbic_len, buflen); bzero(&breq, sizeof(breq)); - LIST_FOREACH(bif, &sc->sc_iflist, bif_next) { + CK_LIST_FOREACH(bif, &sc->sc_iflist, bif_next) { if (len < sizeof(breq)) break; @@ -1445,7 +1447,7 @@ bridge_ioctl_gifs(struct bridge_softc *sc, void *arg) buf += sizeof(breq); len -= sizeof(breq); } - LIST_FOREACH(bif, &sc->sc_spanlist, bif_next) { + CK_LIST_FOREACH(bif, &sc->sc_spanlist, bif_next) { if (len < sizeof(breq)) break; @@ -1480,7 +1482,7 @@ bridge_ioctl_rts(struct bridge_softc *sc, void *arg) return (0); count = 0; - LIST_FOREACH(brt, &sc->sc_rtlist, brt_list) + CK_LIST_FOREACH(brt, &sc->sc_rtlist, brt_list) count++; buflen = sizeof(bareq) * count; @@ -1492,7 +1494,7 @@ bridge_ioctl_rts(struct bridge_softc *sc, void *arg) buf = outbuf; len = min(bac->ifbac_len, buflen); bzero(&bareq, sizeof(bareq)); - LIST_FOREACH(brt, &sc->sc_rtlist, brt_list) { + CK_LIST_FOREACH(brt, &sc->sc_rtlist, brt_list) { if (len < sizeof(bareq)) goto out; strlcpy(bareq.ifba_ifsname, brt->brt_ifp->if_xname, @@ -1695,7 +1697,7 @@ bridge_ioctl_addspan(struct bridge_softc *sc, void *ar if (ifs == NULL) return (ENOENT); - LIST_FOREACH(bif, &sc->sc_spanlist, bif_next) + CK_LIST_FOREACH(bif, &sc->sc_spanlist, bif_next) if (ifs == bif->bif_ifp) return (EBUSY); @@ -1718,7 +1720,7 @@ bridge_ioctl_addspan(struct bridge_softc *sc, void *ar bif->bif_ifp = ifs; bif->bif_flags = IFBIF_SPAN; - LIST_INSERT_HEAD(&sc->sc_spanlist, bif, bif_next); + CK_LIST_INSERT_HEAD(&sc->sc_spanlist, bif, bif_next); return (0); } @@ -1734,7 +1736,7 @@ bridge_ioctl_delspan(struct bridge_softc *sc, void *ar if (ifs == NULL) return (ENOENT); - LIST_FOREACH(bif, &sc->sc_spanlist, bif_next) + CK_LIST_FOREACH(bif, &sc->sc_spanlist, bif_next) if (ifs == bif->bif_ifp) break; @@ -1796,7 +1798,7 @@ bridge_ioctl_gifsstp(struct bridge_softc *sc, void *ar int count, buflen, len, error = 0; count = 0; - LIST_FOREACH(bif, &sc->sc_iflist, bif_next) { + CK_LIST_FOREACH(bif, &sc->sc_iflist, bif_next) { if ((bif->bif_flags & IFBIF_STP) != 0) count++; } @@ -1815,7 +1817,7 @@ bridge_ioctl_gifsstp(struct bridge_softc *sc, void *ar buf = outbuf; len = min(bifstp->ifbpstp_len, buflen); bzero(&bpreq, sizeof(bpreq)); - LIST_FOREACH(bif, &sc->sc_iflist, bif_next) { + CK_LIST_FOREACH(bif, &sc->sc_iflist, bif_next) { if (len < sizeof(bpreq)) break; @@ -1897,7 +1899,7 @@ bridge_ifdetach(void *arg __unused, struct ifnet *ifp) BRIDGE_LIST_LOCK(); LIST_FOREACH(sc, &V_bridge_list, sc_list) { BRIDGE_LOCK(sc); - LIST_FOREACH(bif, &sc->sc_spanlist, bif_next) + CK_LIST_FOREACH(bif, &sc->sc_spanlist, bif_next) if (ifp == bif->bif_ifp) { bridge_delete_span(sc, bif); break; @@ -2108,7 +2110,7 @@ bridge_output(struct ifnet *ifp, struct mbuf *m, struc return (0); } - LIST_FOREACH(bif, &sc->sc_iflist, bif_next) { + CK_LIST_FOREACH(bif, &sc->sc_iflist, bif_next) { dst_if = bif->bif_ifp; if (dst_if->if_type == IFT_GIF) @@ -2126,7 +2128,7 @@ bridge_output(struct ifnet *ifp, struct mbuf *m, struc bif->bif_stp.bp_state == BSTP_IFSTATE_DISCARDING) continue; - if (LIST_NEXT(bif, bif_next) == NULL) { + if (CK_LIST_NEXT(bif, bif_next) == NULL) { used = 1; mc = m; } else { @@ -2537,7 +2539,7 @@ bridge_input(struct ifnet *ifp, struct mbuf *m) do { GRAB_OUR_PACKETS(ifp) } while (0); /* Now check the all bridge members. */ - LIST_FOREACH(bif2, &sc->sc_iflist, bif_next) { + CK_LIST_FOREACH(bif2, &sc->sc_iflist, bif_next) { GRAB_OUR_PACKETS(bif2->bif_ifp) } @@ -2590,7 +2592,7 @@ bridge_broadcast(struct bridge_softc *sc, struct ifnet goto out; } - LIST_FOREACH(dbif, &sc->sc_iflist, bif_next) { + CK_LIST_FOREACH(dbif, &sc->sc_iflist, bif_next) { dst_if = dbif->bif_ifp; if (dst_if == src_if) continue; @@ -2610,7 +2612,7 @@ bridge_broadcast(struct bridge_softc *sc, struct ifnet if ((dst_if->if_drv_flags & IFF_DRV_RUNNING) == 0) continue; - if (LIST_NEXT(dbif, bif_next) == NULL) { + if (CK_LIST_NEXT(dbif, bif_next) == NULL) { mc = m; used = 1; } else { @@ -2668,10 +2670,10 @@ bridge_span(struct bridge_softc *sc, struct mbuf *m) struct ifnet *dst_if; struct mbuf *mc; - if (LIST_EMPTY(&sc->sc_spanlist)) + if (CK_LIST_EMPTY(&sc->sc_spanlist)) return; - LIST_FOREACH(bif, &sc->sc_spanlist, bif_next) { + CK_LIST_FOREACH(bif, &sc->sc_spanlist, bif_next) { dst_if = bif->bif_ifp; if ((dst_if->if_drv_flags & IFF_DRV_RUNNING) == 0) @@ -2807,7 +2809,7 @@ bridge_rttrim(struct bridge_softc *sc) if (sc->sc_brtcnt <= sc->sc_brtmax) return; - LIST_FOREACH_SAFE(brt, &sc->sc_rtlist, brt_list, nbrt) { + CK_LIST_FOREACH_SAFE(brt, &sc->sc_rtlist, brt_list, nbrt) { if ((brt->brt_flags & IFBAF_TYPEMASK) == IFBAF_DYNAMIC) { bridge_rtnode_destroy(sc, brt); if (sc->sc_brtcnt <= sc->sc_brtmax) @@ -2850,7 +2852,7 @@ bridge_rtage(struct bridge_softc *sc) BRIDGE_LOCK_ASSERT(sc); - LIST_FOREACH_SAFE(brt, &sc->sc_rtlist, brt_list, nbrt) { + CK_LIST_FOREACH_SAFE(brt, &sc->sc_rtlist, brt_list, nbrt) { if ((brt->brt_flags & IFBAF_TYPEMASK) == IFBAF_DYNAMIC) { if (time_uptime >= brt->brt_expire) bridge_rtnode_destroy(sc, brt); @@ -2870,7 +2872,7 @@ bridge_rtflush(struct bridge_softc *sc, int full) BRIDGE_LOCK_ASSERT(sc); - LIST_FOREACH_SAFE(brt, &sc->sc_rtlist, brt_list, nbrt) { + CK_LIST_FOREACH_SAFE(brt, &sc->sc_rtlist, brt_list, nbrt) { if (full || (brt->brt_flags & IFBAF_TYPEMASK) == IFBAF_DYNAMIC) bridge_rtnode_destroy(sc, brt); } @@ -2913,7 +2915,7 @@ bridge_rtdelete(struct bridge_softc *sc, struct ifnet BRIDGE_LOCK_ASSERT(sc); - LIST_FOREACH_SAFE(brt, &sc->sc_rtlist, brt_list, nbrt) { + CK_LIST_FOREACH_SAFE(brt, &sc->sc_rtlist, brt_list, nbrt) { if (brt->brt_ifp == ifp && (full || (brt->brt_flags & IFBAF_TYPEMASK) == IFBAF_DYNAMIC)) bridge_rtnode_destroy(sc, brt); @@ -2934,10 +2936,10 @@ bridge_rtable_init(struct bridge_softc *sc) M_DEVBUF, M_WAITOK); for (i = 0; i < BRIDGE_RTHASH_SIZE; i++) - LIST_INIT(&sc->sc_rthash[i]); + CK_LIST_INIT(&sc->sc_rthash[i]); sc->sc_rthash_key = arc4random(); - LIST_INIT(&sc->sc_rtlist); + CK_LIST_INIT(&sc->sc_rtlist); } /* @@ -3018,7 +3020,7 @@ bridge_rtnode_lookup(struct bridge_softc *sc, const ui BRIDGE_LOCK_ASSERT(sc); hash = bridge_rthash(sc, addr); - LIST_FOREACH(brt, &sc->sc_rthash[hash], brt_hash) { + CK_LIST_FOREACH(brt, &sc->sc_rthash[hash], brt_hash) { dir = bridge_rtnode_addr_cmp(addr, brt->brt_addr); if (dir == 0 && (brt->brt_vlan == vlan || vlan == 0)) return (brt); @@ -3046,9 +3048,9 @@ bridge_rtnode_insert(struct bridge_softc *sc, struct b hash = bridge_rthash(sc, brt->brt_addr); - lbrt = LIST_FIRST(&sc->sc_rthash[hash]); + lbrt = CK_LIST_FIRST(&sc->sc_rthash[hash]); if (lbrt == NULL) { - LIST_INSERT_HEAD(&sc->sc_rthash[hash], brt, brt_hash); + CK_LIST_INSERT_HEAD(&sc->sc_rthash[hash], brt, brt_hash); goto out; } @@ -3057,14 +3059,14 @@ bridge_rtnode_insert(struct bridge_softc *sc, struct b if (dir == 0 && brt->brt_vlan == lbrt->brt_vlan) return (EEXIST); if (dir > 0) { - LIST_INSERT_BEFORE(lbrt, brt, brt_hash); + CK_LIST_INSERT_BEFORE(lbrt, brt, brt_hash); goto out; } - if (LIST_NEXT(lbrt, brt_hash) == NULL) { - LIST_INSERT_AFTER(lbrt, brt, brt_hash); + if (CK_LIST_NEXT(lbrt, brt_hash) == NULL) { + CK_LIST_INSERT_AFTER(lbrt, brt, brt_hash); goto out; } - lbrt = LIST_NEXT(lbrt, brt_hash); + lbrt = CK_LIST_NEXT(lbrt, brt_hash); } while (lbrt != NULL); #ifdef DIAGNOSTIC @@ -3072,7 +3074,7 @@ bridge_rtnode_insert(struct bridge_softc *sc, struct b #endif out: - LIST_INSERT_HEAD(&sc->sc_rtlist, brt, brt_list); + CK_LIST_INSERT_HEAD(&sc->sc_rtlist, brt, brt_list); sc->sc_brtcnt++; return (0); @@ -3088,9 +3090,9 @@ bridge_rtnode_destroy(struct bridge_softc *sc, struct { BRIDGE_LOCK_ASSERT(sc); - LIST_REMOVE(brt, brt_hash); + CK_LIST_REMOVE(brt, brt_hash); - LIST_REMOVE(brt, brt_list); + CK_LIST_REMOVE(brt, brt_list); sc->sc_brtcnt--; brt->brt_dst->bif_addrcnt--; uma_zfree(V_bridge_rtnode_zone, brt); @@ -3117,7 +3119,7 @@ bridge_rtable_expire(struct ifnet *ifp, int age) if (age == 0) bridge_rtdelete(sc, ifp, IFBF_FLUSHDYN); else { - LIST_FOREACH(brt, &sc->sc_rtlist, brt_list) { + CK_LIST_FOREACH(brt, &sc->sc_rtlist, brt_list) { /* Cap the expiry time to 'age' */ if (brt->brt_ifp == ifp && brt->brt_expire > time_uptime + age && @@ -3661,7 +3663,7 @@ bridge_linkcheck(struct bridge_softc *sc) new_link = LINK_STATE_DOWN; hasls = 0; /* Our link is considered up if at least one of our ports is active */ - LIST_FOREACH(bif, &sc->sc_iflist, bif_next) { + CK_LIST_FOREACH(bif, &sc->sc_iflist, bif_next) { if (bif->bif_ifp->if_capabilities & IFCAP_LINKSTATE) hasls++; if (bif->bif_ifp->if_link_state == LINK_STATE_UP) { @@ -3669,7 +3671,7 @@ bridge_linkcheck(struct bridge_softc *sc) break; } } - if (!LIST_EMPTY(&sc->sc_iflist) && !hasls) { + if (!CK_LIST_EMPTY(&sc->sc_iflist) && !hasls) { /* If no interfaces support link-state then we default to up */ new_link = LINK_STATE_UP; } From owner-svn-src-stable@freebsd.org Fri Jun 26 12:11:23 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0571435718E; Fri, 26 Jun 2020 12:11:23 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49tbMZ6b13z4YZ4; Fri, 26 Jun 2020 12:11:22 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DD27413E34; Fri, 26 Jun 2020 12:11:22 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05QCBMZi002463; Fri, 26 Jun 2020 12:11:22 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05QCBMTP002462; Fri, 26 Jun 2020 12:11:22 GMT (envelope-from kp@FreeBSD.org) Message-Id: <202006261211.05QCBMTP002462@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Fri, 26 Jun 2020 12:11:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362650 - stable/12/sys/net X-SVN-Group: stable-12 X-SVN-Commit-Author: kp X-SVN-Commit-Paths: stable/12/sys/net X-SVN-Commit-Revision: 362650 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jun 2020 12:11:23 -0000 Author: kp Date: Fri Jun 26 12:11:22 2020 New Revision: 362650 URL: https://svnweb.freebsd.org/changeset/base/362650 Log: MFC r360345: bridge: epoch-ification Run the bridge datapath under epoch, rather than under the BRIDGE_LOCK(). We still take the BRIDGE_LOCK() whenever we insert or delete items in the relevant lists, but we use epoch callbacks to free items so that it's safe to iterate the lists without the BRIDGE_LOCK. Tests on mercat5/6 shows this increases bridge throughput significantly, from 3.7Mpps to 18.6Mpps. MFC after: The FreeBSD Foundation Modified: stable/12/sys/net/if_bridge.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/net/if_bridge.c ============================================================================== --- stable/12/sys/net/if_bridge.c Fri Jun 26 10:08:57 2020 (r362649) +++ stable/12/sys/net/if_bridge.c Fri Jun 26 12:11:22 2020 (r362650) @@ -237,6 +237,8 @@ struct bridge_iflist { uint32_t bif_addrmax; /* max # of addresses */ uint32_t bif_addrcnt; /* cur. # of addresses */ uint32_t bif_addrexceeded;/* # of address violations */ + + struct epoch_context bif_epoch_ctx; }; /* @@ -250,6 +252,9 @@ struct bridge_rtnode { uint8_t brt_flags; /* address flags */ uint8_t brt_addr[ETHER_ADDR_LEN]; uint16_t brt_vlan; /* vlan id */ + + struct vnet *brt_vnet; + struct epoch_context brt_epoch_ctx; }; #define brt_ifp brt_dst->bif_ifp @@ -276,6 +281,8 @@ struct bridge_softc { uint32_t sc_brtexceeded; /* # of cache drops */ struct ifnet *sc_ifaddr; /* member mac copied from */ struct ether_addr sc_defaddr; /* Default MAC address */ + + struct epoch_context sc_epoch_ctx; }; VNET_DEFINE_STATIC(struct mtx, bridge_list_mtx); @@ -595,6 +602,11 @@ vnet_bridge_uninit(const void *unused __unused) if_clone_detach(V_bridge_cloner); V_bridge_cloner = NULL; BRIDGE_LIST_LOCK_DESTROY(); + + /* Before we can destroy the uma zone, because there are callbacks that + * use it. */ + NET_EPOCH_WAIT(); + uma_zdestroy(V_bridge_rtnode_zone); } VNET_SYSUNINIT(vnet_bridge_uninit, SI_SUB_PSEUDO, SI_ORDER_ANY, @@ -757,6 +769,17 @@ bridge_clone_create(struct if_clone *ifc, int unit, ca return (0); } +static void +bridge_clone_destroy_cb(struct epoch_context *ctx) +{ + struct bridge_softc *sc; + + sc = __containerof(ctx, struct bridge_softc, sc_epoch_ctx); + + BRIDGE_LOCK_DESTROY(sc); + free(sc, M_DEVBUF); +} + /* * bridge_clone_destroy: * @@ -795,8 +818,7 @@ bridge_clone_destroy(struct ifnet *ifp) ether_ifdetach(ifp); if_free(ifp); - BRIDGE_LOCK_DESTROY(sc); - free(sc, M_DEVBUF); + epoch_call(net_epoch_preempt, &sc->sc_epoch_ctx, bridge_clone_destroy_cb); } /* @@ -822,7 +844,10 @@ bridge_ioctl(struct ifnet *ifp, u_long cmd, caddr_t da struct ifdrv *ifd = (struct ifdrv *) data; const struct bridge_control *bc; int error = 0, oldmtu; + struct epoch_tracker et; + NET_EPOCH_ENTER_ET(et); + switch (cmd) { case SIOCADDMULTI: @@ -943,6 +968,8 @@ bridge_ioctl(struct ifnet *ifp, u_long cmd, caddr_t da break; } + NET_EPOCH_EXIT_ET(et); + return (error); } @@ -957,6 +984,8 @@ bridge_mutecaps(struct bridge_softc *sc) struct bridge_iflist *bif; int enabled, mask; + BRIDGE_LOCK_ASSERT(sc); + /* Initial bitmask of capabilities to test */ mask = BRIDGE_IFCAPS_MASK; @@ -1018,7 +1047,7 @@ bridge_lookup_member(struct bridge_softc *sc, const ch struct bridge_iflist *bif; struct ifnet *ifp; - BRIDGE_LOCK_ASSERT(sc); + MPASS(in_epoch(net_epoch_preempt)); CK_LIST_FOREACH(bif, &sc->sc_iflist, bif_next) { ifp = bif->bif_ifp; @@ -1039,7 +1068,7 @@ bridge_lookup_member_if(struct bridge_softc *sc, struc { struct bridge_iflist *bif; - BRIDGE_LOCK_ASSERT(sc); + MPASS(in_epoch(net_epoch_preempt)); CK_LIST_FOREACH(bif, &sc->sc_iflist, bif_next) { if (bif->bif_ifp == member_ifp) @@ -1049,6 +1078,16 @@ bridge_lookup_member_if(struct bridge_softc *sc, struc return (NULL); } +static void +bridge_delete_member_cb(struct epoch_context *ctx) +{ + struct bridge_iflist *bif; + + bif = __containerof(ctx, struct bridge_iflist, bif_epoch_ctx); + + free(bif, M_DEVBUF); +} + /* * bridge_delete_member: * @@ -1129,7 +1168,9 @@ bridge_delete_member(struct bridge_softc *sc, struct b } bstp_destroy(&bif->bif_stp); /* prepare to free */ BRIDGE_LOCK(sc); - free(bif, M_DEVBUF); + + epoch_call(net_epoch_preempt, &bif->bif_epoch_ctx, + bridge_delete_member_cb); } /* @@ -1146,7 +1187,9 @@ bridge_delete_span(struct bridge_softc *sc, struct bri ("%s: not a span interface", __func__)); CK_LIST_REMOVE(bif, bif_next); - free(bif, M_DEVBUF); + + epoch_call(net_epoch_preempt, &bif->bif_epoch_ctx, + bridge_delete_member_cb); } static int @@ -1529,12 +1572,17 @@ bridge_ioctl_saddr(struct bridge_softc *sc, void *arg) struct bridge_iflist *bif; int error; + MPASS(in_epoch(net_epoch_preempt)); + bif = bridge_lookup_member(sc, req->ifba_ifsname); if (bif == NULL) return (ENOENT); + /* bridge_rtupdate() may acquire the lock. */ + BRIDGE_UNLOCK(sc); error = bridge_rtupdate(sc, req->ifba_dst, req->ifba_vlan, bif, 1, req->ifba_flags); + BRIDGE_LOCK(sc); return (error); } @@ -1873,6 +1921,7 @@ bridge_ifdetach(void *arg __unused, struct ifnet *ifp) { struct bridge_softc *sc = ifp->if_bridge; struct bridge_iflist *bif; + struct epoch_tracker et; if (ifp->if_flags & IFF_RENAMING) return; @@ -1883,6 +1932,7 @@ bridge_ifdetach(void *arg __unused, struct ifnet *ifp) */ return; } + NET_EPOCH_ENTER_ET(et); /* Check if the interface is a bridge member */ if (sc != NULL) { BRIDGE_LOCK(sc); @@ -1892,6 +1942,7 @@ bridge_ifdetach(void *arg __unused, struct ifnet *ifp) bridge_delete_member(sc, bif, 1); BRIDGE_UNLOCK(sc); + NET_EPOCH_EXIT_ET(et); return; } @@ -1908,6 +1959,7 @@ bridge_ifdetach(void *arg __unused, struct ifnet *ifp) BRIDGE_UNLOCK(sc); } BRIDGE_LIST_UNLOCK(); + NET_EPOCH_EXIT_ET(et); } /* @@ -2067,6 +2119,8 @@ bridge_output(struct ifnet *ifp, struct mbuf *m, struc struct bridge_softc *sc; uint16_t vlan; + MPASS(in_epoch(net_epoch_preempt)); + if (m->m_len < ETHER_HDR_LEN) { m = m_pullup(m, ETHER_HDR_LEN); if (m == NULL) @@ -2077,8 +2131,6 @@ bridge_output(struct ifnet *ifp, struct mbuf *m, struc sc = ifp->if_bridge; vlan = VLANTAGOF(m); - BRIDGE_LOCK(sc); - /* * If bridge is down, but the original output interface is up, * go ahead and send out that interface. Otherwise, the packet @@ -2100,16 +2152,10 @@ bridge_output(struct ifnet *ifp, struct mbuf *m, struc if (dst_if == NULL) { struct bridge_iflist *bif; struct mbuf *mc; - int error = 0, used = 0; + int used = 0; bridge_span(sc, m); - BRIDGE_LOCK2REF(sc, error); - if (error) { - m_freem(m); - return (0); - } - CK_LIST_FOREACH(bif, &sc->sc_iflist, bif_next) { dst_if = bif->bif_ifp; @@ -2143,7 +2189,6 @@ bridge_output(struct ifnet *ifp, struct mbuf *m, struc } if (used == 0) m_freem(m); - BRIDGE_UNREF(sc); return (0); } @@ -2155,11 +2200,9 @@ sendunicast: bridge_span(sc, m); if ((dst_if->if_drv_flags & IFF_DRV_RUNNING) == 0) { m_freem(m); - BRIDGE_UNLOCK(sc); return (0); } - BRIDGE_UNLOCK(sc); bridge_enqueue(sc, dst_if, m); return (0); } @@ -2184,10 +2227,8 @@ bridge_transmit(struct ifnet *ifp, struct mbuf *m) eh = mtod(m, struct ether_header *); - BRIDGE_LOCK(sc); if (((m->m_flags & (M_BCAST|M_MCAST)) == 0) && (dst_if = bridge_rtlookup(sc, eh->ether_dhost, 1)) != NULL) { - BRIDGE_UNLOCK(sc); error = bridge_enqueue(sc, dst_if, m); } else bridge_broadcast(sc, ifp, m, 0); @@ -2221,6 +2262,8 @@ bridge_forward(struct bridge_softc *sc, struct bridge_ uint8_t *dst; int error; + MPASS(in_epoch(net_epoch_preempt)); + src_if = m->m_pkthdr.rcvif; ifp = sc->sc_ifp; @@ -2299,12 +2342,10 @@ bridge_forward(struct bridge_softc *sc, struct bridge_ || PFIL_HOOKED(&V_inet6_pfil_hook) #endif ) { - BRIDGE_UNLOCK(sc); if (bridge_pfil(&m, ifp, src_if, PFIL_IN) != 0) return; if (m == NULL) return; - BRIDGE_LOCK(sc); } if (dst_if == NULL) { @@ -2332,8 +2373,6 @@ bridge_forward(struct bridge_softc *sc, struct bridge_ dbif->bif_stp.bp_state == BSTP_IFSTATE_DISCARDING) goto drop; - BRIDGE_UNLOCK(sc); - if (PFIL_HOOKED(&V_inet_pfil_hook) #ifdef INET6 || PFIL_HOOKED(&V_inet6_pfil_hook) @@ -2349,7 +2388,6 @@ bridge_forward(struct bridge_softc *sc, struct bridge_ return; drop: - BRIDGE_UNLOCK(sc); m_freem(m); } @@ -2370,6 +2408,8 @@ bridge_input(struct ifnet *ifp, struct mbuf *m) uint16_t vlan; int error; + MPASS(in_epoch(net_epoch_preempt)); + if ((sc->sc_ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) return (m); @@ -2390,10 +2430,8 @@ bridge_input(struct ifnet *ifp, struct mbuf *m) m_freem(m); return (NULL); } - BRIDGE_LOCK(sc); bif = bridge_lookup_member_if(sc, ifp); if (bif == NULL) { - BRIDGE_UNLOCK(sc); return (m); } @@ -2406,13 +2444,11 @@ bridge_input(struct ifnet *ifp, struct mbuf *m) if (memcmp(eh->ether_dhost, bstp_etheraddr, ETHER_ADDR_LEN) == 0) { bstp_input(&bif->bif_stp, ifp, m); /* consumes mbuf */ - BRIDGE_UNLOCK(sc); return (NULL); } if ((bif->bif_flags & IFBIF_STP) && bif->bif_stp.bp_state == BSTP_IFSTATE_DISCARDING) { - BRIDGE_UNLOCK(sc); return (m); } @@ -2423,7 +2459,6 @@ bridge_input(struct ifnet *ifp, struct mbuf *m) */ mc = m_dup(m, M_NOWAIT); if (mc == NULL) { - BRIDGE_UNLOCK(sc); return (m); } @@ -2455,7 +2490,6 @@ bridge_input(struct ifnet *ifp, struct mbuf *m) if ((bif->bif_flags & IFBIF_STP) && bif->bif_stp.bp_state == BSTP_IFSTATE_DISCARDING) { - BRIDGE_UNLOCK(sc); return (m); } @@ -2495,7 +2529,6 @@ bridge_input(struct ifnet *ifp, struct mbuf *m) OR_PFIL_HOOKED_INET6)) { \ if (bridge_pfil(&m, NULL, ifp, \ PFIL_IN) != 0 || m == NULL) { \ - BRIDGE_UNLOCK(sc); \ return (NULL); \ } \ eh = mtod(m, struct ether_header *); \ @@ -2505,13 +2538,11 @@ bridge_input(struct ifnet *ifp, struct mbuf *m) error = bridge_rtupdate(sc, eh->ether_shost, \ vlan, bif, 0, IFBAF_DYNAMIC); \ if (error && bif->bif_addrmax) { \ - BRIDGE_UNLOCK(sc); \ m_freem(m); \ return (NULL); \ } \ } \ m->m_pkthdr.rcvif = iface; \ - BRIDGE_UNLOCK(sc); \ return (m); \ } \ \ @@ -2519,7 +2550,6 @@ bridge_input(struct ifnet *ifp, struct mbuf *m) if (memcmp(IF_LLADDR((iface)), eh->ether_shost, ETHER_ADDR_LEN) == 0 \ OR_CARP_CHECK_WE_ARE_SRC((iface)) \ ) { \ - BRIDGE_UNLOCK(sc); \ m_freem(m); \ return (NULL); \ } @@ -2570,16 +2600,12 @@ bridge_broadcast(struct bridge_softc *sc, struct ifnet struct bridge_iflist *dbif, *sbif; struct mbuf *mc; struct ifnet *dst_if; - int error = 0, used = 0, i; + int used = 0, i; + MPASS(in_epoch(net_epoch_preempt)); + sbif = bridge_lookup_member_if(sc, src_if); - BRIDGE_LOCK2REF(sc, error); - if (error) { - m_freem(m); - return; - } - /* Filter on the bridge interface before broadcasting */ if (runfilt && (PFIL_HOOKED(&V_inet_pfil_hook) #ifdef INET6 @@ -2587,9 +2613,9 @@ bridge_broadcast(struct bridge_softc *sc, struct ifnet #endif )) { if (bridge_pfil(&m, sc->sc_ifp, NULL, PFIL_OUT) != 0) - goto out; + return; if (m == NULL) - goto out; + return; } CK_LIST_FOREACH(dbif, &sc->sc_iflist, bif_next) { @@ -2652,9 +2678,6 @@ bridge_broadcast(struct bridge_softc *sc, struct ifnet } if (used == 0) m_freem(m); - -out: - BRIDGE_UNREF(sc); } /* @@ -2670,6 +2693,8 @@ bridge_span(struct bridge_softc *sc, struct mbuf *m) struct ifnet *dst_if; struct mbuf *mc; + MPASS(in_epoch(net_epoch_preempt)); + if (CK_LIST_EMPTY(&sc->sc_spanlist)) return; @@ -2701,7 +2726,8 @@ bridge_rtupdate(struct bridge_softc *sc, const uint8_t struct bridge_rtnode *brt; int error; - BRIDGE_LOCK_ASSERT(sc); + MPASS(in_epoch(net_epoch_preempt)); + BRIDGE_UNLOCK_ASSERT(sc); /* Check the source address is valid and not multicast. */ if (ETHER_IS_MULTICAST(dst) || @@ -2718,13 +2744,24 @@ bridge_rtupdate(struct bridge_softc *sc, const uint8_t * update it, otherwise create a new one. */ if ((brt = bridge_rtnode_lookup(sc, dst, vlan)) == NULL) { + BRIDGE_LOCK(sc); + + /* Check again, now that we have the lock. There could have + * been a race and we only want to insert this once. */ + if ((brt = bridge_rtnode_lookup(sc, dst, vlan)) != NULL) { + BRIDGE_UNLOCK(sc); + return (0); + } + if (sc->sc_brtcnt >= sc->sc_brtmax) { sc->sc_brtexceeded++; + BRIDGE_UNLOCK(sc); return (ENOSPC); } /* Check per interface address limits (if enabled) */ if (bif->bif_addrmax && bif->bif_addrcnt >= bif->bif_addrmax) { bif->bif_addrexceeded++; + BRIDGE_UNLOCK(sc); return (ENOSPC); } @@ -2734,8 +2771,11 @@ bridge_rtupdate(struct bridge_softc *sc, const uint8_t * address. */ brt = uma_zalloc(V_bridge_rtnode_zone, M_NOWAIT | M_ZERO); - if (brt == NULL) + if (brt == NULL) { + BRIDGE_UNLOCK(sc); return (ENOMEM); + } + brt->brt_vnet = curvnet; if (bif->bif_flags & IFBIF_STICKY) brt->brt_flags = IFBAF_STICKY; @@ -2747,17 +2787,22 @@ bridge_rtupdate(struct bridge_softc *sc, const uint8_t if ((error = bridge_rtnode_insert(sc, brt)) != 0) { uma_zfree(V_bridge_rtnode_zone, brt); + BRIDGE_UNLOCK(sc); return (error); } brt->brt_dst = bif; bif->bif_addrcnt++; + + BRIDGE_UNLOCK(sc); } if ((brt->brt_flags & IFBAF_TYPEMASK) == IFBAF_DYNAMIC && brt->brt_dst != bif) { + BRIDGE_LOCK(sc); brt->brt_dst->bif_addrcnt--; brt->brt_dst = bif; brt->brt_dst->bif_addrcnt++; + BRIDGE_UNLOCK(sc); } if ((flags & IFBAF_TYPEMASK) == IFBAF_DYNAMIC) @@ -2778,7 +2823,7 @@ bridge_rtlookup(struct bridge_softc *sc, const uint8_t { struct bridge_rtnode *brt; - BRIDGE_LOCK_ASSERT(sc); + MPASS(in_epoch(net_epoch_preempt)); if ((brt = bridge_rtnode_lookup(sc, addr, vlan)) == NULL) return (NULL); @@ -3017,7 +3062,7 @@ bridge_rtnode_lookup(struct bridge_softc *sc, const ui uint32_t hash; int dir; - BRIDGE_LOCK_ASSERT(sc); + MPASS(in_epoch(net_epoch_preempt)); hash = bridge_rthash(sc, addr); CK_LIST_FOREACH(brt, &sc->sc_rthash[hash], brt_hash) { @@ -3080,6 +3125,18 @@ out: return (0); } +static void +bridge_rtnode_destroy_cb(struct epoch_context *ctx) +{ + struct bridge_rtnode *brt; + + brt = __containerof(ctx, struct bridge_rtnode, brt_epoch_ctx); + + CURVNET_SET(brt->brt_vnet); + uma_zfree(V_bridge_rtnode_zone, brt); + CURVNET_RESTORE(); +} + /* * bridge_rtnode_destroy: * @@ -3095,7 +3152,9 @@ bridge_rtnode_destroy(struct bridge_softc *sc, struct CK_LIST_REMOVE(brt, brt_list); sc->sc_brtcnt--; brt->brt_dst->bif_addrcnt--; - uma_zfree(V_bridge_rtnode_zone, brt); + + epoch_call(net_epoch_preempt, &brt->brt_epoch_ctx, + bridge_rtnode_destroy_cb); } /* @@ -3640,17 +3699,20 @@ bridge_linkstate(struct ifnet *ifp) { struct bridge_softc *sc = ifp->if_bridge; struct bridge_iflist *bif; + struct epoch_tracker et; - BRIDGE_LOCK(sc); + NET_EPOCH_ENTER_ET(et); + bif = bridge_lookup_member_if(sc, ifp); if (bif == NULL) { - BRIDGE_UNLOCK(sc); + NET_EPOCH_EXIT_ET(et); return; } bridge_linkcheck(sc); - BRIDGE_UNLOCK(sc); bstp_linkstate(&bif->bif_stp); + + NET_EPOCH_EXIT_ET(et); } static void @@ -3659,7 +3721,8 @@ bridge_linkcheck(struct bridge_softc *sc) struct bridge_iflist *bif; int new_link, hasls; - BRIDGE_LOCK_ASSERT(sc); + MPASS(in_epoch(net_epoch_preempt)); + new_link = LINK_STATE_DOWN; hasls = 0; /* Our link is considered up if at least one of our ports is active */ From owner-svn-src-stable@freebsd.org Fri Jun 26 16:16:27 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4B98435B5EB; Fri, 26 Jun 2020 16:16:27 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49thpM1JmHz4pCY; Fri, 26 Jun 2020 16:16:27 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 27FB916C18; Fri, 26 Jun 2020 16:16:27 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05QGGRZI050182; Fri, 26 Jun 2020 16:16:27 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05QGGQUt050177; Fri, 26 Jun 2020 16:16:26 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202006261616.05QGGQUt050177@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 26 Jun 2020 16:16:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362653 - in stable/12/sys: compat/linuxkpi/common/src vm X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in stable/12/sys: compat/linuxkpi/common/src vm X-SVN-Commit-Revision: 362653 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jun 2020 16:16:27 -0000 Author: markj Date: Fri Jun 26 16:16:25 2020 New Revision: 362653 URL: https://svnweb.freebsd.org/changeset/base/362653 Log: MFC r362361, r362363: Add a helper function for validating VA ranges. Modified: stable/12/sys/compat/linuxkpi/common/src/linux_page.c stable/12/sys/vm/vm_fault.c stable/12/sys/vm/vm_map.c stable/12/sys/vm/vm_map.h stable/12/sys/vm/vm_mmap.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linuxkpi/common/src/linux_page.c ============================================================================== --- stable/12/sys/compat/linuxkpi/common/src/linux_page.c Fri Jun 26 15:14:03 2020 (r362652) +++ stable/12/sys/compat/linuxkpi/common/src/linux_page.c Fri Jun 26 16:16:25 2020 (r362653) @@ -235,7 +235,7 @@ __get_user_pages_fast(unsigned long start, int nr_page va = start; map = &curthread->td_proc->p_vmspace->vm_map; end = start + (((size_t)nr_pages) << PAGE_SHIFT); - if (start < vm_map_min(map) || end > vm_map_max(map)) + if (!vm_map_range_valid(map, start, end)) return (-EINVAL); prot = write ? (VM_PROT_READ | VM_PROT_WRITE) : VM_PROT_READ; for (count = 0, mp = pages, va = start; va < end; Modified: stable/12/sys/vm/vm_fault.c ============================================================================== --- stable/12/sys/vm/vm_fault.c Fri Jun 26 15:14:03 2020 (r362652) +++ stable/12/sys/vm/vm_fault.c Fri Jun 26 16:16:25 2020 (r362653) @@ -1643,10 +1643,7 @@ vm_fault_quick_hold_pages(vm_map_t map, vm_offset_t ad end = round_page(addr + len); addr = trunc_page(addr); - /* - * Check for illegal addresses. - */ - if (addr < vm_map_min(map) || addr > end || end > vm_map_max(map)) + if (!vm_map_range_valid(map, addr, end)) return (-1); if (atop(end - addr) > max_count) Modified: stable/12/sys/vm/vm_map.c ============================================================================== --- stable/12/sys/vm/vm_map.c Fri Jun 26 15:14:03 2020 (r362652) +++ stable/12/sys/vm/vm_map.c Fri Jun 26 16:16:25 2020 (r362653) @@ -1450,8 +1450,7 @@ vm_map_insert(vm_map_t map, vm_object_t object, vm_oof /* * Check that the start and end points are not bogus. */ - if (start < vm_map_min(map) || end > vm_map_max(map) || - start >= end) + if (start == end || !vm_map_range_valid(map, start, end)) return (KERN_INVALID_ADDRESS); /* @@ -1986,9 +1985,7 @@ again: goto done; } } else if ((cow & MAP_REMAP) != 0) { - if (*addr < vm_map_min(map) || - *addr + length > vm_map_max(map) || - *addr + length <= length) { + if (!vm_map_range_valid(map, *addr, *addr + length)) { rv = KERN_INVALID_ADDRESS; goto done; } @@ -4163,9 +4160,8 @@ vm_map_stack_locked(vm_map_t map, vm_offset_t addrbos, KASSERT(orient != (MAP_STACK_GROWS_DOWN | MAP_STACK_GROWS_UP), ("bi-dir stack")); - if (addrbos < vm_map_min(map) || - addrbos + max_ssize > vm_map_max(map) || - addrbos + max_ssize <= addrbos) + if (max_ssize == 0 || + !vm_map_range_valid(map, addrbos, addrbos + max_ssize)) return (KERN_INVALID_ADDRESS); sgp = ((curproc->p_flag2 & P2_STKGAP_DISABLE) != 0 || (curproc->p_fctl0 & NT_FREEBSD_FCTL_STKGAP_DISABLE) != 0) ? 0 : Modified: stable/12/sys/vm/vm_map.h ============================================================================== --- stable/12/sys/vm/vm_map.h Fri Jun 26 15:14:03 2020 (r362652) +++ stable/12/sys/vm/vm_map.h Fri Jun 26 16:16:25 2020 (r362653) @@ -250,6 +250,17 @@ vm_map_modflags(vm_map_t map, vm_flags_t set, vm_flags { map->flags = (map->flags | set) & ~clear; } + +static inline bool +vm_map_range_valid(vm_map_t map, vm_offset_t start, vm_offset_t end) +{ + if (end < start) + return (false); + if (start < vm_map_min(map) || end > vm_map_max(map)) + return (false); + return (true); +} + #endif /* KLD_MODULE */ #endif /* _KERNEL */ Modified: stable/12/sys/vm/vm_mmap.c ============================================================================== --- stable/12/sys/vm/vm_mmap.c Fri Jun 26 15:14:03 2020 (r362652) +++ stable/12/sys/vm/vm_mmap.c Fri Jun 26 16:16:25 2020 (r362653) @@ -298,11 +298,8 @@ kern_mmap_fpcheck(struct thread *td, uintptr_t addr0, return (EINVAL); /* Address range must be all in user VM space. */ - if (addr < vm_map_min(&vms->vm_map) || - addr + size > vm_map_max(&vms->vm_map)) + if (!vm_map_range_valid(&vms->vm_map, addr, addr + size)) return (EINVAL); - if (addr + size < addr) - return (EINVAL); #ifdef MAP_32BIT if (flags & MAP_32BIT && addr + size > MAP_32BIT_MAX_ADDR) return (EINVAL); @@ -534,7 +531,7 @@ kern_munmap(struct thread *td, uintptr_t addr0, size_t vm_map_entry_t entry; bool pmc_handled; #endif - vm_offset_t addr; + vm_offset_t addr, end; vm_size_t pageoff; vm_map_t map; @@ -546,15 +543,11 @@ kern_munmap(struct thread *td, uintptr_t addr0, size_t addr -= pageoff; size += pageoff; size = (vm_size_t) round_page(size); - if (addr + size < addr) - return (EINVAL); - - /* - * Check for illegal addresses. Watch out for address wrap... - */ + end = addr + size; map = &td->td_proc->p_vmspace->vm_map; - if (addr < vm_map_min(map) || addr + size > vm_map_max(map)) + if (!vm_map_range_valid(map, addr, end)) return (EINVAL); + vm_map_lock(map); #ifdef HWPMC_HOOKS pmc_handled = false; @@ -566,7 +559,7 @@ kern_munmap(struct thread *td, uintptr_t addr0, size_t */ pkm.pm_address = (uintptr_t) NULL; if (vm_map_lookup_entry(map, addr, &entry)) { - for (; entry->start < addr + size; + for (; entry->start < end; entry = entry->next) { if (vm_map_check_protection(map, entry->start, entry->end, VM_PROT_EXECUTE) == TRUE) { @@ -578,7 +571,7 @@ kern_munmap(struct thread *td, uintptr_t addr0, size_t } } #endif - vm_map_delete(map, addr, addr + size); + vm_map_delete(map, addr, end); #ifdef HWPMC_HOOKS if (__predict_false(pmc_handled)) { @@ -715,9 +708,7 @@ kern_madvise(struct thread *td, uintptr_t addr0, size_ */ map = &td->td_proc->p_vmspace->vm_map; addr = addr0; - if (addr < vm_map_min(map) || addr + len > vm_map_max(map)) - return (EINVAL); - if ((addr + len) < addr) + if (!vm_map_range_valid(map, addr, addr + len)) return (EINVAL); /* From owner-svn-src-stable@freebsd.org Fri Jun 26 17:35:09 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F115535CA40; Fri, 26 Jun 2020 17:35:09 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49tkY967YFz4tl0; Fri, 26 Jun 2020 17:35:09 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CDCAB17942; Fri, 26 Jun 2020 17:35:09 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05QHZ9S8000432; Fri, 26 Jun 2020 17:35:09 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05QHZ9Bo000431; Fri, 26 Jun 2020 17:35:09 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <202006261735.05QHZ9Bo000431@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Fri, 26 Jun 2020 17:35:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362655 - stable/12/bin/sh/tests X-SVN-Group: stable-12 X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: stable/12/bin/sh/tests X-SVN-Commit-Revision: 362655 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jun 2020 17:35:10 -0000 Author: lwhsu Date: Fri Jun 26 17:35:09 2020 New Revision: 362655 URL: https://svnweb.freebsd.org/changeset/base/362655 Log: MFC r362646: Temporarily skip flakey bin.sh.execution.functional_test.bg12 in CI PR: 247559 Sponsored by: The FreeBSD Foundation Modified: stable/12/bin/sh/tests/functional_test.sh Directory Properties: stable/12/ (props changed) Modified: stable/12/bin/sh/tests/functional_test.sh ============================================================================== --- stable/12/bin/sh/tests/functional_test.sh Fri Jun 26 16:20:34 2020 (r362654) +++ stable/12/bin/sh/tests/functional_test.sh Fri Jun 26 17:35:09 2020 (r362655) @@ -27,6 +27,7 @@ # $FreeBSD$ SRCDIR=$(atf_get_srcdir) +CATEGORY=$(basename ${SRCDIR}) check() { @@ -60,7 +61,20 @@ add_testcase() esac atf_test_case ${tc_escaped} - eval "${tc_escaped}_body() { check ${tc}; }" + + if [ "$(atf_config_get ci false)" = "true" ]; then + case "${CATEGORY}/${tc}" in + execution/bg12.0) + eval "${tc_escaped}_body() { atf_skip 'https://bugs.freebsd.org/247559'; }" + ;; + *) + eval "${tc_escaped}_body() { check ${tc}; }" + ;; + esac + else + eval "${tc_escaped}_body() { check ${tc}; }" + fi + atf_add_test_case ${tc_escaped} } From owner-svn-src-stable@freebsd.org Fri Jun 26 18:01:36 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 27F2635CEF4; Fri, 26 Jun 2020 18:01:36 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49tl7h03bzz3S9V; Fri, 26 Jun 2020 18:01:36 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F15E217F9F; Fri, 26 Jun 2020 18:01:35 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05QI1Z6i018142; Fri, 26 Jun 2020 18:01:35 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05QI1ZpB018141; Fri, 26 Jun 2020 18:01:35 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <202006261801.05QI1ZpB018141@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Fri, 26 Jun 2020 18:01:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362657 - stable/12/contrib/netbsd-tests/kernel X-SVN-Group: stable-12 X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: stable/12/contrib/netbsd-tests/kernel X-SVN-Commit-Revision: 362657 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jun 2020 18:01:36 -0000 Author: lwhsu Date: Fri Jun 26 18:01:35 2020 New Revision: 362657 URL: https://svnweb.freebsd.org/changeset/base/362657 Log: MFC r362656: Temporarily skip flakey sys.kern.sysv_test.msg in CI PR: 233649 Modified: stable/12/contrib/netbsd-tests/kernel/t_sysv.c Directory Properties: stable/12/ (props changed) Modified: stable/12/contrib/netbsd-tests/kernel/t_sysv.c ============================================================================== --- stable/12/contrib/netbsd-tests/kernel/t_sysv.c Fri Jun 26 17:58:10 2020 (r362656) +++ stable/12/contrib/netbsd-tests/kernel/t_sysv.c Fri Jun 26 18:01:35 2020 (r362657) @@ -210,6 +210,9 @@ ATF_TC_BODY(msg, tc) int loop; int c_status; + if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) + atf_tc_skip("https://bugs.freebsd.org/233649"); + /* * Install a SIGSYS handler so that we can exit gracefully if * System V Message Queue support isn't in the kernel. From owner-svn-src-stable@freebsd.org Fri Jun 26 18:01:58 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8346735D3AE; Fri, 26 Jun 2020 18:01:58 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49tl862zjHz3SXl; Fri, 26 Jun 2020 18:01:58 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 619AF18014; Fri, 26 Jun 2020 18:01:58 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05QI1wh5018215; Fri, 26 Jun 2020 18:01:58 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05QI1wqg018214; Fri, 26 Jun 2020 18:01:58 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <202006261801.05QI1wqg018214@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Fri, 26 Jun 2020 18:01:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r362658 - stable/11/contrib/netbsd-tests/kernel X-SVN-Group: stable-11 X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: stable/11/contrib/netbsd-tests/kernel X-SVN-Commit-Revision: 362658 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jun 2020 18:01:58 -0000 Author: lwhsu Date: Fri Jun 26 18:01:57 2020 New Revision: 362658 URL: https://svnweb.freebsd.org/changeset/base/362658 Log: MFC r362656: Temporarily skip flakey sys.kern.sysv_test.msg in CI PR: 233649 Modified: stable/11/contrib/netbsd-tests/kernel/t_sysv.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/netbsd-tests/kernel/t_sysv.c ============================================================================== --- stable/11/contrib/netbsd-tests/kernel/t_sysv.c Fri Jun 26 18:01:35 2020 (r362657) +++ stable/11/contrib/netbsd-tests/kernel/t_sysv.c Fri Jun 26 18:01:57 2020 (r362658) @@ -212,6 +212,9 @@ ATF_TC_BODY(msg, tc) int loop; int c_status; + if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) + atf_tc_skip("https://bugs.freebsd.org/233649"); + /* * Install a SIGSYS handler so that we can exit gracefully if * System V Message Queue support isn't in the kernel. From owner-svn-src-stable@freebsd.org Fri Jun 26 18:57:01 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CA07135DF80; Fri, 26 Jun 2020 18:57:01 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49tmMd51Hmz3VRQ; Fri, 26 Jun 2020 18:57:01 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A732E183F0; Fri, 26 Jun 2020 18:57:01 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05QIv1VR050028; Fri, 26 Jun 2020 18:57:01 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05QIv1SK050027; Fri, 26 Jun 2020 18:57:01 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202006261857.05QIv1SK050027@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Fri, 26 Jun 2020 18:57:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362659 - stable/12/contrib/tzcode/stdtime X-SVN-Group: stable-12 X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: stable/12/contrib/tzcode/stdtime X-SVN-Commit-Revision: 362659 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jun 2020 18:57:01 -0000 Author: gbe (doc committer) Date: Fri Jun 26 18:57:01 2020 New Revision: 362659 URL: https://svnweb.freebsd.org/changeset/base/362659 Log: MFC r362165: Add a HISTORY section to ctime(3) Reviewed by: bcr (mentor) Approved by: bcr (mentor) Obtained from: OpenBSD Differential Revision: https://reviews.freebsd.org/D24635 Modified: stable/12/contrib/tzcode/stdtime/ctime.3 Directory Properties: stable/12/ (props changed) Modified: stable/12/contrib/tzcode/stdtime/ctime.3 ============================================================================== --- stable/12/contrib/tzcode/stdtime/ctime.3 Fri Jun 26 18:01:57 2020 (r362658) +++ stable/12/contrib/tzcode/stdtime/ctime.3 Fri Jun 26 18:57:01 2020 (r362659) @@ -335,6 +335,33 @@ the time package contributed to Berkeley by .An Arthur Olson and which appeared in .Bx 4.3 . +.Pp +The functions +.Fn asctime , +.Fn gmtime , +and +.Fn localtime +first appeared in +.At v5 , +.Fn difftime +and +.Fn mktime +in +.Bx 4.3 Reno , +and +.Fn timegm +and +.Fn timelocal +in SunOS 4.0. +.Pp +The functions +.Fn asctime_r , +.Fn ctime_r , +.Fn gmtime_r , +and +.Fn localtime_r +have been available since +.Fx 8.0 . .Sh BUGS Except for .Fn difftime , From owner-svn-src-stable@freebsd.org Fri Jun 26 20:44:15 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 803AA35F546; Fri, 26 Jun 2020 20:44:15 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49tplM2qWPz3bFq; Fri, 26 Jun 2020 20:44:15 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5C1D41A098; Fri, 26 Jun 2020 20:44:15 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05QKiF8I017654; Fri, 26 Jun 2020 20:44:15 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05QKiB4t017632; Fri, 26 Jun 2020 20:44:11 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202006262044.05QKiB4t017632@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Fri, 26 Jun 2020 20:44:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362662 - stable/12/lib/libutil X-SVN-Group: stable-12 X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: stable/12/lib/libutil X-SVN-Commit-Revision: 362662 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jun 2020 20:44:15 -0000 Author: gbe (doc committer) Date: Fri Jun 26 20:44:10 2020 New Revision: 362662 URL: https://svnweb.freebsd.org/changeset/base/362662 Log: MFC r362169: libutil: Document function HISTORY within the manpages Reviewed by: bcr (mentor) Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D24795 Modified: stable/12/lib/libutil/_secure_path.3 stable/12/lib/libutil/hexdump.3 stable/12/lib/libutil/kinfo_getallproc.3 stable/12/lib/libutil/kinfo_getfile.3 stable/12/lib/libutil/kinfo_getproc.3 stable/12/lib/libutil/kinfo_getvmmap.3 stable/12/lib/libutil/kinfo_getvmobject.3 stable/12/lib/libutil/login.conf.5 stable/12/lib/libutil/login_auth.3 stable/12/lib/libutil/login_cap.3 stable/12/lib/libutil/login_class.3 stable/12/lib/libutil/login_ok.3 stable/12/lib/libutil/login_times.3 stable/12/lib/libutil/login_tty.3 stable/12/lib/libutil/pidfile.3 stable/12/lib/libutil/pw_util.3 stable/12/lib/libutil/realhostname.3 stable/12/lib/libutil/trimdomain.3 stable/12/lib/libutil/uucplock.3 Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libutil/_secure_path.3 ============================================================================== --- stable/12/lib/libutil/_secure_path.3 Fri Jun 26 19:55:11 2020 (r362661) +++ stable/12/lib/libutil/_secure_path.3 Fri Jun 26 20:44:10 2020 (r362662) @@ -19,7 +19,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 2, 1997 +.Dd May 10, 2020 .Dt _SECURE_PATH 3 .Os .Sh NAME @@ -69,6 +69,10 @@ reason, at LOG_ERR priority. Code from which this function was derived was contributed to the .Fx project by Berkeley Software Design, Inc. +The function +.Fn _secure_path +first appeared in +.Fx 2.2.5 . .Sh BUGS The checks carried out are rudimentary and no attempt is made to eliminate race conditions between use of this function and Modified: stable/12/lib/libutil/hexdump.3 ============================================================================== --- stable/12/lib/libutil/hexdump.3 Fri Jun 26 19:55:11 2020 (r362661) +++ stable/12/lib/libutil/hexdump.3 Fri Jun 26 20:44:10 2020 (r362662) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 21, 2017 +.Dd May 8, 2020 .Dt HEXDUMP 3 .Os .Sh NAME @@ -83,6 +83,11 @@ Do not print the character values on each line. .Sh SEE ALSO .Xr ascii 7 , .Xr sbuf_hexdump 9 +.Sh HISTORY +The +.Fn hexdump +function first appeared in +.Fx 6.4 . .Sh AUTHORS This manual page was written by .An Scott Long . Modified: stable/12/lib/libutil/kinfo_getallproc.3 ============================================================================== --- stable/12/lib/libutil/kinfo_getallproc.3 Fri Jun 26 19:55:11 2020 (r362661) +++ stable/12/lib/libutil/kinfo_getallproc.3 Fri Jun 26 20:44:10 2020 (r362662) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 27, 2015 +.Dd May 8, 2020 .Dt KINFO_GETALLPROC 3 .Os .Sh NAME @@ -73,3 +73,8 @@ function returns .Xr free 3 , .Xr malloc 3 , .Xr sysctl 3 +.Sh HISTORY +The +.Fn kinfo_getallproc +function first appeared in +.Fx 8.3 . Modified: stable/12/lib/libutil/kinfo_getfile.3 ============================================================================== --- stable/12/lib/libutil/kinfo_getfile.3 Fri Jun 26 19:55:11 2020 (r362661) +++ stable/12/lib/libutil/kinfo_getfile.3 Fri Jun 26 20:44:10 2020 (r362662) @@ -78,3 +78,8 @@ function returns .Xr kinfo_getvmmap 3 , .Xr malloc 3 , .Xr sysctl 3 +.Sh HISTORY +The +.Fn kinfo_getfile +function first appeared in +.Fx 7.0 . Modified: stable/12/lib/libutil/kinfo_getproc.3 ============================================================================== --- stable/12/lib/libutil/kinfo_getproc.3 Fri Jun 26 19:55:11 2020 (r362661) +++ stable/12/lib/libutil/kinfo_getproc.3 Fri Jun 26 20:44:10 2020 (r362662) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 27, 2015 +.Dd May 10, 2020 .Dt KINFO_GETPROC 3 .Os .Sh NAME @@ -72,3 +72,8 @@ function returns .Xr free 3 , .Xr malloc 3 , .Xr sysctl 3 +.Sh HISTORY +The +.Fn kinfo_getproc +function first appeared in +.Fx 7.0 . Modified: stable/12/lib/libutil/kinfo_getvmmap.3 ============================================================================== --- stable/12/lib/libutil/kinfo_getvmmap.3 Fri Jun 26 19:55:11 2020 (r362661) +++ stable/12/lib/libutil/kinfo_getvmmap.3 Fri Jun 26 20:44:10 2020 (r362662) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 18, 2017 +.Dd May 10, 2020 .Dt KINFO_GETVMMAP 3 .Os .Sh NAME @@ -84,3 +84,8 @@ function returns .Xr free 3 , .Xr kinfo_getfile 3 , .Xr malloc 3 +.Sh HISTORY +The +.Fn kinfo_getvmmap +function first appeared in +.Fx 7.0 . Modified: stable/12/lib/libutil/kinfo_getvmobject.3 ============================================================================== --- stable/12/lib/libutil/kinfo_getvmobject.3 Fri Jun 26 19:55:11 2020 (r362661) +++ stable/12/lib/libutil/kinfo_getvmobject.3 Fri Jun 26 20:44:10 2020 (r362662) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 27, 2015 +.Dd May 20, 2020 .Dt KINFO_GETVMOBJECT 3 .Os .Sh NAME @@ -72,3 +72,8 @@ function returns .Xr free 3 , .Xr kinfo_getvmmap 3 , .Xr malloc 3 +.Sh HISTORY +The +.Fn kinfo_getvmobject +function first appeared in +.Fx 10.2 . Modified: stable/12/lib/libutil/login.conf.5 ============================================================================== --- stable/12/lib/libutil/login.conf.5 Fri Jun 26 19:55:11 2020 (r362661) +++ stable/12/lib/libutil/login.conf.5 Fri Jun 26 20:44:10 2020 (r362662) @@ -19,7 +19,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 19, 2020 +.Dd May 10, 2020 .Dt LOGIN.CONF 5 .Os .Sh NAME @@ -471,3 +471,8 @@ lists. .Xr ttys 5 , .Xr ftpd 8 , .Xr pam_passwdqc 8 +.Sh HISTORY +The file +.Nm +first appeared in +.Fx 2.1.5 . Modified: stable/12/lib/libutil/login_auth.3 ============================================================================== --- stable/12/lib/libutil/login_auth.3 Fri Jun 26 19:55:11 2020 (r362661) +++ stable/12/lib/libutil/login_auth.3 Fri Jun 26 20:44:10 2020 (r362662) @@ -19,7 +19,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 29, 1996 +.Dd May 10, 2020 .Dt LOGIN_AUTH 3 .Os .Sh NAME @@ -70,3 +70,10 @@ by .Xr login_class 3 , .Xr login.conf 5 , .Xr termcap 5 +.Sh HISTORY +The functions +.Fn auth_checknologin +and +.Fn auth_cat +first appeared in +.Fx 2.1.5 . Modified: stable/12/lib/libutil/login_cap.3 ============================================================================== --- stable/12/lib/libutil/login_cap.3 Fri Jun 26 19:55:11 2020 (r362661) +++ stable/12/lib/libutil/login_cap.3 Fri Jun 26 20:44:10 2020 (r362662) @@ -19,7 +19,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 14, 2007 +.Dd May 10, 2020 .Dt LOGIN_CAP 3 .Os .Sh NAME @@ -577,3 +577,21 @@ is returned to indicate this. .Xr login_class 3 , .Xr login.conf 5 , .Xr termcap 5 +.Sh HISTORY +The functions +.Fn login_close , +.Fn login_getcapbool , +.Fn login_getcaplist , +.Fn login_getcapnum , +.Fn login_getcapstr , +.Fn login_getcapsize , +.Fn login_getcaptime , +.Fn login_getclass , +.Fn login_getclassbyname , +.Fn login_getpwclass , +.Fn login_getstyle , +.Fn login_getuserclass +and +.Fn login_setcryptfmt +first appeared in +.Fx 2.1.5 . Modified: stable/12/lib/libutil/login_class.3 ============================================================================== --- stable/12/lib/libutil/login_class.3 Fri Jun 26 19:55:11 2020 (r362661) +++ stable/12/lib/libutil/login_class.3 Fri Jun 26 20:44:10 2020 (r362662) @@ -19,7 +19,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 24, 2011 +.Dd May 10, 2020 .Dt LOGIN_CLASS 3 .Os .Sh NAME @@ -221,3 +221,13 @@ with LOG_ERR priority and directed to the currently ac .Xr mac_set_proc 3 , .Xr login.conf 5 , .Xr termcap 5 +.Sh HISTORY +The functions +.Fn setclasscontext , +.Fn setclasscpumask , +.Fn setclassenvironment , +.Fn setclassresources +and +.Fn setusercontext +first appeared in +.Fx 2.1.5 . Modified: stable/12/lib/libutil/login_ok.3 ============================================================================== --- stable/12/lib/libutil/login_ok.3 Fri Jun 26 19:55:11 2020 (r362661) +++ stable/12/lib/libutil/login_ok.3 Fri Jun 26 20:44:10 2020 (r362662) @@ -19,7 +19,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 2, 1997 +.Dd May 10, 2020 .Dt LOGIN_OK 3 .Os .Sh NAME @@ -140,3 +140,11 @@ access list. .Xr login_times 3 , .Xr login.conf 5 , .Xr termcap 5 +.Sh HISTORY +The functions +.Fn auth_ttyok , +.Fn auth_hostok + and +.Fn auth_timeok +functions first appeared in +.Fx 2.1.5 . Modified: stable/12/lib/libutil/login_times.3 ============================================================================== --- stable/12/lib/libutil/login_times.3 Fri Jun 26 19:55:11 2020 (r362661) +++ stable/12/lib/libutil/login_times.3 Fri Jun 26 20:44:10 2020 (r362662) @@ -19,7 +19,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 20, 2008 +.Dd May 10, 2020 .Dt LOGIN_TIMES 3 .Os .Sh NAME @@ -177,3 +177,13 @@ time falls, or -1 if none of them apply. .Xr login_class 3 , .Xr login.conf 5 , .Xr termcap 5 +.Sh HISTORY +The functions +.Fn parse_lt , +.Fn in_lt , +.Fn in_ltm , +.Fn in_ltms +and +.Fn in_lts +first appeared in +.Fx 2.1.5 . Modified: stable/12/lib/libutil/login_tty.3 ============================================================================== --- stable/12/lib/libutil/login_tty.3 Fri Jun 26 19:55:11 2020 (r362661) +++ stable/12/lib/libutil/login_tty.3 Fri Jun 26 20:44:10 2020 (r362662) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" " -.Dd December 29, 1996 +.Dd May 10, 2020 .Dt LOGIN_TTY 3 .Os .Sh NAME @@ -63,3 +63,9 @@ the controlling terminal of the calling process, and 0 .Xr ioctl 2 , .Xr setsid 2 , .Xr tty 4 +.Sh HISTORY +The function +.Fn login_tty +first appeared in +.Bx 4.4 . + Modified: stable/12/lib/libutil/pidfile.3 ============================================================================== --- stable/12/lib/libutil/pidfile.3 Fri Jun 26 19:55:11 2020 (r362661) +++ stable/12/lib/libutil/pidfile.3 Fri Jun 26 20:44:10 2020 (r362662) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 8, 2012 +.Dd May 10, 2020 .Dt PIDFILE 3 .Os .Sh NAME @@ -286,6 +286,15 @@ Probably called not from the process which used .Xr open 2 , .Xr daemon 3 , .Xr flopen 3 +.Sh HISTORY +The functions +.Fn pidfile_open , +.Fn pidfile_write , +.Fn pidfile_close +and +.Fn pidfile_remove +first appeared in +.Fx 5.5 . .Sh AUTHORS .An -nosplit The Modified: stable/12/lib/libutil/pw_util.3 ============================================================================== --- stable/12/lib/libutil/pw_util.3 Fri Jun 26 19:55:11 2020 (r362661) +++ stable/12/lib/libutil/pw_util.3 Fri Jun 26 20:44:10 2020 (r362662) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 26, 2018 +.Dd May 10, 2020 .Dt PW_UTIL 3 .Os .Sh NAME @@ -288,6 +288,9 @@ The .Fn pw_tmp returns an open file descriptor to the temporary password file or -1 in case of failure. +.Sh HISTORY +The functions for passwd file handling first appeared in +.Bx 4.4 . .Sh AUTHORS Portions of this software were developed for the .Fx Modified: stable/12/lib/libutil/realhostname.3 ============================================================================== --- stable/12/lib/libutil/realhostname.3 Fri Jun 26 19:55:11 2020 (r362661) +++ stable/12/lib/libutil/realhostname.3 Fri Jun 26 20:44:10 2020 (r362662) @@ -100,3 +100,8 @@ now contains the numeric value of .Xr gethostbyname 3 , .Xr inet_ntoa 3 , .Xr realhostname_sa 3 +.Sh HISTORY +The +.Fn realhostname +function first appeared in +.Fx 3.2 . Modified: stable/12/lib/libutil/trimdomain.3 ============================================================================== --- stable/12/lib/libutil/trimdomain.3 Fri Jun 26 19:55:11 2020 (r362661) +++ stable/12/lib/libutil/trimdomain.3 Fri Jun 26 20:44:10 2020 (r362662) @@ -83,3 +83,8 @@ The function does not return a value. .Sh SEE ALSO .Xr gethostname 3 +.Sh HISTORY +The function +.Fn trimdomain +first appeared in +.Fx 3.2 . Modified: stable/12/lib/libutil/uucplock.3 ============================================================================== --- stable/12/lib/libutil/uucplock.3 Fri Jun 26 19:55:11 2020 (r362661) +++ stable/12/lib/libutil/uucplock.3 Fri Jun 26 20:44:10 2020 (r362662) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" " -.Dd March 30, 1997 +.Dd May 10, 2020 .Dt UUCPLOCK 3 .Os .Sh NAME @@ -170,6 +170,14 @@ for further details. .Xr open 2 , .Xr read 2 , .Xr write 2 +.Sh HISTORY +The functions +.Fn uu_lock , +.Fn uu_unlock +and +.Fn uu_lockerr +first appeared in +.Fx 2.0.5 . .Sh BUGS It is possible that a stale lock is not recognised as such if a new processes is assigned the same processes id as the program that left From owner-svn-src-stable@freebsd.org Sat Jun 27 09:01:31 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BF6753495CA; Sat, 27 Jun 2020 09:01:31 +0000 (UTC) (envelope-from pstef@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49v7634l4zz4Ybk; Sat, 27 Jun 2020 09:01:31 +0000 (UTC) (envelope-from pstef@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9DFD522BC1; Sat, 27 Jun 2020 09:01:31 +0000 (UTC) (envelope-from pstef@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05R91VuJ071447; Sat, 27 Jun 2020 09:01:31 GMT (envelope-from pstef@FreeBSD.org) Received: (from pstef@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05R91VGL071445; Sat, 27 Jun 2020 09:01:31 GMT (envelope-from pstef@FreeBSD.org) Message-Id: <202006270901.05R91VGL071445@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pstef set sender to pstef@FreeBSD.org using -f From: Piotr Pawel Stefaniak Date: Sat, 27 Jun 2020 09:01:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362673 - stable/12/lib/libutil X-SVN-Group: stable-12 X-SVN-Commit-Author: pstef X-SVN-Commit-Paths: stable/12/lib/libutil X-SVN-Commit-Revision: 362673 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2020 09:01:31 -0000 Author: pstef Date: Sat Jun 27 09:01:30 2020 New Revision: 362673 URL: https://svnweb.freebsd.org/changeset/base/362673 Log: MFC r362429 and r362430: libutil: remove extraneous ": " from error messages Make vipw error message less cryptic Modified: stable/12/lib/libutil/gr_util.c stable/12/lib/libutil/pw_util.c Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libutil/gr_util.c ============================================================================== --- stable/12/lib/libutil/gr_util.c Sat Jun 27 07:34:15 2020 (r362672) +++ stable/12/lib/libutil/gr_util.c Sat Jun 27 09:01:30 2020 (r362673) @@ -108,11 +108,11 @@ gr_lock(void) if (errno == EWOULDBLOCK) { errx(1, "the group file is busy"); } else { - err(1, "could not lock the group file: "); + err(1, "could not lock the group file"); } } if (fstat(lockfd, &st) == -1) - err(1, "fstat() failed: "); + err(1, "fstat() failed"); if (st.st_nlink != 0) break; close(lockfd); Modified: stable/12/lib/libutil/pw_util.c ============================================================================== --- stable/12/lib/libutil/pw_util.c Sat Jun 27 07:34:15 2020 (r362672) +++ stable/12/lib/libutil/pw_util.c Sat Jun 27 09:01:30 2020 (r362673) @@ -181,7 +181,7 @@ pw_lock(void) if (errno == EWOULDBLOCK) { errx(1, "the password db file is busy"); } else { - err(1, "could not lock the passwd file: "); + err(1, "could not lock the passwd file"); } } @@ -191,7 +191,7 @@ pw_lock(void) * close and retry. */ if (fstat(lockfd, &st) == -1) - err(1, "fstat() failed: "); + err(1, "fstat() failed"); if (st.st_nlink != 0) break; close(lockfd); @@ -308,12 +308,13 @@ pw_edit(int notsetuid) sigaction(SIGQUIT, &sa_quit, NULL); sigprocmask(SIG_SETMASK, &oldsigset, NULL); if (notsetuid) { - (void)setgid(getgid()); - (void)setuid(getuid()); + if (setgid(getgid()) == -1) + err(1, "setgid"); + if (setuid(getuid()) == -1) + err(1, "setuid"); } - errno = 0; execlp(editor, editor, tempname, (char *)NULL); - _exit(errno); + err(1, "%s", editor); default: /* parent */ break; @@ -327,7 +328,9 @@ pw_edit(int notsetuid) break; } else if (WIFSTOPPED(pstat)) { raise(WSTOPSIG(pstat)); - } else if (WIFEXITED(pstat) && WEXITSTATUS(pstat) == 0) { + } else if (WIFEXITED(pstat)) { + if (WEXITSTATUS(pstat) != 0) + errx(1, "\"%s\" exited with status %d", editor, WEXITSTATUS(pstat)); editpid = -1; break; } else { From owner-svn-src-stable@freebsd.org Sat Jun 27 10:57:31 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A1D5E34BE3C; Sat, 27 Jun 2020 10:57:31 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49v9gv3qlmz3Rp6; Sat, 27 Jun 2020 10:57:31 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 64EC823DE8; Sat, 27 Jun 2020 10:57:31 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05RAvV6a043791; Sat, 27 Jun 2020 10:57:31 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05RAvVwU043790; Sat, 27 Jun 2020 10:57:31 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202006271057.05RAvVwU043790@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 27 Jun 2020 10:57:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r362674 - stable/11/tools/build/mk X-SVN-Group: stable-11 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: stable/11/tools/build/mk X-SVN-Commit-Revision: 362674 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2020 10:57:31 -0000 Author: dim Date: Sat Jun 27 10:57:30 2020 New Revision: 362674 URL: https://svnweb.freebsd.org/changeset/base/362674 Log: MFC r348677 (by emaste): move llvm-ar and llvm-nm to appropriate location in OptionalObsoleteFiles.inc After r348610 `make delete-old` was still removing llvm-ar and llvm-nm (and associated man pages). Reported by: jhb Sponsored by: The FreeBSD Foundation MFC r348761 (by jkim): Move llvm-ranlib to appropriate location in OptionalObsoleteFiles.inc. Note llvm-ar is linked to llvm-ranlib since r311565. r348677 fixed "make delete-old" issue with llvm-ar but missed it somehow. Discussed with: emaste, jhb Modified: stable/11/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/11/ (props changed) Modified: stable/11/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/11/tools/build/mk/OptionalObsoleteFiles.inc Sat Jun 27 09:01:30 2020 (r362673) +++ stable/11/tools/build/mk/OptionalObsoleteFiles.inc Sat Jun 27 10:57:30 2020 (r362674) @@ -1334,7 +1334,10 @@ OLD_FILES+=usr/bin/clang OLD_FILES+=usr/bin/clang++ OLD_FILES+=usr/bin/clang-cpp OLD_FILES+=usr/bin/clang-tblgen +OLD_FILES+=usr/bin/llvm-ar +OLD_FILES+=usr/bin/llvm-nm OLD_FILES+=usr/bin/llvm-objdump +OLD_FILES+=usr/bin/llvm-ranlib OLD_FILES+=usr/bin/llvm-symbolizer OLD_FILES+=usr/bin/llvm-tblgen OLD_FILES+=usr/lib/clang/10.0.0/include/cuda_wrappers/algorithm @@ -1613,6 +1616,8 @@ OLD_DIRS+=usr/share/doc/llvm OLD_FILES+=usr/share/man/man1/clang.1.gz OLD_FILES+=usr/share/man/man1/clang++.1.gz OLD_FILES+=usr/share/man/man1/clang-cpp.1.gz +OLD_FILES+=usr/share/man/man1/llvm-ar.1.gz +OLD_FILES+=usr/share/man/man1/llvm-nm.1.gz OLD_FILES+=usr/share/man/man1/llvm-tblgen.1.gz .endif @@ -1621,7 +1626,6 @@ OLD_FILES+=usr/bin/bugpoint OLD_FILES+=usr/bin/clang-format OLD_FILES+=usr/bin/llc OLD_FILES+=usr/bin/lli -OLD_FILES+=usr/bin/llvm-ar OLD_FILES+=usr/bin/llvm-as OLD_FILES+=usr/bin/llvm-bcanalyzer OLD_FILES+=usr/bin/llvm-cxxdump @@ -1636,17 +1640,14 @@ OLD_FILES+=usr/bin/llvm-lto2 OLD_FILES+=usr/bin/llvm-mc OLD_FILES+=usr/bin/llvm-mca OLD_FILES+=usr/bin/llvm-modextract -OLD_FILES+=usr/bin/llvm-nm OLD_FILES+=usr/bin/llvm-objcopy OLD_FILES+=usr/bin/llvm-pdbutil -OLD_FILES+=usr/bin/llvm-ranlib OLD_FILES+=usr/bin/llvm-rtdyld OLD_FILES+=usr/bin/llvm-xray OLD_FILES+=usr/bin/opt OLD_FILES+=usr/share/man/man1/bugpoint.1.gz OLD_FILES+=usr/share/man/man1/llc.1.gz OLD_FILES+=usr/share/man/man1/lli.1.gz -OLD_FILES+=usr/share/man/man1/llvm-ar.1.gz OLD_FILES+=usr/share/man/man1/llvm-as.1.gz OLD_FILES+=usr/share/man/man1/llvm-bcanalyzer.1.gz OLD_FILES+=usr/share/man/man1/llvm-diff.1.gz @@ -1654,7 +1655,6 @@ OLD_FILES+=usr/share/man/man1/llvm-dis.1.gz OLD_FILES+=usr/share/man/man1/llvm-dwarfdump.1 OLD_FILES+=usr/share/man/man1/llvm-extract.1.gz OLD_FILES+=usr/share/man/man1/llvm-link.1.gz -OLD_FILES+=usr/share/man/man1/llvm-nm.1.gz OLD_FILES+=usr/share/man/man1/llvm-pdbutil.1.gz OLD_FILES+=usr/share/man/man1/llvm-symbolizer.1.gz OLD_FILES+=usr/share/man/man1/opt.1.gz From owner-svn-src-stable@freebsd.org Sat Jun 27 12:12:49 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 98DF834EE08; Sat, 27 Jun 2020 12:12:49 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49vCLn3Vgrz3XTT; Sat, 27 Jun 2020 12:12:49 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 734E725027; Sat, 27 Jun 2020 12:12:49 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05RCCnpq092833; Sat, 27 Jun 2020 12:12:49 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05RCCmuI092827; Sat, 27 Jun 2020 12:12:48 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202006271212.05RCCmuI092827@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Sat, 27 Jun 2020 12:12:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362682 - in stable/12/lib/libc: stdio string sys X-SVN-Group: stable-12 X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: in stable/12/lib/libc: stdio string sys X-SVN-Commit-Revision: 362682 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2020 12:12:49 -0000 Author: gbe (doc committer) Date: Sat Jun 27 12:12:47 2020 New Revision: 362682 URL: https://svnweb.freebsd.org/changeset/base/362682 Log: MFC r362171: libc manpages: various improvements from NetBSD - Add STANDARDS and HISTORY sections within the appropriate manpages - Mention two USENIX papers within kqueue(2) and strlcpy(3) Reviewed by: bcr (mentor) Approved by: bcr (mentor) Obtained from: NetBSD Differential Revision: https://reviews.freebsd.org/D24650 Modified: stable/12/lib/libc/stdio/fflush.3 stable/12/lib/libc/stdio/fopen.3 stable/12/lib/libc/stdio/setbuf.3 stable/12/lib/libc/string/strlcpy.3 stable/12/lib/libc/sys/getgid.2 stable/12/lib/libc/sys/getitimer.2 stable/12/lib/libc/sys/kqueue.2 Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libc/stdio/fflush.3 ============================================================================== --- stable/12/lib/libc/stdio/fflush.3 Sat Jun 27 12:02:01 2020 (r362681) +++ stable/12/lib/libc/stdio/fflush.3 Sat Jun 27 12:12:47 2020 (r362682) @@ -32,7 +32,7 @@ .\" @(#)fflush.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd January 23, 2020 +.Dd May 1, 2020 .Dt FFLUSH 3 .Os .Sh NAME @@ -125,3 +125,12 @@ The function conforms to .St -isoC . +.Sh HISTORY +The +.Fn fflush +function first appeared in +.At v4 . +The +.Fn fpurge +function first appeared in +.Bx 4.4 . Modified: stable/12/lib/libc/stdio/fopen.3 ============================================================================== --- stable/12/lib/libc/stdio/fopen.3 Sat Jun 27 12:02:01 2020 (r362681) +++ stable/12/lib/libc/stdio/fopen.3 Sat Jun 27 12:12:47 2020 (r362682) @@ -32,7 +32,7 @@ .\" @(#)fopen.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd January 30, 2013 +.Dd May 1, 2020 .Dt FOPEN 3 .Os .Sh NAME @@ -356,3 +356,8 @@ The .Dq Li b mode does not conform to any standard but is also supported by glibc. +.Sh HISTORY +An +.Fn fopen +function appeared in +.At v1 . Modified: stable/12/lib/libc/stdio/setbuf.3 ============================================================================== --- stable/12/lib/libc/stdio/setbuf.3 Sat Jun 27 12:02:01 2020 (r362681) +++ stable/12/lib/libc/stdio/setbuf.3 Sat Jun 27 12:12:47 2020 (r362682) @@ -32,7 +32,7 @@ .\" @(#)setbuf.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd February 18, 2013 +.Dd May 1, 2020 .Dt SETBUF 3 .Os .Sh NAME @@ -195,6 +195,23 @@ and functions conform to .St -isoC . +.Sh HISTORY +The +.Fn setbuf +function first appeared in +.At v7 . +The +.Fn setbuffer +function first appeared in +.Bx 4.1c . +The +.Fn setlinebuf +function first appeared in +.Bx 4.2 . +The +.Fn setvbuf +function first appeared in +.Bx 4.4 . .Sh BUGS .Fn setbuf usually uses a suboptimal buffer size and should be avoided. Modified: stable/12/lib/libc/string/strlcpy.3 ============================================================================== --- stable/12/lib/libc/string/strlcpy.3 Sat Jun 27 12:02:01 2020 (r362681) +++ stable/12/lib/libc/string/strlcpy.3 Sat Jun 27 12:12:47 2020 (r362682) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 26, 2016 +.Dd May 1, 2020 .Dt STRLCPY 3 .Os .Sh NAME @@ -189,6 +189,16 @@ As a matter of fact, the first version of this manual .Xr strncat 3 , .Xr strncpy 3 , .Xr wcslcpy 3 +.Rs +.%A Todd C. Miller +.%A Theo de Raadt +.%T strlcpy and strlcat -- Consistent, Safe, String Copy and Concatenation +.%I USENIX Association +.%B Proceedings of the FREENIX Track: 1999 USENIX Annual Technical Conference +.%D June 6-11, 1999 +.%U http://www.usenix.org/publications/library/proceedings/usenix99/ +.%U full_papers/millert/millert.pdf +.Re .Sh HISTORY The .Fn strlcpy Modified: stable/12/lib/libc/sys/getgid.2 ============================================================================== --- stable/12/lib/libc/sys/getgid.2 Sat Jun 27 12:02:01 2020 (r362681) +++ stable/12/lib/libc/sys/getgid.2 Sat Jun 27 12:12:47 2020 (r362682) @@ -28,7 +28,7 @@ .\" @(#)getgid.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd December 15, 2015 +.Dd May 1, 2020 .Dt GETGID 2 .Os .Sh NAME @@ -78,3 +78,8 @@ and .Fn getegid system calls are expected to conform to .St -p1003.1-90 . +.Sh HISTORY +The +.Fn getgid +function appeared in +.At v4 . Modified: stable/12/lib/libc/sys/getitimer.2 ============================================================================== --- stable/12/lib/libc/sys/getitimer.2 Sat Jun 27 12:02:01 2020 (r362681) +++ stable/12/lib/libc/sys/getitimer.2 Sat Jun 27 12:12:47 2020 (r362682) @@ -28,7 +28,7 @@ .\" @(#)getitimer.2 8.3 (Berkeley) 5/16/95 .\" $FreeBSD$ .\" -.Dd May 16, 1995 +.Dd May 1, 2020 .Dt GETITIMER 2 .Os .Sh NAME @@ -173,6 +173,21 @@ to be handled. .Xr select 2 , .Xr sigaction 2 , .Xr clocks 7 +.Sh STANDARDS +The +.Fn getitimer +and +.Fn setitimer +functions conform to +.St -p1003.1-2001 . +The later +.St -p1003.1-2008 +revision however marked both functions as obsolescent, +recommending the use of +.Xr timer_gettime 2 +and +.Xr timer_settime 2 +instead. .Sh HISTORY The .Fn getitimer Modified: stable/12/lib/libc/sys/kqueue.2 ============================================================================== --- stable/12/lib/libc/sys/kqueue.2 Sat Jun 27 12:02:01 2020 (r362681) +++ stable/12/lib/libc/sys/kqueue.2 Sat Jun 27 12:12:47 2020 (r362682) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 27, 2020 +.Dd May 1, 2020 .Dt KQUEUE 2 .Os .Sh NAME @@ -776,6 +776,14 @@ have been applied. .Xr write 2 , .Xr pthread_setcancelstate 3 , .Xr signal 3 +.Rs +.%A Jonathan Lemon +.%T "Kqueue: A Generic and Scalable Event Notification Facility" +.%I USENIX Association +.%B Proceedings of the FREENIX Track: 2001 USENIX Annual Technical Conference +.%D June 25-30, 2001 +.\".http://www.usenix.org/event/usenix01/freenix01/full_papers/lemon/lemon.pdf +.Re .Sh HISTORY The .Fn kqueue From owner-svn-src-stable@freebsd.org Sat Jun 27 13:18:22 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BCC5534FC7C; Sat, 27 Jun 2020 13:18:22 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49vDpQ4cHTz3bKh; Sat, 27 Jun 2020 13:18:22 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9681025C0D; Sat, 27 Jun 2020 13:18:22 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05RDIM8k030364; Sat, 27 Jun 2020 13:18:22 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05RDILR7030360; Sat, 27 Jun 2020 13:18:21 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202006271318.05RDILR7030360@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Sat, 27 Jun 2020 13:18:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362683 - in stable/12/usr.bin: banner basename limits vmstat X-SVN-Group: stable-12 X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: in stable/12/usr.bin: banner basename limits vmstat X-SVN-Commit-Revision: 362683 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2020 13:18:22 -0000 Author: gbe (doc committer) Date: Sat Jun 27 13:18:21 2020 New Revision: 362683 URL: https://svnweb.freebsd.org/changeset/base/362683 Log: MFC r362327: Add HISTORY sections to banner(6), basename(1), limits(1) and vmstat(8) Reviewed by: bcr (mentor) Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D25019 Modified: stable/12/usr.bin/banner/banner.6 stable/12/usr.bin/basename/basename.1 stable/12/usr.bin/limits/limits.1 stable/12/usr.bin/vmstat/vmstat.8 Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.bin/banner/banner.6 ============================================================================== --- stable/12/usr.bin/banner/banner.6 Sat Jun 27 12:12:47 2020 (r362682) +++ stable/12/usr.bin/banner/banner.6 Sat Jun 27 13:18:21 2020 (r362683) @@ -28,7 +28,7 @@ .\" From: @(#)banner.6 8.2 (Berkeley) 4/29/95 .\" $FreeBSD$ .\" -.Dd January 26, 2005 +.Dd May 26, 2020 .Dt BANNER 6 .Os .Sh NAME @@ -60,6 +60,11 @@ Change the output from a width of 132 to .Ar width , suitable for a narrow terminal. .El +.Sh HISTORY +The +.Nm +utility first appeared in +.Bx 4.4 . .Sh AUTHORS .An Mark Horton .Sh BUGS Modified: stable/12/usr.bin/basename/basename.1 ============================================================================== --- stable/12/usr.bin/basename/basename.1 Sat Jun 27 12:12:47 2020 (r362682) +++ stable/12/usr.bin/basename/basename.1 Sat Jun 27 13:18:21 2020 (r362683) @@ -31,7 +31,7 @@ .\" @(#)basename.1 8.2 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd April 18, 1994 +.Dd May 26, 2020 .Dt BASENAME 1 .Os .Sh NAME @@ -111,3 +111,10 @@ and utilities are expected to be .St -p1003.2 compatible. +.Sh HISTORY +The +.Nm +and +.Nm dirname +utilities first appeared in +.Bx 4.4 . Modified: stable/12/usr.bin/limits/limits.1 ============================================================================== --- stable/12/usr.bin/limits/limits.1 Sat Jun 27 12:12:47 2020 (r362682) +++ stable/12/usr.bin/limits/limits.1 Sat Jun 27 13:18:21 2020 (r362683) @@ -19,7 +19,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 13, 2018 +.Dd May 26, 2020 .Dt LIMITS 1 .Os .Sh NAME @@ -387,6 +387,16 @@ will be whatever the executed program returns. .Xr login.conf 5 , .Xr rctl 8 , .Xr sysctl 8 +.Sh HISTORY +The +.Nm +utility first appeared in +.Fx 2.1.7 . +.Sh AUTHORS +The +.Nm +utility was written by +.An David Nugent Aq Mt davidn@FreeBSD.org . .Sh BUGS The .Nm Modified: stable/12/usr.bin/vmstat/vmstat.8 ============================================================================== --- stable/12/usr.bin/vmstat/vmstat.8 Sat Jun 27 12:12:47 2020 (r362682) +++ stable/12/usr.bin/vmstat/vmstat.8 Sat Jun 27 13:18:21 2020 (r362683) @@ -28,7 +28,7 @@ .\" @(#)vmstat.8 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd January 18, 2018 +.Dd May 26, 2020 .Dt VMSTAT 8 .Os .Sh NAME @@ -385,6 +385,11 @@ statistics every second. .Pp The sections starting with ``Interpreting system activity'' in .%T "Installing and Operating 4.3BSD" . +.Sh HISTORY +The +.Nm +utility first appeared in +.Bx 4.3 . .Sh BUGS The .Fl c From owner-svn-src-stable@freebsd.org Sat Jun 27 13:55:39 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 06CA8350EBD; Sat, 27 Jun 2020 13:55:39 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49vFdQ65kxz3dw0; Sat, 27 Jun 2020 13:55:38 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CC08326230; Sat, 27 Jun 2020 13:55:38 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05RDtc4A054651; Sat, 27 Jun 2020 13:55:38 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05RDtcEb054650; Sat, 27 Jun 2020 13:55:38 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202006271355.05RDtcEb054650@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Sat, 27 Jun 2020 13:55:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362685 - stable/12/lib/libc/stdio X-SVN-Group: stable-12 X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: stable/12/lib/libc/stdio X-SVN-Commit-Revision: 362685 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2020 13:55:39 -0000 Author: gbe (doc committer) Date: Sat Jun 27 13:55:38 2020 New Revision: 362685 URL: https://svnweb.freebsd.org/changeset/base/362685 Log: MFC r362326: fgetln(3): Add a Caveats Section Reviewed by: yuripv, bcr (mentor) Approved by: bcr (mentror) Obtained from: OpenBSD Differential Revision: https://reviews.freebsd.org/D24916 Modified: stable/12/lib/libc/stdio/fgetln.3 Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libc/stdio/fgetln.3 ============================================================================== --- stable/12/lib/libc/stdio/fgetln.3 Sat Jun 27 13:33:31 2020 (r362684) +++ stable/12/lib/libc/stdio/fgetln.3 Sat Jun 27 13:55:38 2020 (r362685) @@ -28,7 +28,7 @@ .\" @(#)fgetln.3 8.3 (Berkeley) 4/19/94 .\" $FreeBSD$ .\" -.Dd February 15, 2016 +.Dd June 11, 2020 .Dt FGETLN 3 .Os .Sh NAME @@ -126,3 +126,33 @@ The .Fn fgetln function first appeared in .Bx 4.4 . +.Sh CAVEATS +Since the returned buffer is not a C string (it is not NUL terminated), a +common practice is to replace the newline character with +.Sq \e0 . +However, if the last line in a file does not contain a newline, +the returned text won't contain a newline either. +The following code demonstrates how to deal with this problem by allocating a +temporary buffer: +.Bd -literal + char *buf, *lbuf; + size_t len; + + lbuf = NULL; + while ((buf = fgetln(fp, &len)) != NULL) { + if (buf[len - 1] == '\en') + buf[len - 1] = '\e0'; + else { + /* EOF without EOL, copy and add the NUL */ + if ((lbuf = malloc(len + 1)) == NULL) + err(1, NULL); + memcpy(lbuf, buf, len); + lbuf[len] = '\e0'; + buf = lbuf; + } + printf("%s\en", buf); + } + free(lbuf); + if (ferror(fp)) + err(1, "fgetln"); +.Ed From owner-svn-src-stable@freebsd.org Sat Jun 27 14:14:00 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C355F351806; Sat, 27 Jun 2020 14:14:00 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49vG2c4l1lz3gc7; Sat, 27 Jun 2020 14:14:00 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9DC6D26074; Sat, 27 Jun 2020 14:14:00 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05REE09D066818; Sat, 27 Jun 2020 14:14:00 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05REE0IO066817; Sat, 27 Jun 2020 14:14:00 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202006271414.05REE0IO066817@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Sat, 27 Jun 2020 14:14:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362686 - stable/12/lib/libc/sys X-SVN-Group: stable-12 X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: stable/12/lib/libc/sys X-SVN-Commit-Revision: 362686 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2020 14:14:00 -0000 Author: 0mp (doc,ports committer) Date: Sat Jun 27 14:14:00 2020 New Revision: 362686 URL: https://svnweb.freebsd.org/changeset/base/362686 Log: MFC 362336: Fix a typo in cpuset_getdomain.2 PR: 247385 Reported by: Paul Floyd Modified: stable/12/lib/libc/sys/cpuset_getdomain.2 Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libc/sys/cpuset_getdomain.2 ============================================================================== --- stable/12/lib/libc/sys/cpuset_getdomain.2 Sat Jun 27 13:55:38 2020 (r362685) +++ stable/12/lib/libc/sys/cpuset_getdomain.2 Sat Jun 27 14:14:00 2020 (r362686) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Mar 19, 2018 +.Dd June 18, 2020 .Dt CPUSET_GETDOMAIN 2 .Os .Sh NAME @@ -37,7 +37,7 @@ .In sys/param.h .In sys/domainset.h .Ft int -.Fn cpuset_getdomain "cpulevel_t level" "cpuwhich_t which" "id_t id" "size_t setsize" "domainet_t *mask" "int *policy" +.Fn cpuset_getdomain "cpulevel_t level" "cpuwhich_t which" "id_t id" "size_t setsize" "domainset_t *mask" "int *policy" .Ft int .Fn cpuset_setdomain "cpulevel_t level" "cpuwhich_t which" "id_t id" "size_t setsize" "const domainset_t *mask" "int policy" .Sh DESCRIPTION From owner-svn-src-stable@freebsd.org Sat Jun 27 14:27:38 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 296CE351F10; Sat, 27 Jun 2020 14:27:38 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49vGLL0McXz3yJY; Sat, 27 Jun 2020 14:27:38 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 078482664D; Sat, 27 Jun 2020 14:27:38 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05RERb8R073841; Sat, 27 Jun 2020 14:27:37 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05RERbw3073838; Sat, 27 Jun 2020 14:27:37 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202006271427.05RERbw3073838@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Sat, 27 Jun 2020 14:27:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362687 - in stable/12/usr.bin/sed: . tests X-SVN-Group: stable-12 X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: in stable/12/usr.bin/sed: . tests X-SVN-Commit-Revision: 362687 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2020 14:27:38 -0000 Author: 0mp (doc,ports committer) Date: Sat Jun 27 14:27:37 2020 New Revision: 362687 URL: https://svnweb.freebsd.org/changeset/base/362687 Log: MFC 362017, 362039, 362071: Read commands from stdin when -f - is passed to sed(1) This patch teaches sed to interpret a "-" in a special way when given as an argument to the -f flag. This behavior is also present in GNU sed. PR: 244872 Tested by: antoine (exp-run) Reviewed by: pfg, tobik (older version) Approved by: pfg (src) Relnotes: yes Differential Revision: https://reviews.freebsd.org/D24079 Remove duplicate lines from sed tests Reported by: yuripv Approved by: pfg (src) Remove some more duplicate test cases I accidentally committed Reported by: markj, yuripv Modified: stable/12/usr.bin/sed/main.c stable/12/usr.bin/sed/sed.1 stable/12/usr.bin/sed/tests/sed2_test.sh Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.bin/sed/main.c ============================================================================== --- stable/12/usr.bin/sed/main.c Sat Jun 27 14:14:00 2020 (r362686) +++ stable/12/usr.bin/sed/main.c Sat Jun 27 14:27:37 2020 (r362687) @@ -126,12 +126,13 @@ static void usage(void); int main(int argc, char *argv[]) { - int c, fflag; + int c, fflag, fflagstdin; char *temp_arg; (void) setlocale(LC_ALL, ""); fflag = 0; + fflagstdin = 0; inplace = NULL; while ((c = getopt(argc, argv, "EI:ae:f:i:lnru")) != -1) @@ -157,6 +158,8 @@ main(int argc, char *argv[]) break; case 'f': fflag = 1; + if (strcmp(optarg, "-") == 0) + fflagstdin = 1; add_compunit(CU_FILE, optarg); break; case 'i': @@ -193,6 +196,8 @@ main(int argc, char *argv[]) if (*argv) for (; *argv; argv++) add_file(*argv); + else if (fflagstdin) + exit(rval); else add_file(NULL); process(); @@ -236,9 +241,14 @@ again: linenum = 0; switch (script->type) { case CU_FILE: - if ((f = fopen(script->s, "r")) == NULL) - err(1, "%s", script->s); - fname = script->s; + if (strcmp(script->s, "-") == 0) { + f = stdin; + fname = "stdin"; + } else { + if ((f = fopen(script->s, "r")) == NULL) + err(1, "%s", script->s); + fname = script->s; + } state = ST_FILE; goto again; case CU_STRING: Modified: stable/12/usr.bin/sed/sed.1 ============================================================================== --- stable/12/usr.bin/sed/sed.1 Sat Jun 27 14:14:00 2020 (r362686) +++ stable/12/usr.bin/sed/sed.1 Sat Jun 27 14:27:37 2020 (r362687) @@ -31,7 +31,7 @@ .\" @(#)sed.1 8.2 (Berkeley) 12/30/93 .\" $FreeBSD$ .\" -.Dd May 19, 2020 +.Dd June 10, 2020 .Dt SED 1 .Os .Sh NAME @@ -98,6 +98,10 @@ Append the editing commands found in the file .Ar command_file to the list of commands. The editing commands should each be listed on a separate line. +The commands are read from the standard input if +.Ar command_file +is +.Dq Li - . .It Fl I Ar extension Edit files in-place, saving backups with the specified .Ar extension . @@ -636,7 +640,9 @@ The .Fl E , I , a and .Fl i -options, the prefixing +options, the special meaning of +.Fl f Cm - , +the prefixing .Dq \&+ in the second member of an address range, as well as the Modified: stable/12/usr.bin/sed/tests/sed2_test.sh ============================================================================== --- stable/12/usr.bin/sed/tests/sed2_test.sh Sat Jun 27 14:14:00 2020 (r362686) +++ stable/12/usr.bin/sed/tests/sed2_test.sh Sat Jun 27 14:27:37 2020 (r362687) @@ -88,10 +88,30 @@ escape_subst_body() atf_check -o 'inline:abcx\n' sed 's/[ \r\t]//g' c } +atf_test_case commands_on_stdin +commands_on_stdin_head() +{ + atf_set "descr" "Verify -f -" +} +commands_on_stdin_body() +{ + printf "a\n" > a + printf "s/a/b/\n" > a_to_b + printf "s/b/c/\n" > b_to_c + printf "s/c/d/\n" > ./- + atf_check -o 'inline:d\n' sed -f a_to_b -f - -f ./- a < b_to_c + + # Verify that nothing is printed if there are no input files provided. + printf 'i\\\nx' > insert_x + atf_check -o 'empty' sed -f - < insert_x +} + atf_init_test_cases() { atf_add_test_case inplace_command_q atf_add_test_case inplace_hardlink_src atf_add_test_case inplace_symlink_src atf_add_test_case escape_subst + atf_add_test_case commands_on_stdin + atf_add_test_case hex_subst } From owner-svn-src-stable@freebsd.org Sat Jun 27 14:31:36 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6685C352490; Sat, 27 Jun 2020 14:31:36 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49vGQv0PT8z3ypL; Sat, 27 Jun 2020 14:31:35 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E1A7F26994; Sat, 27 Jun 2020 14:31:34 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05REVYvH076783; Sat, 27 Jun 2020 14:31:34 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05REVYF8076781; Sat, 27 Jun 2020 14:31:34 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202006271431.05REVYF8076781@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Sat, 27 Jun 2020 14:31:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r362688 - in stable/11/usr.bin/sed: . tests X-SVN-Group: stable-11 X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: in stable/11/usr.bin/sed: . tests X-SVN-Commit-Revision: 362688 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2020 14:31:36 -0000 Author: 0mp (doc,ports committer) Date: Sat Jun 27 14:31:33 2020 New Revision: 362688 URL: https://svnweb.freebsd.org/changeset/base/362688 Log: MFC 362017, 362039, 362071: Read commands from stdin when -f - is passed to sed(1) This patch teaches sed to interpret a "-" in a special way when given as an argument to the -f flag. This behavior is also present in GNU sed. PR: 244872 Tested by: antoine (exp-run) Reviewed by: pfg, tobik (older version) Approved by: pfg (src) Relnotes: yes Differential Revision: https://reviews.freebsd.org/D24079 Remove duplicate lines from sed tests Reported by: yuripv Approved by: pfg (src) Remove some more duplicate test cases I accidentally committed Reported by: markj, yuripv Modified: stable/11/usr.bin/sed/main.c stable/11/usr.bin/sed/sed.1 stable/11/usr.bin/sed/tests/sed2_test.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/sed/main.c ============================================================================== --- stable/11/usr.bin/sed/main.c Sat Jun 27 14:27:37 2020 (r362687) +++ stable/11/usr.bin/sed/main.c Sat Jun 27 14:31:33 2020 (r362688) @@ -125,12 +125,13 @@ static void usage(void); int main(int argc, char *argv[]) { - int c, fflag; + int c, fflag, fflagstdin; char *temp_arg; (void) setlocale(LC_ALL, ""); fflag = 0; + fflagstdin = 0; inplace = NULL; while ((c = getopt(argc, argv, "EI:ae:f:i:lnru")) != -1) @@ -156,6 +157,8 @@ main(int argc, char *argv[]) break; case 'f': fflag = 1; + if (strcmp(optarg, "-") == 0) + fflagstdin = 1; add_compunit(CU_FILE, optarg); break; case 'i': @@ -192,6 +195,8 @@ main(int argc, char *argv[]) if (*argv) for (; *argv; argv++) add_file(*argv); + else if (fflagstdin) + exit(rval); else add_file(NULL); process(); @@ -235,9 +240,14 @@ again: linenum = 0; switch (script->type) { case CU_FILE: - if ((f = fopen(script->s, "r")) == NULL) - err(1, "%s", script->s); - fname = script->s; + if (strcmp(script->s, "-") == 0) { + f = stdin; + fname = "stdin"; + } else { + if ((f = fopen(script->s, "r")) == NULL) + err(1, "%s", script->s); + fname = script->s; + } state = ST_FILE; goto again; case CU_STRING: Modified: stable/11/usr.bin/sed/sed.1 ============================================================================== --- stable/11/usr.bin/sed/sed.1 Sat Jun 27 14:27:37 2020 (r362687) +++ stable/11/usr.bin/sed/sed.1 Sat Jun 27 14:31:33 2020 (r362688) @@ -31,7 +31,7 @@ .\" @(#)sed.1 8.2 (Berkeley) 12/30/93 .\" $FreeBSD$ .\" -.Dd March 27, 2017 +.Dd June 10, 2020 .Dt SED 1 .Os .Sh NAME @@ -96,6 +96,10 @@ Append the editing commands found in the file .Ar command_file to the list of commands. The editing commands should each be listed on a separate line. +The commands are read from the standard input if +.Ar command_file +is +.Dq Li - . .It Fl I Ar extension Edit files in-place, saving backups with the specified .Ar extension . @@ -633,7 +637,9 @@ The .Fl E , I , a and .Fl i -options, the prefixing +options, the special meaning of +.Fl f Cm - , +the prefixing .Dq \&+ in the second member of an address range, as well as the Modified: stable/11/usr.bin/sed/tests/sed2_test.sh ============================================================================== --- stable/11/usr.bin/sed/tests/sed2_test.sh Sat Jun 27 14:27:37 2020 (r362687) +++ stable/11/usr.bin/sed/tests/sed2_test.sh Sat Jun 27 14:31:33 2020 (r362688) @@ -69,9 +69,30 @@ inplace_command_q_body() atf_check -s not-exit:0 stat -q '.!'* } +atf_test_case commands_on_stdin +commands_on_stdin_head() +{ + atf_set "descr" "Verify -f -" +} +commands_on_stdin_body() +{ + printf "a\n" > a + printf "s/a/b/\n" > a_to_b + printf "s/b/c/\n" > b_to_c + printf "s/c/d/\n" > ./- + atf_check -o 'inline:d\n' sed -f a_to_b -f - -f ./- a < b_to_c + + # Verify that nothing is printed if there are no input files provided. + printf 'i\\\nx' > insert_x + atf_check -o 'empty' sed -f - < insert_x +} + atf_init_test_cases() { atf_add_test_case inplace_command_q atf_add_test_case inplace_hardlink_src atf_add_test_case inplace_symlink_src + atf_add_test_case escape_subst + atf_add_test_case commands_on_stdin + atf_add_test_case hex_subst } From owner-svn-src-stable@freebsd.org Sat Jun 27 14:36:45 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8C34C352623; Sat, 27 Jun 2020 14:36:45 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49vGXs37mvz40V4; Sat, 27 Jun 2020 14:36:45 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 66E48269A2; Sat, 27 Jun 2020 14:36:45 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05REajmr080412; Sat, 27 Jun 2020 14:36:45 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05REajrp080411; Sat, 27 Jun 2020 14:36:45 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202006271436.05REajrp080411@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Sat, 27 Jun 2020 14:36:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362689 - stable/12/usr.bin/fstat X-SVN-Group: stable-12 X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: stable/12/usr.bin/fstat X-SVN-Commit-Revision: 362689 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2020 14:36:45 -0000 Author: 0mp (doc,ports committer) Date: Sat Jun 27 14:36:44 2020 New Revision: 362689 URL: https://svnweb.freebsd.org/changeset/base/362689 Log: MFC 362290: Clean up fstat.1 - Sort options in the list & indent for readability. - Pet linters - Use "\(em" instead of "--" - Remove Tn macros - Use Ql instead of Dq Li - Add arguments to the -M, -N, -p, and -u options in their descriptions. - Use Sy instead of Li for field names. Li is deprecated, and Ql makes no sense here. - Replace a literal block with a list for the table of special names related to FD. - Use Ql instead of ``X''. - Add a dot after etc. - Reference fuser(1). Modified: stable/12/usr.bin/fstat/fstat.1 Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.bin/fstat/fstat.1 ============================================================================== --- stable/12/usr.bin/fstat/fstat.1 Sat Jun 27 14:31:33 2020 (r362688) +++ stable/12/usr.bin/fstat/fstat.1 Sat Jun 27 14:36:44 2020 (r362689) @@ -28,7 +28,7 @@ .\" @(#)fstat.1 8.3 (Berkeley) 2/25/94 .\" $FreeBSD$ .\" -.Dd October 19, 2019 +.Dd June 17, 2020 .Dt FSTAT 1 .Os .Sh NAME @@ -54,7 +54,7 @@ If no options are specified, reports on all open files in the system. .Pp The following options are available: -.Bl -tag -width indent +.Bl -tag -width "-N system" .It Fl f Restrict examination to files open in the same file systems as the named file arguments, or to the file system containing the @@ -63,17 +63,17 @@ For example, to find all files open in the file system directory .Pa /usr/src resides, type -.Dq Li fstat -f /usr/src . -.It Fl M +.Ql fstat -f /usr/src . +.It Fl M Ar core Extract values associated with the name list from the specified core instead of the default .Pa /dev/kmem . -.It Fl N -Extract the name list from the specified system instead of the default, -which is the kernel image the system has booted from. .It Fl m Include memory-mapped files in the listing; normally these are excluded due to the extra processing required. +.It Fl N Ar system +Extract the name list from the specified system instead of the default, +which is the kernel image the system has booted from. .It Fl n Numerical format. Print the device number (maj,min) of the file system @@ -83,11 +83,11 @@ device number that the special device refers to rather in .Pa /dev ; and print the mode of the file in octal instead of symbolic form. -.It Fl p +.It Fl p Ar pid Report all files open by the specified process. .It Fl s Print socket endpoint information. -.It Fl u +.It Fl u Ar user Report all files open by the specified user. .It Fl v Verbose mode. @@ -108,46 +108,52 @@ Restrict reports to the specified files. .Pp The following fields are printed: .Bl -tag -width MOUNT -.It Li USER +.It Sy USER The username of the owner of the process (effective uid). -.It Li CMD +.It Sy CMD The command name of the process. -.It Li PID +.It Sy PID The process id. -.It Li FD +.It Sy FD The file number in the per-process open file table or one of the following special names: .Pp -.Bd -literal -offset indent -compact -jail - jail root directory -mmap - memory-mapped file -root - root inode -text - executable text inode -tr - kernel trace file -wd - current working directory -.Ed +.Bl -tag -offset indent -compact +.It Sy jail +jail root directory +.It Sy mmap +memory-mapped file +.It Sy root +root inode +.It Sy text +executable text inode +.It Sy tr +kernel trace file +.It Sy wd +current working directory +.El .Pp -If the file number is followed by an asterisk (``*''), the file is -not an inode, but rather a socket, -.Tn FIFO , -or there is an error. +If the file number is followed by an asterisk +.Pq Ql * , +the file is +not an inode, but rather a socket, FIFO, or there is an error. In this case the remainder of the line does not -correspond to the remaining headers -- the format of the line +correspond to the remaining headers\(em the format of the line is described later under .Sx SOCKETS . -.It Li MOUNT +.It Sy MOUNT If the .Fl n flag was not specified, this header is present and is the pathname that the file system the file resides in is mounted on. -.It Li DEV +.It Sy DEV If the .Fl n flag is specified, this header is present and is the number of the device that this file resides in. -.It Li INUM +.It Sy INUM The inode number of the file. -.It Li MODE +.It Sy MODE The mode of the file. If the .Fl n @@ -156,7 +162,7 @@ using a symbolic format (see .Xr strmode 3 ) ; otherwise, the mode is printed as an octal number. -.It Li SZ\&|DV +.It Sy SZ\&|DV If the file is a semaphore, prints the current value of the semaphore. If the file is not a character or block special, prints the size of @@ -171,13 +177,17 @@ located, or the .Fl n flag is specified, prints the major/minor device number that the special device refers to. -.It Li R/W +.It Sy R/W This column describes the access mode that the file allows. -The letter ``r'' indicates open for reading; -the letter ``w'' indicates open for writing. +The letter +.Ql r +indicates open for reading; +the letter +.Ql w +indicates open for writing. This field is useful when trying to find the processes that are preventing a file system from being down graded to read-only. -.It Li NAME +.It Sy NAME If filename arguments are specified and the .Fl f flag is not, then @@ -194,32 +204,39 @@ name that the process originally used to open that fil .Sh SOCKETS The formatting of open sockets depends on the protocol domain. In all cases the first field is the domain name, the second field -is the socket type (stream, dgram, etc), and the third is the socket +is the socket type (stream, dgram, etc.), and the third is the socket flags field (in hex). The remaining fields are protocol dependent. -For tcp, it is the address of the tcpcb, and for udp, the inpcb (socket pcb). -For unix domain sockets, its the address of the socket pcb and the address +For TCP, it is the address of the tcpcb, and for UDP, the inpcb (socket pcb). +For UNIX-domain sockets, its the address of the socket pcb and the address of the connected pcb (if connected). Otherwise the protocol number and address of the socket itself are printed. .Pp For example, the addresses mentioned above are the addresses which the -.Dq Li netstat -A -command would print for tcp, udp, and unixdomain. +.Ql netstat -A +command would print for TCP, UDP, and UNIX-domain. Note that since pipes are implemented using sockets, a pipe appears as a -connected unix domain stream socket. -A unidirectional unix domain socket indicates the direction of flow with -an arrow (``<-'' or ``->''), and a full duplex socket shows a double arrow -(``<->''). +connected UNIX-domain stream socket. +A unidirectional UNIX-domain socket indicates the direction of flow with +an arrow +.Po Ql <- +or +.Ql -> +.Pc , +and a full duplex socket shows a double arrow +.Pq Ql <-> . .Pp When the .Fl s flag is used, socket endpoint information is shown after the address of the socket. For internet sockets the local and remote addresses are shown, separated with -a double arrow (``<->''). -For unix/local sockets either the local or remote address is shown, depending +a double arrow +.Pq Ql <-> . +For UNIX/local sockets either the local or remote address is shown, depending on which one is available. .Sh SEE ALSO +.Xr fuser 1 , .Xr netstat 1 , .Xr nfsstat 1 , .Xr procstat 1 , From owner-svn-src-stable@freebsd.org Sat Jun 27 14:43:45 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7EB26352E76; Sat, 27 Jun 2020 14:43:45 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49vGhv2Pw0z41bt; Sat, 27 Jun 2020 14:43:42 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3888B269FE; Sat, 27 Jun 2020 14:43:42 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05REhfgp086538; Sat, 27 Jun 2020 14:43:41 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05REhf8u086537; Sat, 27 Jun 2020 14:43:41 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202006271443.05REhf8u086537@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Sat, 27 Jun 2020 14:43:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r362694 - stable/11/usr.bin/fstat X-SVN-Group: stable-11 X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: stable/11/usr.bin/fstat X-SVN-Commit-Revision: 362694 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2020 14:43:45 -0000 Author: 0mp (doc,ports committer) Date: Sat Jun 27 14:43:41 2020 New Revision: 362694 URL: https://svnweb.freebsd.org/changeset/base/362694 Log: MFC 362290: Clean up fstat.1 - Sort options in the list & indent for readability. - Pet linters - Use "\(em" instead of "--" - Remove Tn macros - Use Ql instead of Dq Li - Add arguments to the -M, -N, -p, and -u options in their descriptions. - Use Sy instead of Li for field names. Li is deprecated, and Ql makes no sense here. - Replace a literal block with a list for the table of special names related to FD. - Use Ql instead of ``X''. - Add a dot after etc. - Reference fuser(1). Modified: stable/11/usr.bin/fstat/fstat.1 Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/fstat/fstat.1 ============================================================================== --- stable/11/usr.bin/fstat/fstat.1 Sat Jun 27 14:43:29 2020 (r362693) +++ stable/11/usr.bin/fstat/fstat.1 Sat Jun 27 14:43:41 2020 (r362694) @@ -28,7 +28,7 @@ .\" @(#)fstat.1 8.3 (Berkeley) 2/25/94 .\" $FreeBSD$ .\" -.Dd September 28, 2011 +.Dd June 17, 2020 .Dt FSTAT 1 .Os .Sh NAME @@ -54,7 +54,7 @@ If no options are specified, reports on all open files in the system. .Pp The following options are available: -.Bl -tag -width indent +.Bl -tag -width "-N system" .It Fl f Restrict examination to files open in the same file systems as the named file arguments, or to the file system containing the @@ -63,17 +63,17 @@ For example, to find all files open in the file system directory .Pa /usr/src resides, type -.Dq Li fstat -f /usr/src . -.It Fl M +.Ql fstat -f /usr/src . +.It Fl M Ar core Extract values associated with the name list from the specified core instead of the default .Pa /dev/kmem . -.It Fl N -Extract the name list from the specified system instead of the default, -which is the kernel image the system has booted from. .It Fl m Include memory-mapped files in the listing; normally these are excluded due to the extra processing required. +.It Fl N Ar system +Extract the name list from the specified system instead of the default, +which is the kernel image the system has booted from. .It Fl n Numerical format. Print the device number (maj,min) of the file system @@ -83,9 +83,9 @@ device number that the special device refers to rather in .Pa /dev ; and print the mode of the file in octal instead of symbolic form. -.It Fl p +.It Fl p Ar pid Report all files open by the specified process. -.It Fl u +.It Fl u Ar user Report all files open by the specified user. .It Fl v Verbose mode. @@ -106,46 +106,52 @@ Restrict reports to the specified files. .Pp The following fields are printed: .Bl -tag -width MOUNT -.It Li USER +.It Sy USER The username of the owner of the process (effective uid). -.It Li CMD +.It Sy CMD The command name of the process. -.It Li PID +.It Sy PID The process id. -.It Li FD +.It Sy FD The file number in the per-process open file table or one of the following special names: .Pp -.Bd -literal -offset indent -compact -jail - jail root directory -mmap - memory-mapped file -root - root inode -text - executable text inode -tr - kernel trace file -wd - current working directory -.Ed +.Bl -tag -offset indent -compact +.It Sy jail +jail root directory +.It Sy mmap +memory-mapped file +.It Sy root +root inode +.It Sy text +executable text inode +.It Sy tr +kernel trace file +.It Sy wd +current working directory +.El .Pp -If the file number is followed by an asterisk (``*''), the file is -not an inode, but rather a socket, -.Tn FIFO , -or there is an error. +If the file number is followed by an asterisk +.Pq Ql * , +the file is +not an inode, but rather a socket, FIFO, or there is an error. In this case the remainder of the line does not -correspond to the remaining headers -- the format of the line +correspond to the remaining headers\(em the format of the line is described later under .Sx SOCKETS . -.It Li MOUNT +.It Sy MOUNT If the .Fl n flag was not specified, this header is present and is the pathname that the file system the file resides in is mounted on. -.It Li DEV +.It Sy DEV If the .Fl n flag is specified, this header is present and is the number of the device that this file resides in. -.It Li INUM +.It Sy INUM The inode number of the file. -.It Li MODE +.It Sy MODE The mode of the file. If the .Fl n @@ -154,7 +160,7 @@ using a symbolic format (see .Xr strmode 3 ) ; otherwise, the mode is printed as an octal number. -.It Li SZ\&|DV +.It Sy SZ\&|DV If the file is a semaphore, prints the current value of the semaphore. If the file is not a character or block special, prints the size of @@ -169,13 +175,17 @@ located, or the .Fl n flag is specified, prints the major/minor device number that the special device refers to. -.It Li R/W +.It Sy R/W This column describes the access mode that the file allows. -The letter ``r'' indicates open for reading; -the letter ``w'' indicates open for writing. +The letter +.Ql r +indicates open for reading; +the letter +.Ql w +indicates open for writing. This field is useful when trying to find the processes that are preventing a file system from being down graded to read-only. -.It Li NAME +.It Sy NAME If filename arguments are specified and the .Fl f flag is not, then @@ -192,11 +202,11 @@ name that the process originally used to open that fil .Sh SOCKETS The formatting of open sockets depends on the protocol domain. In all cases the first field is the domain name, the second field -is the socket type (stream, dgram, etc), and the third is the socket +is the socket type (stream, dgram, etc.), and the third is the socket flags field (in hex). The remaining fields are protocol dependent. -For tcp, it is the address of the tcpcb, and for udp, the inpcb (socket pcb). -For unix domain sockets, its the address of the socket pcb and the address +For TCP, it is the address of the tcpcb, and for UDP, the inpcb (socket pcb). +For UNIX-domain sockets, its the address of the socket pcb and the address of the connected pcb (if connected). Otherwise the protocol number and address of the socket itself are printed. The attempt is to make enough information available to @@ -204,14 +214,20 @@ permit further analysis without duplicating .Xr netstat 1 . .Pp For example, the addresses mentioned above are the addresses which the -.Dq Li netstat -A -command would print for tcp, udp, and unixdomain. +.Ql netstat -A +command would print for TCP, UDP, and UNIX-domain. Note that since pipes are implemented using sockets, a pipe appears as a -connected unix domain stream socket. -A unidirectional unix domain socket indicates the direction of flow with -an arrow (``<-'' or ``->''), and a full duplex socket shows a double arrow -(``<->''). +connected UNIX-domain stream socket. +A unidirectional UNIX-domain socket indicates the direction of flow with +an arrow +.Po Ql <- +or +.Ql -> +.Pc , +and a full duplex socket shows a double arrow +.Pq Ql <-> . .Sh SEE ALSO +.Xr fuser 1 , .Xr netstat 1 , .Xr nfsstat 1 , .Xr procstat 1 , From owner-svn-src-stable@freebsd.org Sat Jun 27 14:47:28 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 291133530C3; Sat, 27 Jun 2020 14:47:28 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49vGnD0BCyz41XQ; Sat, 27 Jun 2020 14:47:28 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 01B2126AD6; Sat, 27 Jun 2020 14:47:28 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05RElRHx086809; Sat, 27 Jun 2020 14:47:27 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05RElRhN086808; Sat, 27 Jun 2020 14:47:27 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202006271447.05RElRhN086808@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Sat, 27 Jun 2020 14:47:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r362695 - stable/11/sbin/umount X-SVN-Group: stable-11 X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: stable/11/sbin/umount X-SVN-Commit-Revision: 362695 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2020 14:47:28 -0000 Author: 0mp (doc,ports committer) Date: Sat Jun 27 14:47:27 2020 New Revision: 362695 URL: https://svnweb.freebsd.org/changeset/base/362695 Log: MFC 362348: Document that umount -A does not unmount /dev Reported by: kaktus Reviewed by: kaktus Differential Revision: https://reviews.freebsd.org/D25351 Modified: stable/11/sbin/umount/umount.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/umount/umount.8 ============================================================================== --- stable/11/sbin/umount/umount.8 Sat Jun 27 14:43:41 2020 (r362694) +++ stable/11/sbin/umount/umount.8 Sat Jun 27 14:47:27 2020 (r362695) @@ -28,7 +28,7 @@ .\" @(#)umount.8 8.2 (Berkeley) 5/8/95 .\" $FreeBSD$ .\" -.Dd April 14, 2020 +.Dd June 19, 2020 .Dt UMOUNT 8 .Os .Sh NAME @@ -69,8 +69,11 @@ All the file systems described in .Xr fstab 5 are unmounted. .It Fl A -All the currently mounted file systems except -the root are unmounted. +All the currently mounted file systems are unmounted, +except for those mounted at +.Pa / +or +.Pa /dev . .It Fl F Ar fstab Specify the .Pa fstab From owner-svn-src-stable@freebsd.org Sat Jun 27 14:48:10 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E524B352F3C; Sat, 27 Jun 2020 14:48:10 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49vGp25ntgz41qB; Sat, 27 Jun 2020 14:48:10 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C2175266FC; Sat, 27 Jun 2020 14:48:10 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05REmAeR086890; Sat, 27 Jun 2020 14:48:10 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05REmA2x086889; Sat, 27 Jun 2020 14:48:10 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202006271448.05REmA2x086889@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Sat, 27 Jun 2020 14:48:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362696 - stable/12/sbin/umount X-SVN-Group: stable-12 X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: stable/12/sbin/umount X-SVN-Commit-Revision: 362696 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2020 14:48:11 -0000 Author: 0mp (doc,ports committer) Date: Sat Jun 27 14:48:10 2020 New Revision: 362696 URL: https://svnweb.freebsd.org/changeset/base/362696 Log: MFC 362348: Document that umount -A does not unmount /dev Reported by: kaktus Reviewed by: kaktus Differential Revision: https://reviews.freebsd.org/D25351 Modified: stable/12/sbin/umount/umount.8 Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/umount/umount.8 ============================================================================== --- stable/12/sbin/umount/umount.8 Sat Jun 27 14:47:27 2020 (r362695) +++ stable/12/sbin/umount/umount.8 Sat Jun 27 14:48:10 2020 (r362696) @@ -28,7 +28,7 @@ .\" @(#)umount.8 8.2 (Berkeley) 5/8/95 .\" $FreeBSD$ .\" -.Dd April 14, 2020 +.Dd June 19, 2020 .Dt UMOUNT 8 .Os .Sh NAME @@ -69,8 +69,11 @@ All the file systems described in .Xr fstab 5 are unmounted. .It Fl A -All the currently mounted file systems except -the root are unmounted. +All the currently mounted file systems are unmounted, +except for those mounted at +.Pa / +or +.Pa /dev . .It Fl F Ar fstab Specify the .Pa fstab From owner-svn-src-stable@freebsd.org Sat Jun 27 17:03:56 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3005D3574EA; Sat, 27 Jun 2020 17:03:56 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49vKph0VQGz4CMJ; Sat, 27 Jun 2020 17:03:56 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0307D85ED; Sat, 27 Jun 2020 17:03:56 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05RH3tPQ074614; Sat, 27 Jun 2020 17:03:55 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05RH3t2K074613; Sat, 27 Jun 2020 17:03:55 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202006271703.05RH3t2K074613@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 27 Jun 2020 17:03:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r362701 - stable/11/tools/build/mk X-SVN-Group: stable-11 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: stable/11/tools/build/mk X-SVN-Commit-Revision: 362701 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2020 17:03:56 -0000 Author: dim Date: Sat Jun 27 17:03:55 2020 New Revision: 362701 URL: https://svnweb.freebsd.org/changeset/base/362701 Log: MFC r348689 (by emaste): Use CLANG knob to remove llvm-symbolizer man page r348504 moved llvm-symbolizer from the CLANG_EXTRAS knob to CLANG, but the man page was still in the CLANG_EXTRAS section in OptionalObsoleteFiles.inc. Reported by: jhb Modified: stable/11/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/11/ (props changed) Modified: stable/11/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/11/tools/build/mk/OptionalObsoleteFiles.inc Sat Jun 27 16:31:04 2020 (r362700) +++ stable/11/tools/build/mk/OptionalObsoleteFiles.inc Sat Jun 27 17:03:55 2020 (r362701) @@ -1618,6 +1618,7 @@ OLD_FILES+=usr/share/man/man1/clang++.1.gz OLD_FILES+=usr/share/man/man1/clang-cpp.1.gz OLD_FILES+=usr/share/man/man1/llvm-ar.1.gz OLD_FILES+=usr/share/man/man1/llvm-nm.1.gz +OLD_FILES+=usr/share/man/man1/llvm-symbolizer.1.gz OLD_FILES+=usr/share/man/man1/llvm-tblgen.1.gz .endif @@ -1656,7 +1657,6 @@ OLD_FILES+=usr/share/man/man1/llvm-dwarfdump.1 OLD_FILES+=usr/share/man/man1/llvm-extract.1.gz OLD_FILES+=usr/share/man/man1/llvm-link.1.gz OLD_FILES+=usr/share/man/man1/llvm-pdbutil.1.gz -OLD_FILES+=usr/share/man/man1/llvm-symbolizer.1.gz OLD_FILES+=usr/share/man/man1/opt.1.gz .endif From owner-svn-src-stable@freebsd.org Sat Jun 27 17:39:14 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E1AC635811E; Sat, 27 Jun 2020 17:39:14 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49vLbQ5f47z4F8c; Sat, 27 Jun 2020 17:39:14 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BCE829110; Sat, 27 Jun 2020 17:39:14 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05RHdEI9093300; Sat, 27 Jun 2020 17:39:14 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05RHdDud093294; Sat, 27 Jun 2020 17:39:13 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202006271739.05RHdDud093294@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Sat, 27 Jun 2020 17:39:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362702 - in stable/12/cddl/contrib/opensolaris/cmd: dtrace lockstat zdb zfs zpool zstreamdump X-SVN-Group: stable-12 X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: in stable/12/cddl/contrib/opensolaris/cmd: dtrace lockstat zdb zfs zpool zstreamdump X-SVN-Commit-Revision: 362702 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2020 17:39:15 -0000 Author: gbe (doc committer) Date: Sat Jun 27 17:39:13 2020 New Revision: 362702 URL: https://svnweb.freebsd.org/changeset/base/362702 Log: MFC r339956 r362170: Add HISTORY sections to ZFS and dtrace manpages r362170 Add HISTORY sections to ZFS and dtrace manpages Reviewed by: bcr (mentor) Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D23833 r339956: dtrace(1): remove reference to dtruss that was removed from base system in r300226. PR: 211618 Reviewed by: gnn, markj, 0mp Approved by: kib (mentor, implicit) Differential Revision: https://reviews.freebsd.org/D17762 Modified: stable/12/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 stable/12/cddl/contrib/opensolaris/cmd/lockstat/lockstat.1 stable/12/cddl/contrib/opensolaris/cmd/zdb/zdb.8 stable/12/cddl/contrib/opensolaris/cmd/zfs/zfs.8 stable/12/cddl/contrib/opensolaris/cmd/zpool/zpool.8 stable/12/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.1 Directory Properties: stable/12/ (props changed) Modified: stable/12/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 ============================================================================== --- stable/12/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 Sat Jun 27 17:03:55 2020 (r362701) +++ stable/12/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 Sat Jun 27 17:39:13 2020 (r362702) @@ -20,7 +20,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 16, 2018 +.Dd February 25, 2020 .Dt DTRACE 1 .Os .Sh NAME @@ -776,9 +776,13 @@ failed or that the specified request could not be sati .It 2 Invalid command line options or arguments were specified. .El +.Sh HISTORY +The +.Nm +utility first appeared in +.Fx 7.1 . .Sh SEE ALSO .Xr cpp 1 , -.Xr dtruss 1 , .Xr elf 5 , .Xr SDT 9 .Rs Modified: stable/12/cddl/contrib/opensolaris/cmd/lockstat/lockstat.1 ============================================================================== --- stable/12/cddl/contrib/opensolaris/cmd/lockstat/lockstat.1 Sat Jun 27 17:03:55 2020 (r362701) +++ stable/12/cddl/contrib/opensolaris/cmd/lockstat/lockstat.1 Sat Jun 27 17:39:13 2020 (r362702) @@ -21,7 +21,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 29, 2015 +.Dd February 25, 2020 .Dt LOCKSTAT 1 .Os .Sh NAME @@ -366,6 +366,11 @@ Count indv cuml rcnt nsec Lock C .Xr dtrace 1 , .Xr ksyms 4 , .Xr locking 9 +.Sh HISTORY +The +.Nm +utility first appeared in +.Fx 7.1 . .Sh NOTES Tail-call elimination can affect call sites. For example, if Modified: stable/12/cddl/contrib/opensolaris/cmd/zdb/zdb.8 ============================================================================== --- stable/12/cddl/contrib/opensolaris/cmd/zdb/zdb.8 Sat Jun 27 17:03:55 2020 (r362701) +++ stable/12/cddl/contrib/opensolaris/cmd/zdb/zdb.8 Sat Jun 27 17:39:13 2020 (r362702) @@ -13,7 +13,7 @@ .\" Copyright (c) 2012, 2018 by Delphix. All rights reserved. .\" Copyright 2017 Nexenta Systems, Inc. .\" -.Dd October 06, 2017 +.Dd February 25, 2020 .Dt ZDB 8 .Os .Sh NAME @@ -407,3 +407,8 @@ dedup = 1.11, compress = 1.80, copies = 1.00, dedup * .Sh SEE ALSO .Xr zfs 8 , .Xr zpool 8 +.Sh HISTORY +The +.Nm +utility first appeared in +.Fx 7.0 . Modified: stable/12/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- stable/12/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Sat Jun 27 17:03:55 2020 (r362701) +++ stable/12/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Sat Jun 27 17:39:13 2020 (r362702) @@ -3944,6 +3944,11 @@ M F /tank/test/modified .Xr umount 8 , .Xr zfs-program 8 , .Xr zpool 8 +.Sh HISTORY +The +.Nm +utility first appeared in +.Fx 7.0 . .Sh AUTHORS This manual page is a .Xr mdoc 7 Modified: stable/12/cddl/contrib/opensolaris/cmd/zpool/zpool.8 ============================================================================== --- stable/12/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Sat Jun 27 17:03:55 2020 (r362701) +++ stable/12/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Sat Jun 27 17:39:13 2020 (r362702) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 7, 2019 +.Dd February 25, 2020 .Dt ZPOOL 8 .Os .Sh NAME @@ -2462,6 +2462,11 @@ Discarded approximately 29 seconds of transactions. .Xr zpool-features 7 , .Xr zfs 8 , .Xr zfsd 8 +.Sh HISTORY +The +.Nm +utility first appeared in +.Fx 7.0 . .Sh AUTHORS This manual page is a .Xr mdoc 7 Modified: stable/12/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.1 ============================================================================== --- stable/12/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.1 Sat Jun 27 17:03:55 2020 (r362701) +++ stable/12/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.1 Sat Jun 27 17:39:13 2020 (r362702) @@ -22,7 +22,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 31, 2013 +.Dd February 25, 2020 .Dt ZSTREAMDUMP 8 .Os .Sh NAME @@ -52,6 +52,11 @@ Verbose. Dump all headers, not only begin and end head .El .Sh SEE ALSO .Xr zfs 8 +.Sh HISTORY +The +.Nm +utility first appeared in +.Fx 7.0 . .Sh AUTHORS This manual page is a .Xr mdoc 7 From owner-svn-src-stable@freebsd.org Sat Jun 27 20:03:45 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E8F1D35B44C; Sat, 27 Jun 2020 20:03:45 +0000 (UTC) (envelope-from lwhsu.freebsd@gmail.com) Received: from mail-yb1-f195.google.com (mail-yb1-f195.google.com [209.85.219.195]) (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 49vPp93H78z4PN1; Sat, 27 Jun 2020 20:03:45 +0000 (UTC) (envelope-from lwhsu.freebsd@gmail.com) Received: by mail-yb1-f195.google.com with SMTP id m16so6263697ybf.4; Sat, 27 Jun 2020 13:03:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=a99ntSWDP6nr04eI791KIORs6dbVnQQV0dj2oCtowGE=; b=eHTRCp2FeVziZPlmjAMdMUFGHOdywNI6/mIJJTYEpTFt4SXTAM8XqaZyVf3PJ+WuJS tSFzbZZrbMOegwK1bBeDg55XU00rJAJZNrlWVpxsRAiMGG7IHI9B4feX7sxkcf/FnhM/ T/h+/7XNQX1vxf4RFkoapWIRhKNIYOvgTFy8+t5m90aiqQNxiWVaUS3N8hCmwcQBEvRy 8Zissm4ZDjouLbNUDGqX6S43+GrwhGTaCVKLWGRrZhfwj4tYAZKxMApltkelJ4lueBv5 f14HBLvpbSmQLugVEAlM6GLz9d+Zhp7/f09x+PglnieaqbOkqT18ksX7de5T+OzAN1vs AVJA== X-Gm-Message-State: AOAM530BpJ4JBiD+i2hP/tKl95Uyy+Wq6/WHZ8Lrh5PVITsZB3COTJZx jun7KCXMYROfu1ou5FA4pTm/JnoERGDlkDA7ihGXIWGs X-Google-Smtp-Source: ABdhPJwxfu47ICo1rSsg9vfm1sf3vMo4/8yq/b8vrbPgQlcuQkKhQIA7luSF6Q1pufo1R30NuW9XvVret5koG6PkZ0w= X-Received: by 2002:a25:69d1:: with SMTP id e200mr14827673ybc.127.1593288223806; Sat, 27 Jun 2020 13:03:43 -0700 (PDT) MIME-Version: 1.0 References: <202006271427.05RERbw3073838@repo.freebsd.org> In-Reply-To: <202006271427.05RERbw3073838@repo.freebsd.org> From: Li-Wen Hsu Date: Sun, 28 Jun 2020 04:03:32 +0800 Message-ID: Subject: Re: svn commit: r362687 - in stable/12/usr.bin/sed: . tests To: Mateusz Piotrowski <0mp@freebsd.org> Cc: src-committers , svn-src-all , svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 49vPp93H78z4PN1 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; TAGGED_FROM(0.00)[] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2020 20:03:46 -0000 On Sat, Jun 27, 2020 at 10:27 PM Mateusz Piotrowski <0mp@freebsd.org> wrote: > > Author: 0mp (doc,ports committer) > Date: Sat Jun 27 14:27:37 2020 > New Revision: 362687 > URL: https://svnweb.freebsd.org/changeset/base/362687 > > Log: > MFC 362017, 362039, 362071: > > Read commands from stdin when -f - is passed to sed(1) > > This patch teaches sed to interpret a "-" in a special way when given > as an argument to the -f flag. > > This behavior is also present in GNU sed. > > PR: 244872 > Tested by: antoine (exp-run) > Reviewed by: pfg, tobik (older version) > Approved by: pfg (src) > Relnotes: yes > Differential Revision: https://reviews.freebsd.org/D24079 > > Remove duplicate lines from sed tests > > Reported by: yuripv > Approved by: pfg (src) > > Remove some more duplicate test cases I accidentally committed > > Reported by: markj, yuripv Hi, I think this MFC and for 11's might have some issues. The test cases under usr.bin.sed.sed2_test cannot be listed thus cannot be executed: https://ci.freebsd.org/job/FreeBSD-stable-12-i386-test/2458/testReport/junit/usr.bin.sed/sed2_test/ https://ci.freebsd.org/job/FreeBSD-stable-11-amd64-test/5150/testReport/junit/usr.bin.sed/sed2_test/ This is how they should look like: https://ci.freebsd.org/job/FreeBSD-head-amd64-test/15686/testReport/usr.bin.sed/sed2_test/ You can try with `cd /usr/tests/usr.bin/sed && kyua list sed2_test`. Please check if the merged sed2_test.sh needs adjusting. Thanks, Li-Wen From owner-svn-src-stable@freebsd.org Sat Jun 27 20:46:34 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 48F8035BFD4; Sat, 27 Jun 2020 20:46:34 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49vQlZ0y35z4Qt4; Sat, 27 Jun 2020 20:46:34 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qk1-f171.google.com (mail-qk1-f171.google.com [209.85.222.171]) (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 16643248E1; Sat, 27 Jun 2020 20:46:34 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qk1-f171.google.com with SMTP id j80so12047131qke.0; Sat, 27 Jun 2020 13:46:34 -0700 (PDT) X-Gm-Message-State: AOAM5316RRJDnx8VMmsiSuYo+IyJpcNUbZgxk2VjJo2aiLAHrZZSIWdD N6RM8Rc580HS1T2VaWEEQ7JoEHl3e3e/UAF1YKQ= X-Google-Smtp-Source: ABdhPJxGjyiWwAJF4P8h0H5tjxjEr1XF/6ch5gbbMVpXUUQTC9ly6fJRsipIpeZP+q68/6nj4312Nbx1ivqJ/O+SOgk= X-Received: by 2002:a37:bcb:: with SMTP id 194mr9078751qkl.103.1593290793401; Sat, 27 Jun 2020 13:46:33 -0700 (PDT) MIME-Version: 1.0 References: <202006271427.05RERbw3073838@repo.freebsd.org> In-Reply-To: From: Kyle Evans Date: Sat, 27 Jun 2020 15:46:21 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r362687 - in stable/12/usr.bin/sed: . tests To: Li-Wen Hsu Cc: Mateusz Piotrowski <0mp@freebsd.org>, src-committers , svn-src-all , svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2020 20:46:34 -0000 (sorry, on mobile) This line needs dropped: + atf_add_test_case hex_subst It'll get added back in later when I merge that test back. On Sat, Jun 27, 2020, 15:03 Li-Wen Hsu wrote: > On Sat, Jun 27, 2020 at 10:27 PM Mateusz Piotrowski <0mp@freebsd.org> > wrote: > > > > Author: 0mp (doc,ports committer) > > Date: Sat Jun 27 14:27:37 2020 > > New Revision: 362687 > > URL: https://svnweb.freebsd.org/changeset/base/362687 > > > > Log: > > MFC 362017, 362039, 362071: > > > > Read commands from stdin when -f - is passed to sed(1) > > > > This patch teaches sed to interpret a "-" in a special way when given > > as an argument to the -f flag. > > > > This behavior is also present in GNU sed. > > > > PR: 244872 > > Tested by: antoine (exp-run) > > Reviewed by: pfg, tobik (older version) > > Approved by: pfg (src) > > Relnotes: yes > > Differential Revision: https://reviews.freebsd.org/D24079 > > > > Remove duplicate lines from sed tests > > > > Reported by: yuripv > > Approved by: pfg (src) > > > > Remove some more duplicate test cases I accidentally committed > > > > Reported by: markj, yuripv > > Hi, > > I think this MFC and for 11's might have some issues. The test cases > under usr.bin.sed.sed2_test cannot be listed thus cannot be executed: > > > https://ci.freebsd.org/job/FreeBSD-stable-12-i386-test/2458/testReport/junit/usr.bin.sed/sed2_test/ > > https://ci.freebsd.org/job/FreeBSD-stable-11-amd64-test/5150/testReport/junit/usr.bin.sed/sed2_test/ > > This is how they should look like: > > > https://ci.freebsd.org/job/FreeBSD-head-amd64-test/15686/testReport/usr.bin.sed/sed2_test/ > > You can try with `cd /usr/tests/usr.bin/sed && kyua list sed2_test`. > Please check if the merged sed2_test.sh needs adjusting. > > Thanks, > Li-Wen > From owner-svn-src-stable@freebsd.org Sat Jun 27 22:51:16 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5193E35E847; Sat, 27 Jun 2020 22:51:16 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49vTWS1VCCz4YkG; Sat, 27 Jun 2020 22:51:16 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2E78ECDD8; Sat, 27 Jun 2020 22:51:16 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05RMpGFe087000; Sat, 27 Jun 2020 22:51:16 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05RMpGxH086999; Sat, 27 Jun 2020 22:51:16 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202006272251.05RMpGxH086999@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Sat, 27 Jun 2020 22:51:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r362710 - stable/11/usr.bin/sed/tests X-SVN-Group: stable-11 X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: stable/11/usr.bin/sed/tests X-SVN-Commit-Revision: 362710 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2020 22:51:16 -0000 Author: 0mp (doc,ports committer) Date: Sat Jun 27 22:51:15 2020 New Revision: 362710 URL: https://svnweb.freebsd.org/changeset/base/362710 Log: Disable mismerged tests committed in r362687 Reported by: lwhsu Modified: stable/11/usr.bin/sed/tests/sed2_test.sh Modified: stable/11/usr.bin/sed/tests/sed2_test.sh ============================================================================== --- stable/11/usr.bin/sed/tests/sed2_test.sh Sat Jun 27 21:37:48 2020 (r362709) +++ stable/11/usr.bin/sed/tests/sed2_test.sh Sat Jun 27 22:51:15 2020 (r362710) @@ -92,7 +92,5 @@ atf_init_test_cases() atf_add_test_case inplace_command_q atf_add_test_case inplace_hardlink_src atf_add_test_case inplace_symlink_src - atf_add_test_case escape_subst atf_add_test_case commands_on_stdin - atf_add_test_case hex_subst } From owner-svn-src-stable@freebsd.org Sat Jun 27 23:29:08 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 49E0035F409; Sat, 27 Jun 2020 23:29:08 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49vVM81DB5z4blf; Sat, 27 Jun 2020 23:29:08 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qt1-f181.google.com (mail-qt1-f181.google.com [209.85.160.181]) (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 1FA2825C8A; Sat, 27 Jun 2020 23:29:08 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qt1-f181.google.com with SMTP id i3so10249733qtq.13; Sat, 27 Jun 2020 16:29:08 -0700 (PDT) X-Gm-Message-State: AOAM532MR2vI1+5vk2n9i+ugGlXXEoc9gVQ/NtJQo46FxJRctVjDoP5g NFueH+RFw64Sjt4OQxbB0xm7IQnnIR9G5w4idz0= X-Google-Smtp-Source: ABdhPJz2mmvbdDCNu2GjtdUPj1F0gkGMO1jTD7zYebAg4mhqqTsEHqMPoyKNOqCna8a3yRqO2oNf4fIZnoge9xOiNTc= X-Received: by 2002:ac8:464f:: with SMTP id f15mr8996912qto.211.1593300547649; Sat, 27 Jun 2020 16:29:07 -0700 (PDT) MIME-Version: 1.0 References: <202006272251.05RMpGxH086999@repo.freebsd.org> In-Reply-To: <202006272251.05RMpGxH086999@repo.freebsd.org> From: Kyle Evans Date: Sat, 27 Jun 2020 18:28:56 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r362710 - stable/11/usr.bin/sed/tests To: Mateusz Piotrowski <0mp@freebsd.org> Cc: src-committers , svn-src-all , svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2020 23:29:08 -0000 (sorry, still on mobile) Please restore escape_subst...as per my last email, it was only hex_subst that needed to go away. The former was already there. On Sat, Jun 27, 2020, 17:51 Mateusz Piotrowski <0mp@freebsd.org> wrote: > Author: 0mp (doc,ports committer) > Date: Sat Jun 27 22:51:15 2020 > New Revision: 362710 > URL: https://svnweb.freebsd.org/changeset/base/362710 > > Log: > Disable mismerged tests committed in r362687 > > Reported by: lwhsu > > Modified: > stable/11/usr.bin/sed/tests/sed2_test.sh > > Modified: stable/11/usr.bin/sed/tests/sed2_test.sh > > ============================================================================== > --- stable/11/usr.bin/sed/tests/sed2_test.sh Sat Jun 27 21:37:48 2020 > (r362709) > +++ stable/11/usr.bin/sed/tests/sed2_test.sh Sat Jun 27 22:51:15 2020 > (r362710) > @@ -92,7 +92,5 @@ atf_init_test_cases() > atf_add_test_case inplace_command_q > atf_add_test_case inplace_hardlink_src > atf_add_test_case inplace_symlink_src > - atf_add_test_case escape_subst > atf_add_test_case commands_on_stdin > - atf_add_test_case hex_subst > } > From owner-svn-src-stable@freebsd.org Sat Jun 27 23:32:55 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7294035F48A; Sat, 27 Jun 2020 23:32:55 +0000 (UTC) (envelope-from mpp302@gmail.com) Received: from mail-ej1-f53.google.com (mail-ej1-f53.google.com [209.85.218.53]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49vVRV3x28z4bqG; Sat, 27 Jun 2020 23:32:54 +0000 (UTC) (envelope-from mpp302@gmail.com) Received: by mail-ej1-f53.google.com with SMTP id i14so12725569ejr.9; Sat, 27 Jun 2020 16:32:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=CMuUinqPsKvSK6hR9nIuD25ZtKSSEltOvjpgnmT54+0=; b=E2xSpcU07bPdVK76TKSy0MWz8bXDCrAR/ihL9IGzhand9yZLMlhPfD5wep0tgzzPhw 6Rv5GlnWzoe9USIo3s8gQ1yR86trL433As1a4iEalxQ7wJLBM/rFnkt+1K+hgmGidnP9 LrD09OUDC5Z122X4njF6WIK/5n0hUwMjWNeeSSD5iR1/cn3wawhfB6Vs2/9Ca8x1r1iA URlkSmK7sNV0O8MIPPjqEHZCXCDFFuAOcjY+NyC+/CpzBXLZCWvSkWMOsg4umPT6No3S 3Ik8zmlwKYowGfdaOmNMEz2J/Nsxw2rmFpFRnhaqQPfyBVVwWiflvjqHVLNgzfNBsyDq Dh/w== X-Gm-Message-State: AOAM5320vfpj72RfVTpf7WuAd0kSoCowyxBfzfngXCBqvuIDoQQmB7cY zqhRSGvesFOcM7gj16PsqeM7aUWE X-Google-Smtp-Source: ABdhPJwfVwrMFp8RYCMnFnbv7DMh++Kk9BrizaNesRIMXbgR2LrWmJYe+vKcPQ4BzEzS/aWZ3HWrdA== X-Received: by 2002:a17:906:1499:: with SMTP id x25mr8112808ejc.406.1593300772906; Sat, 27 Jun 2020 16:32:52 -0700 (PDT) Received: from ?IPv6:2a02:8109:98c0:1bc0:5e5f:67ff:fef4:ffd8? ([2a02:8109:98c0:1bc0:5e5f:67ff:fef4:ffd8]) by smtp.gmail.com with ESMTPSA id q24sm19651624edg.51.2020.06.27.16.32.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 27 Jun 2020 16:32:52 -0700 (PDT) Subject: Re: svn commit: r362710 - stable/11/usr.bin/sed/tests To: Kyle Evans Cc: src-committers , svn-src-all , svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org References: <202006272251.05RMpGxH086999@repo.freebsd.org> From: Mateusz Piotrowski <0mp@FreeBSD.org> Message-ID: <1c896bbe-7a85-bc76-5163-cf83a0c39b8e@FreeBSD.org> Date: Sun, 28 Jun 2020 01:32:47 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Rspamd-Queue-Id: 49vVRV3x28z4bqG X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of mpp302@gmail.com designates 209.85.218.53 as permitted sender) smtp.mailfrom=mpp302@gmail.com X-Spamd-Result: default: False [-1.94 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[FreeBSD.org]; NEURAL_HAM_LONG(-0.80)[-0.801]; RWL_MAILSPIKE_GOOD(0.00)[209.85.218.53:from]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[3]; NEURAL_HAM_MEDIUM(-0.90)[-0.902]; NEURAL_HAM_SHORT(-0.24)[-0.236]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.218.53:from]; FORGED_SENDER(0.30)[0mp@FreeBSD.org,mpp302@gmail.com]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[0mp@FreeBSD.org,mpp302@gmail.com]; FREEMAIL_ENVFROM(0.00)[gmail.com] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jun 2020 23:32:55 -0000 On 6/28/20 1:28 AM, Kyle Evans wrote: > (sorry, still on mobile) > > Please restore escape_subst...as per my last email, it was only hex_subst that needed to go away. > The former was already there. > > On Sat, Jun 27, 2020, 17:51 Mateusz Piotrowski <0mp@freebsd.org > wrote: > > Author: 0mp (doc,ports committer) > Date: Sat Jun 27 22:51:15 2020 > New Revision: 362710 > URL: https://svnweb.freebsd.org/changeset/base/362710 > > Log: >   Disable mismerged tests committed in r362687 > >   Reported by:  lwhsu > > Modified: >   stable/11/usr.bin/sed/tests/sed2_test.sh > > Modified: stable/11/usr.bin/sed/tests/sed2_test.sh > ============================================================================== > --- stable/11/usr.bin/sed/tests/sed2_test.sh    Sat Jun 27 21:37:48 2020        (r362709) > +++ stable/11/usr.bin/sed/tests/sed2_test.sh    Sat Jun 27 22:51:15 2020        (r362710) > @@ -92,7 +92,5 @@ atf_init_test_cases() >         atf_add_test_case inplace_command_q >         atf_add_test_case inplace_hardlink_src >         atf_add_test_case inplace_symlink_src > -       atf_add_test_case escape_subst >         atf_add_test_case commands_on_stdin > -       atf_add_test_case hex_subst >  } > I've tested the change and atf_add_test_case escape_subst was also failing... Would you like me to bring back escape_subst?