From owner-svn-src-stable@freebsd.org Sun Aug 26 04:32:53 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BC87210A195F; Sun, 26 Aug 2018 04:32:53 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 634E470055; Sun, 26 Aug 2018 04:32:53 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 23D9A1D74; Sun, 26 Aug 2018 04:32:53 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7Q4WrHh080426; Sun, 26 Aug 2018 04:32:53 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7Q4WrQF080425; Sun, 26 Aug 2018 04:32:53 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201808260432.w7Q4WrQF080425@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Sun, 26 Aug 2018 04:32:53 +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: r338322 - stable/11/release X-SVN-Group: stable-11 X-SVN-Commit-Author: cperciva X-SVN-Commit-Paths: stable/11/release X-SVN-Commit-Revision: 338322 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.27 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, 26 Aug 2018 04:32:54 -0000 Author: cperciva Date: Sun Aug 26 04:32:52 2018 New Revision: 338322 URL: https://svnweb.freebsd.org/changeset/base/338322 Log: MFC r336420,336433,336593,336621,336622,336624,337394,337401,338141 Teach the EC2 AMI upload code to: * Mark EBS snapshots as public, * Announce new AMIs to an SNS topic, and * Place the SVN branch and revision into the AMI "description". Modified: stable/11/release/Makefile.ec2 Directory Properties: stable/11/ (props changed) Modified: stable/11/release/Makefile.ec2 ============================================================================== --- stable/11/release/Makefile.ec2 Sun Aug 26 03:56:54 2018 (r338321) +++ stable/11/release/Makefile.ec2 Sun Aug 26 04:32:52 2018 (r338322) @@ -5,12 +5,43 @@ # Makefile for creating an EC2 AMI from a disk image. # +# Figure out where SVN is +.if !defined(SVN_CMD) || empty(SVN_CMD) +. for _P in /usr/bin /usr/local/bin +. for _S in svn svnlite +. if exists(${_P}/${_S}) +SVN_CMD= ${_P}/${_S} +. endif +. endfor +. endfor +.endif +.if exists(${SRCTOP}/.svn) +. if empty(EC2_SVNBRANCH) + EC2_SVNBRANCH!= ${SVN_CMD} info --show-item relative-url ${WORLDDIR} 2>/dev/null | sed -e 's/\^\///' +. export EC2_SVNBRANCH +. endif +. if empty(EC2_SVNREV) + EC2_SVNREV!= ${SVN_CMD} info --show-item last-changed-revision ${WORLDDIR} 2>/dev/null || true +. export EC2_SVNREV +. endif +.else +EC2_SVNBRANCH= unknown +EC2_SVNREV= unknown +.endif + .if ${BRANCH} == "CURRENT" || ${BRANCH} == "STABLE" || ${BRANCH} == "PRERELEASE" AMINAMESUFFIX!= date +-%Y-%m-%d .endif -.if defined(EC2PUBLIC) +.if defined(EC2PUBLIC) && !empty(EC2PUBLIC) PUBLISH= --public .endif +.if defined(EC2PUBLICSNAP) && !empty(EC2PUBLICSNAP) +PUBLICSNAP= --publicsnap +.endif +.if defined(EC2SNSTOPIC) && !empty(EC2SNSTOPIC) +EC2SNSREL= ${REVISION}-${BRANCH} +EC2SNSVERS= ${EC2_SVNBRANCH}@${EC2_SVNREV} +.endif CLEANFILES+= ec2ami @@ -51,9 +82,10 @@ ec2ami: cw-ec2 ${CW_EC2_PORTINSTALL} @echo "--------------------------------------------------------------" @false .endif - /usr/local/bin/bsdec2-image-upload ${PUBLISH} --sriov --ena \ + /usr/local/bin/bsdec2-image-upload ${PUBLISH} ${PUBLICSNAP} --sriov --ena \ ${.OBJDIR}/ec2.raw \ "${TYPE} ${REVISION}-${BRANCH}-${TARGET}${AMINAMESUFFIX}" \ - "${TYPE} ${REVISION}-${BRANCH}-${TARGET}" \ - ${AWSREGION} ${AWSBUCKET} ${AWSKEYFILE} + "${TYPE}/${TARGET} ${EC2_SVNBRANCH}@${EC2_SVNREV}" \ + ${AWSREGION} ${AWSBUCKET} ${AWSKEYFILE} \ + ${EC2SNSTOPIC} ${EC2SNSREL} ${EC2SNSVERS} @touch ${.TARGET} From owner-svn-src-stable@freebsd.org Sun Aug 26 05:28:19 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F346910A2800; Sun, 26 Aug 2018 05:28:18 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A9C4371A14; Sun, 26 Aug 2018 05:28:18 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 86FD22577; Sun, 26 Aug 2018 05:28:18 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7Q5SIef006279; Sun, 26 Aug 2018 05:28:18 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7Q5SIvW006278; Sun, 26 Aug 2018 05:28:18 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201808260528.w7Q5SIvW006278@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Sun, 26 Aug 2018 05:28:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r338323 - stable/10/release X-SVN-Group: stable-10 X-SVN-Commit-Author: cperciva X-SVN-Commit-Paths: stable/10/release X-SVN-Commit-Revision: 338323 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.27 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, 26 Aug 2018 05:28:19 -0000 Author: cperciva Date: Sun Aug 26 05:28:17 2018 New Revision: 338323 URL: https://svnweb.freebsd.org/changeset/base/338323 Log: MFC r336420,336433,336593,336621,336622,336624,337394,337401,338141 Teach the EC2 AMI upload code to: * Mark EBS snapshots as public, * Announce new AMIs to an SNS topic, and * Place the SVN branch and revision into the AMI "description". Modified: stable/10/release/Makefile.ec2 Directory Properties: stable/10/ (props changed) Modified: stable/10/release/Makefile.ec2 ============================================================================== --- stable/10/release/Makefile.ec2 Sun Aug 26 04:32:52 2018 (r338322) +++ stable/10/release/Makefile.ec2 Sun Aug 26 05:28:17 2018 (r338323) @@ -5,12 +5,43 @@ # Makefile for creating an EC2 AMI from a disk image. # +# Figure out where SVN is +.if !defined(SVN_CMD) || empty(SVN_CMD) +. for _P in /usr/bin /usr/local/bin +. for _S in svn svnlite +. if exists(${_P}/${_S}) +SVN_CMD= ${_P}/${_S} +. endif +. endfor +. endfor +.endif +.if exists(${SRCTOP}/.svn) +. if empty(EC2_SVNBRANCH) + EC2_SVNBRANCH!= ${SVN_CMD} info --show-item relative-url ${WORLDDIR} 2>/dev/null | sed -e 's/\^\///' +. export EC2_SVNBRANCH +. endif +. if empty(EC2_SVNREV) + EC2_SVNREV!= ${SVN_CMD} info --show-item last-changed-revision ${WORLDDIR} 2>/dev/null || true +. export EC2_SVNREV +. endif +.else +EC2_SVNBRANCH= unknown +EC2_SVNREV= unknown +.endif + .if ${BRANCH} == "CURRENT" || ${BRANCH} == "STABLE" || ${BRANCH} == "PRERELEASE" AMINAMESUFFIX!= date +-%Y-%m-%d .endif -.if defined(EC2PUBLIC) +.if defined(EC2PUBLIC) && !empty(EC2PUBLIC) PUBLISH= --public .endif +.if defined(EC2PUBLICSNAP) && !empty(EC2PUBLICSNAP) +PUBLICSNAP= --publicsnap +.endif +.if defined(EC2SNSTOPIC) && !empty(EC2SNSTOPIC) +EC2SNSREL= ${REVISION}-${BRANCH} +EC2SNSVERS= ${EC2_SVNBRANCH}@${EC2_SVNREV} +.endif CLEANFILES+= ec2ami @@ -51,9 +82,10 @@ ec2ami: cw-ec2 ${CW_EC2_PORTINSTALL} @echo "--------------------------------------------------------------" @false .endif - /usr/local/bin/bsdec2-image-upload ${PUBLISH} \ + /usr/local/bin/bsdec2-image-upload ${PUBLISH} ${PUBLICSNAP} \ ${.OBJDIR}/ec2.raw \ "${TYPE} ${REVISION}-${BRANCH}-${TARGET}${AMINAMESUFFIX}" \ - "${TYPE} ${REVISION}-${BRANCH}-${TARGET}" \ - ${AWSREGION} ${AWSBUCKET} ${AWSKEYFILE} + "${TYPE}/${TARGET} ${EC2_SVNBRANCH}@${EC2_SVNREV}" \ + ${AWSREGION} ${AWSBUCKET} ${AWSKEYFILE} \ + ${EC2SNSTOPIC} ${EC2SNSREL} ${EC2SNSVERS} @touch ${.TARGET} From owner-svn-src-stable@freebsd.org Sun Aug 26 13:03:02 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 473B510762BA; Sun, 26 Aug 2018 13:03:02 +0000 (UTC) (envelope-from avatar@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D9896803AF; Sun, 26 Aug 2018 13:03:01 +0000 (UTC) (envelope-from avatar@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B57FC74E1; Sun, 26 Aug 2018 13:03:01 +0000 (UTC) (envelope-from avatar@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7QD31V2040999; Sun, 26 Aug 2018 13:03:01 GMT (envelope-from avatar@FreeBSD.org) Received: (from avatar@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7QD31SQ040998; Sun, 26 Aug 2018 13:03:01 GMT (envelope-from avatar@FreeBSD.org) Message-Id: <201808261303.w7QD31SQ040998@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avatar set sender to avatar@FreeBSD.org using -f From: Tai-hwa Liang Date: Sun, 26 Aug 2018 13:03:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r338325 - stable/11/sys/dev/sound/pci X-SVN-Group: stable-11 X-SVN-Commit-Author: avatar X-SVN-Commit-Paths: stable/11/sys/dev/sound/pci X-SVN-Commit-Revision: 338325 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.27 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, 26 Aug 2018 13:03:02 -0000 Author: avatar Date: Sun Aug 26 13:03:01 2018 New Revision: 338325 URL: https://svnweb.freebsd.org/changeset/base/338325 Log: MFC r338038: Extending the delay cycles to give the codec more time to pump ADC data across the AC-link. Without this patch, some CS4614 cards will need users to reload the driver manually or the hardware won't be initialised properly. Something like: # kldload snd_csa # kldunload snd_csa # kldload snd_csa Tested with: Terratec SiXPack 5.1+ Modified: stable/11/sys/dev/sound/pci/csa.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/sound/pci/csa.c ============================================================================== --- stable/11/sys/dev/sound/pci/csa.c Sun Aug 26 12:51:46 2018 (r338324) +++ stable/11/sys/dev/sound/pci/csa.c Sun Aug 26 13:03:01 2018 (r338325) @@ -708,7 +708,7 @@ csa_initialize(sc_p scp) * the codec is pumping ADC data across the AC-link. */ acisv = 0; - for (i = 0 ; i < 1000 ; i++) { + for (i = 0 ; i < 2000 ; i++) { /* * First, lets wait a short while to let things settle out a bit, * and to prevent retrying the read too quickly. From owner-svn-src-stable@freebsd.org Sun Aug 26 13:03:59 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E51D61076377; Sun, 26 Aug 2018 13:03:58 +0000 (UTC) (envelope-from avatar@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9842980511; Sun, 26 Aug 2018 13:03:58 +0000 (UTC) (envelope-from avatar@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 795C974EE; Sun, 26 Aug 2018 13:03:58 +0000 (UTC) (envelope-from avatar@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7QD3wtm041092; Sun, 26 Aug 2018 13:03:58 GMT (envelope-from avatar@FreeBSD.org) Received: (from avatar@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7QD3wBv041091; Sun, 26 Aug 2018 13:03:58 GMT (envelope-from avatar@FreeBSD.org) Message-Id: <201808261303.w7QD3wBv041091@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avatar set sender to avatar@FreeBSD.org using -f From: Tai-hwa Liang Date: Sun, 26 Aug 2018 13:03:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r338326 - stable/10/sys/dev/sound/pci X-SVN-Group: stable-10 X-SVN-Commit-Author: avatar X-SVN-Commit-Paths: stable/10/sys/dev/sound/pci X-SVN-Commit-Revision: 338326 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.27 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, 26 Aug 2018 13:03:59 -0000 Author: avatar Date: Sun Aug 26 13:03:58 2018 New Revision: 338326 URL: https://svnweb.freebsd.org/changeset/base/338326 Log: MFC r338038: Extending the delay cycles to give the codec more time to pump ADC data across the AC-link. Without this patch, some CS4614 cards will need users to reload the driver manually or the hardware won't be initialised properly. Something like: # kldload snd_csa # kldunload snd_csa # kldload snd_csa Tested with: Terratec SiXPack 5.1+ Modified: stable/10/sys/dev/sound/pci/csa.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sound/pci/csa.c ============================================================================== --- stable/10/sys/dev/sound/pci/csa.c Sun Aug 26 13:03:01 2018 (r338325) +++ stable/10/sys/dev/sound/pci/csa.c Sun Aug 26 13:03:58 2018 (r338326) @@ -713,7 +713,7 @@ csa_initialize(sc_p scp) * the codec is pumping ADC data across the AC-link. */ acisv = 0; - for (i = 0 ; i < 1000 ; i++) { + for (i = 0 ; i < 2000 ; i++) { /* * First, lets wait a short while to let things settle out a bit, * and to prevent retrying the read too quickly. From owner-svn-src-stable@freebsd.org Sun Aug 26 13:05:13 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A99581076472; Sun, 26 Aug 2018 13:05:13 +0000 (UTC) (envelope-from avatar@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 36D15806B8; Sun, 26 Aug 2018 13:05:13 +0000 (UTC) (envelope-from avatar@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 190CD74F5; Sun, 26 Aug 2018 13:05:13 +0000 (UTC) (envelope-from avatar@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7QD5CfB041203; Sun, 26 Aug 2018 13:05:12 GMT (envelope-from avatar@FreeBSD.org) Received: (from avatar@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7QD5CTJ041202; Sun, 26 Aug 2018 13:05:12 GMT (envelope-from avatar@FreeBSD.org) Message-Id: <201808261305.w7QD5CTJ041202@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avatar set sender to avatar@FreeBSD.org using -f From: Tai-hwa Liang Date: Sun, 26 Aug 2018 13:05:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r338327 - stable/9/sys/dev/sound/pci X-SVN-Group: stable-9 X-SVN-Commit-Author: avatar X-SVN-Commit-Paths: stable/9/sys/dev/sound/pci X-SVN-Commit-Revision: 338327 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.27 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, 26 Aug 2018 13:05:13 -0000 Author: avatar Date: Sun Aug 26 13:05:12 2018 New Revision: 338327 URL: https://svnweb.freebsd.org/changeset/base/338327 Log: MFC r338038: Extending the delay cycles to give the codec more time to pump ADC data across the AC-link. Without this patch, some CS4614 cards will need users to reload the driver manually or the hardware won't be initialised properly. Something like: # kldload snd_csa # kldunload snd_csa # kldload snd_csa Tested with: Terratec SiXPack 5.1+ Modified: stable/9/sys/dev/sound/pci/csa.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/dev/sound/pci/csa.c ============================================================================== --- stable/9/sys/dev/sound/pci/csa.c Sun Aug 26 13:03:58 2018 (r338326) +++ stable/9/sys/dev/sound/pci/csa.c Sun Aug 26 13:05:12 2018 (r338327) @@ -713,7 +713,7 @@ csa_initialize(sc_p scp) * the codec is pumping ADC data across the AC-link. */ acisv = 0; - for (i = 0 ; i < 1000 ; i++) { + for (i = 0 ; i < 2000 ; i++) { /* * First, lets wait a short while to let things settle out a bit, * and to prevent retrying the read too quickly. From owner-svn-src-stable@freebsd.org Sun Aug 26 13:06:58 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 848E710765CE; Sun, 26 Aug 2018 13:06:58 +0000 (UTC) (envelope-from avatar@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 35B34808C6; Sun, 26 Aug 2018 13:06:58 +0000 (UTC) (envelope-from avatar@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 12BE274F6; Sun, 26 Aug 2018 13:06:58 +0000 (UTC) (envelope-from avatar@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7QD6vuN041330; Sun, 26 Aug 2018 13:06:57 GMT (envelope-from avatar@FreeBSD.org) Received: (from avatar@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7QD6vss041329; Sun, 26 Aug 2018 13:06:57 GMT (envelope-from avatar@FreeBSD.org) Message-Id: <201808261306.w7QD6vss041329@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avatar set sender to avatar@FreeBSD.org using -f From: Tai-hwa Liang Date: Sun, 26 Aug 2018 13:06:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r338328 - stable/8/sys/dev/sound/pci X-SVN-Group: stable-8 X-SVN-Commit-Author: avatar X-SVN-Commit-Paths: stable/8/sys/dev/sound/pci X-SVN-Commit-Revision: 338328 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.27 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, 26 Aug 2018 13:06:58 -0000 Author: avatar Date: Sun Aug 26 13:06:57 2018 New Revision: 338328 URL: https://svnweb.freebsd.org/changeset/base/338328 Log: MFC r338038: Extending the delay cycles to give the codec more time to pump ADC data across the AC-link. Without this patch, some CS4614 cards will need users to reload the driver manually or the hardware won't be initialised properly. Something like: # kldload snd_csa # kldunload snd_csa # kldload snd_csa Tested with: Terratec SiXPack 5.1+ Modified: stable/8/sys/dev/sound/pci/csa.c Directory Properties: stable/8/ (props changed) stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/sound/ (props changed) stable/8/sys/dev/sound/pci/ (props changed) Modified: stable/8/sys/dev/sound/pci/csa.c ============================================================================== --- stable/8/sys/dev/sound/pci/csa.c Sun Aug 26 13:05:12 2018 (r338327) +++ stable/8/sys/dev/sound/pci/csa.c Sun Aug 26 13:06:57 2018 (r338328) @@ -719,7 +719,7 @@ csa_initialize(sc_p scp) * the codec is pumping ADC data across the AC-link. */ acisv = 0; - for (i = 0 ; i < 1000 ; i++) { + for (i = 0 ; i < 2000 ; i++) { /* * First, lets wait a short while to let things settle out a bit, * and to prevent retrying the read too quickly. From owner-svn-src-stable@freebsd.org Sun Aug 26 13:08:51 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 88B5E107672B; Sun, 26 Aug 2018 13:08:51 +0000 (UTC) (envelope-from avatar@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2E11880A7F; Sun, 26 Aug 2018 13:08:51 +0000 (UTC) (envelope-from avatar@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0F39D74FB; Sun, 26 Aug 2018 13:08:51 +0000 (UTC) (envelope-from avatar@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7QD8os0041460; Sun, 26 Aug 2018 13:08:50 GMT (envelope-from avatar@FreeBSD.org) Received: (from avatar@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7QD8oEh041459; Sun, 26 Aug 2018 13:08:50 GMT (envelope-from avatar@FreeBSD.org) Message-Id: <201808261308.w7QD8oEh041459@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avatar set sender to avatar@FreeBSD.org using -f From: Tai-hwa Liang Date: Sun, 26 Aug 2018 13:08:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r338329 - stable/7/sys/dev/sound/pci X-SVN-Group: stable-7 X-SVN-Commit-Author: avatar X-SVN-Commit-Paths: stable/7/sys/dev/sound/pci X-SVN-Commit-Revision: 338329 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.27 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, 26 Aug 2018 13:08:51 -0000 Author: avatar Date: Sun Aug 26 13:08:50 2018 New Revision: 338329 URL: https://svnweb.freebsd.org/changeset/base/338329 Log: MFC r338038: Extending the delay cycles to give the codec more time to pump ADC data across the AC-link. Without this patch, some CS4614 cards will need users to reload the driver manually or the hardware won't be initialised properly. Something like: # kldload snd_csa # kldunload snd_csa # kldload snd_csa Tested with: Terratec SiXPack 5.1+ Modified: stable/7/sys/dev/sound/pci/csa.c Directory Properties: stable/7/ (props changed) stable/7/sys/ (props changed) Modified: stable/7/sys/dev/sound/pci/csa.c ============================================================================== --- stable/7/sys/dev/sound/pci/csa.c Sun Aug 26 13:06:57 2018 (r338328) +++ stable/7/sys/dev/sound/pci/csa.c Sun Aug 26 13:08:50 2018 (r338329) @@ -713,7 +713,7 @@ csa_initialize(sc_p scp) * the codec is pumping ADC data across the AC-link. */ acisv = 0; - for (i = 0 ; i < 1000 ; i++) { + for (i = 0 ; i < 2000 ; i++) { /* * First, lets wait a short while to let things settle out a bit, * and to prevent retrying the read too quickly. From owner-svn-src-stable@freebsd.org Mon Aug 27 03:32:41 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0EE7E108AEF0; Mon, 27 Aug 2018 03:32:41 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AECF17BE0F; Mon, 27 Aug 2018 03:32:40 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8C8061832E; Mon, 27 Aug 2018 03:32:40 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7R3Wepw088819; Mon, 27 Aug 2018 03:32:40 GMT (envelope-from lidl@FreeBSD.org) Received: (from lidl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7R3WeRr088818; Mon, 27 Aug 2018 03:32:40 GMT (envelope-from lidl@FreeBSD.org) Message-Id: <201808270332.w7R3WeRr088818@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lidl set sender to lidl@FreeBSD.org using -f From: Kurt Lidl Date: Mon, 27 Aug 2018 03:32:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r338332 - stable/11/stand/sparc64/loader X-SVN-Group: stable-11 X-SVN-Commit-Author: lidl X-SVN-Commit-Paths: stable/11/stand/sparc64/loader X-SVN-Commit-Revision: 338332 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.27 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, 27 Aug 2018 03:32:41 -0000 Author: lidl Date: Mon Aug 27 03:32:40 2018 New Revision: 338332 URL: https://svnweb.freebsd.org/changeset/base/338332 Log: MFC r338201: increase heap size during "loader" on sparc64 Increase the size of the heap size available on sparc64 during operation of "loader". The dramatic increase in size of SPA_MAXBLOCKSIZE in r304321 causes the heap space to be exhausted, so malloc() fails, ultimately leading to a memcpy() with a destination of 0x0. Modified: stable/11/stand/sparc64/loader/main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/stand/sparc64/loader/main.c ============================================================================== --- stable/11/stand/sparc64/loader/main.c Sun Aug 26 18:04:54 2018 (r338331) +++ stable/11/stand/sparc64/loader/main.c Mon Aug 27 03:32:40 2018 (r338332) @@ -79,7 +79,7 @@ extern char bootprog_info[]; enum { HEAPVA = 0x800000, - HEAPSZ = 0x1000000, + HEAPSZ = 0x3000000, LOADSZ = 0x1000000 /* for kernel and modules */ }; From owner-svn-src-stable@freebsd.org Mon Aug 27 03:42:20 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3D29108B1C3; Mon, 27 Aug 2018 03:42:20 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 88C5F7C312; Mon, 27 Aug 2018 03:42:20 +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 69E4D184B2; Mon, 27 Aug 2018 03:42:20 +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 w7R3gKu2093698; Mon, 27 Aug 2018 03:42:20 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7R3gKso093697; Mon, 27 Aug 2018 03:42:20 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201808270342.w7R3gKso093697@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 27 Aug 2018 03:42: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: r338333 - stable/11/sys/netgraph X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/netgraph X-SVN-Commit-Revision: 338333 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.27 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, 27 Aug 2018 03:42:21 -0000 Author: mav Date: Mon Aug 27 03:42:19 2018 New Revision: 338333 URL: https://svnweb.freebsd.org/changeset/base/338333 Log: MFC r338105: Remove extra M_ZERO from NG_MKRESPONSE() argument. NG_MKRESPONSE() sets M_ZERO by itself. Submitted by: Dmitry Luhtionov Modified: stable/11/sys/netgraph/ng_base.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netgraph/ng_base.c ============================================================================== --- stable/11/sys/netgraph/ng_base.c Mon Aug 27 03:32:40 2018 (r338332) +++ stable/11/sys/netgraph/ng_base.c Mon Aug 27 03:42:19 2018 (r338333) @@ -2665,7 +2665,7 @@ ng_generic_msg(node_p here, item_p item, hook_p lastho IDHASH_RLOCK(); /* Get response struct. */ NG_MKRESPONSE(resp, msg, sizeof(*nl) + - (V_ng_nodes * sizeof(struct nodeinfo)), M_NOWAIT | M_ZERO); + (V_ng_nodes * sizeof(struct nodeinfo)), M_NOWAIT); if (resp == NULL) { IDHASH_RUNLOCK(); error = ENOMEM; From owner-svn-src-stable@freebsd.org Mon Aug 27 07:32:42 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 976C1108F89D; Mon, 27 Aug 2018 07:32:42 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 44E7E827BB; Mon, 27 Aug 2018 07:32:42 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 24D9A1A9FB; Mon, 27 Aug 2018 07:32:42 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7R7Wgqs010909; Mon, 27 Aug 2018 07:32:42 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7R7WgjN010908; Mon, 27 Aug 2018 07:32:42 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201808270732.w7R7WgjN010908@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Mon, 27 Aug 2018 07:32:42 +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: r338334 - stable/11/usr.sbin/newsyslog X-SVN-Group: stable-11 X-SVN-Commit-Author: ed X-SVN-Commit-Paths: stable/11/usr.sbin/newsyslog X-SVN-Commit-Revision: 338334 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.27 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, 27 Aug 2018 07:32:42 -0000 Author: ed Date: Mon Aug 27 07:32:41 2018 New Revision: 338334 URL: https://svnweb.freebsd.org/changeset/base/338334 Log: MFC r336086: Use the FQDN in the newsyslog log message when RFC 5424 is enabled. The RFC 5424 spec mentions that logging FQDNs over short hostnames is preferred. Alter this code, so that the hostname doesn't get truncated on startup. Keep track of the length of the short hostname, so that fprintf() can do the truncation where necessary. Modified: stable/11/usr.sbin/newsyslog/newsyslog.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/newsyslog/newsyslog.c ============================================================================== --- stable/11/usr.sbin/newsyslog/newsyslog.c Mon Aug 27 03:42:19 2018 (r338333) +++ stable/11/usr.sbin/newsyslog/newsyslog.c Mon Aug 27 07:32:41 2018 (r338334) @@ -254,6 +254,7 @@ static char daytime[DAYTIME_LEN];/* The current time i static char daytime_rfc5424[DAYTIME_RFC5424_LEN]; static char hostname[MAXHOSTNAMELEN]; /* hostname */ +static size_t hostname_shortlen; static const char *path_syslogpid = _PATH_SYSLOGPID; @@ -640,11 +641,8 @@ parse_args(int argc, char **argv) /* Let's get our hostname */ (void)gethostname(hostname, sizeof(hostname)); + hostname_shortlen = strcspn(hostname, "."); - /* Truncate domain */ - if ((p = strchr(hostname, '.')) != NULL) - *p = '\0'; - /* Parse command line options. */ while ((ch = getopt(argc, argv, "a:d:f:nrst:vCD:FNPR:S:")) != -1) switch (ch) { @@ -2298,14 +2296,20 @@ log_trim(const char *logname, const struct conf_entry } } else { if (log_ent->firstcreate) - fprintf(f, "%s %s newsyslog[%d]: logfile first created%s\n", - daytime, hostname, getpid(), xtra); + fprintf(f, + "%s %.*s newsyslog[%d]: logfile first created%s\n", + daytime, (int)hostname_shortlen, hostname, getpid(), + xtra); else if (log_ent->r_reason != NULL) - fprintf(f, "%s %s newsyslog[%d]: logfile turned over%s%s\n", - daytime, hostname, getpid(), log_ent->r_reason, xtra); + fprintf(f, + "%s %.*s newsyslog[%d]: logfile turned over%s%s\n", + daytime, (int)hostname_shortlen, hostname, getpid(), + log_ent->r_reason, xtra); else - fprintf(f, "%s %s newsyslog[%d]: logfile turned over%s\n", - daytime, hostname, getpid(), xtra); + fprintf(f, + "%s %.*s newsyslog[%d]: logfile turned over%s\n", + daytime, (int)hostname_shortlen, hostname, getpid(), + xtra); } if (fclose(f) == EOF) err(1, "log_trim: fclose"); From owner-svn-src-stable@freebsd.org Mon Aug 27 09:39:35 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A31F61081F7E; Mon, 27 Aug 2018 09:39: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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 598188673C; Mon, 27 Aug 2018 09:39: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 22A1C1BD72; Mon, 27 Aug 2018 09:39: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 w7R9dYvD073644; Mon, 27 Aug 2018 09:39:34 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7R9dYJb073643; Mon, 27 Aug 2018 09:39:34 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201808270939.w7R9dYJb073643@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 27 Aug 2018 09:39: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: r338335 - stable/11/sys/vm X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/vm X-SVN-Commit-Revision: 338335 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.27 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, 27 Aug 2018 09:39:35 -0000 Author: kib Date: Mon Aug 27 09:39:34 2018 New Revision: 338335 URL: https://svnweb.freebsd.org/changeset/base/338335 Log: MFC r337714: Prevent some parallel swap-ins, rate-limit swapper swap-ins. Modified: stable/11/sys/vm/vm_swapout.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/vm_swapout.c ============================================================================== --- stable/11/sys/vm/vm_swapout.c Mon Aug 27 07:32:41 2018 (r338334) +++ stable/11/sys/vm/vm_swapout.c Mon Aug 27 09:39:34 2018 (r338335) @@ -157,6 +157,8 @@ static struct mtx vm_daemon_mtx; MTX_SYSINIT(vm_daemon, &vm_daemon_mtx, "vm daemon", MTX_DEF); static int swapped_cnt; +static int swap_inprogress; /* Pending swap-ins done outside swapper. */ +static int last_swapin; static void swapclear(struct proc *); static int swapout(struct proc *); @@ -625,6 +627,8 @@ faultin(struct proc *p) sx_xlock(&allproc_lock); MPASS(swapped_cnt > 0); swapped_cnt--; + if (curthread != &thread0) + swap_inprogress++; sx_xunlock(&allproc_lock); /* @@ -635,6 +639,13 @@ faultin(struct proc *p) FOREACH_THREAD_IN_PROC(p, td) vm_thread_swapin(td, oom_alloc); + if (curthread != &thread0) { + sx_xlock(&allproc_lock); + MPASS(swap_inprogress > 0); + swap_inprogress--; + last_swapin = ticks; + sx_xunlock(&allproc_lock); + } PROC_LOCK(p); swapclear(p); p->p_swtick = ticks; @@ -652,18 +663,17 @@ faultin(struct proc *p) */ static struct proc * -swapper_selector(void) +swapper_selector(bool wkilled_only) { struct proc *p, *res; struct thread *td; - int min_flag, ppri, pri, slptime, swtime; + int ppri, pri, slptime, swtime; sx_assert(&allproc_lock, SA_SLOCKED); if (swapped_cnt == 0) return (NULL); res = NULL; ppri = INT_MIN; - min_flag = vm_page_count_min(); FOREACH_PROC_IN_SYSTEM(p) { PROC_LOCK(p); if (p->p_state == PRS_NEW || (p->p_flag & (P_SWAPPINGOUT | @@ -681,7 +691,7 @@ swapper_selector(void) */ return (p); } - if (min_flag) { + if (wkilled_only) { PROC_UNLOCK(p); continue; } @@ -712,11 +722,29 @@ swapper_selector(void) } PROC_UNLOCK(p); } + if (res != NULL) PROC_LOCK(res); return (res); } +#define SWAPIN_INTERVAL (MAXSLP * hz / 2) + +/* + * Limit swapper to swap in one non-WKILLED process in MAXSLP/2 + * interval, assuming that there is: + * - no memory shortage; + * - no parallel swap-ins; + * - no other swap-ins in the current SWAPIN_INTERVAL. + */ +static bool +swapper_wkilled_only(void) +{ + + return (vm_page_count_min() || swap_inprogress > 0 || + (u_int)(ticks - last_swapin) < SWAPIN_INTERVAL); +} + void swapper(void) { @@ -724,11 +752,11 @@ swapper(void) for (;;) { sx_slock(&allproc_lock); - p = swapper_selector(); + p = swapper_selector(swapper_wkilled_only()); sx_sunlock(&allproc_lock); if (p == NULL) { - tsleep(&proc0, PVM, "swapin", MAXSLP * hz / 2); + tsleep(&proc0, PVM, "swapin", SWAPIN_INTERVAL); } else { PROC_LOCK_ASSERT(p, MA_OWNED); From owner-svn-src-stable@freebsd.org Tue Aug 28 07:24:11 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0286410822B6; Tue, 28 Aug 2018 07:24:10 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9ED8576EF8; Tue, 28 Aug 2018 07:24:10 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7FAAF17C6; Tue, 28 Aug 2018 07:24:10 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7S7OAaZ054724; Tue, 28 Aug 2018 07:24:10 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7S7OA3Y054722; Tue, 28 Aug 2018 07:24:10 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201808280724.w7S7OA3Y054722@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 28 Aug 2018 07:24:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r338343 - in stable/11/sys: netinet netinet6 X-SVN-Group: stable-11 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: in stable/11/sys: netinet netinet6 X-SVN-Commit-Revision: 338343 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.27 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, 28 Aug 2018 07:24:11 -0000 Author: ae Date: Tue Aug 28 07:24:09 2018 New Revision: 338343 URL: https://svnweb.freebsd.org/changeset/base/338343 Log: MFC r337736: Restore ability to send ICMP and ICMPv6 redirects. It was lost when tryforward appeared. Now ip[6]_tryforward will be enabled only when sending redirects for corresponding IP version is disabled via sysctl. Otherwise will be used default forwarding function. PR: 221137 Modified: stable/11/sys/netinet/ip_input.c stable/11/sys/netinet6/ip6_input.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/ip_input.c ============================================================================== --- stable/11/sys/netinet/ip_input.c Mon Aug 27 19:34:50 2018 (r338342) +++ stable/11/sys/netinet/ip_input.c Tue Aug 28 07:24:09 2018 (r338343) @@ -555,13 +555,15 @@ tooshort: /* * Try to forward the packet, but if we fail continue. + * ip_tryforward() does not generate redirects, so fall + * through to normal processing if redirects are required. * ip_tryforward() does inbound and outbound packet firewall * processing. If firewall has decided that destination becomes * our local address, it sets M_FASTFWD_OURS flag. In this * case skip another inbound firewall processing and update * ip pointer. */ - if (V_ipforwarding != 0 + if (V_ipforwarding != 0 && V_ipsendredirects == 0 #if defined(IPSEC) || defined(IPSEC_SUPPORT) && (!IPSEC_ENABLED(ipv4) || IPSEC_CAPS(ipv4, m, IPSEC_CAP_OPERABLE) == 0) Modified: stable/11/sys/netinet6/ip6_input.c ============================================================================== --- stable/11/sys/netinet6/ip6_input.c Mon Aug 27 19:34:50 2018 (r338342) +++ stable/11/sys/netinet6/ip6_input.c Tue Aug 28 07:24:09 2018 (r338343) @@ -718,13 +718,15 @@ ip6_input(struct mbuf *m) #endif /* * Try to forward the packet, but if we fail continue. + * ip6_tryforward() does not generate redirects, so fall + * through to normal processing if redirects are required. * ip6_tryforward() does inbound and outbound packet firewall * processing. If firewall has decided that destination becomes * our local address, it sets M_FASTFWD_OURS flag. In this * case skip another inbound firewall processing and update * ip6 pointer. */ - if (V_ip6_forwarding != 0 + if (V_ip6_forwarding != 0 && V_ip6_sendredirects == 0 #if defined(IPSEC) || defined(IPSEC_SUPPORT) && (!IPSEC_ENABLED(ipv6) || IPSEC_CAPS(ipv6, m, IPSEC_CAP_OPERABLE) == 0) From owner-svn-src-stable@freebsd.org Tue Aug 28 14:33:05 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 36744108E282; Tue, 28 Aug 2018 14:33:05 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D584F86A39; Tue, 28 Aug 2018 14:33:04 +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 B3D35621B; Tue, 28 Aug 2018 14:33:04 +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 w7SEX4b0080566; Tue, 28 Aug 2018 14:33:04 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7SEX4VK080565; Tue, 28 Aug 2018 14:33:04 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201808281433.w7SEX4VK080565@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 28 Aug 2018 14:33:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r338346 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 338346 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.27 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, 28 Aug 2018 14:33:05 -0000 Author: markj Date: Tue Aug 28 14:33:04 2018 New Revision: 338346 URL: https://svnweb.freebsd.org/changeset/base/338346 Log: MFC r338142: Set arc_kmem_cache_reap_retry_ms to 0 and make it configurable. Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Aug 28 10:48:41 2018 (r338345) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Aug 28 14:33:04 2018 (r338346) @@ -312,7 +312,7 @@ int zfs_arc_evict_batch_limit = 10; static int arc_grow_retry = 60; /* number of milliseconds before attempting a kmem-cache-reap */ -static int arc_kmem_cache_reap_retry_ms = 1000; +static int arc_kmem_cache_reap_retry_ms = 0; /* shift of arc_c for calculating overflow limit in arc_get_data_impl */ int zfs_arc_overflow_shift = 8; @@ -417,7 +417,11 @@ SYSCTL_INT(_vfs_zfs, OID_AUTO, arc_grow_retry, CTLFLAG &arc_grow_retry, 0, "Wait in seconds before considering growing ARC"); SYSCTL_INT(_vfs_zfs, OID_AUTO, compressed_arc_enabled, CTLFLAG_RDTUN, - &zfs_compressed_arc_enabled, 0, "Enable compressed ARC"); + &zfs_compressed_arc_enabled, 0, + "Enable compressed ARC"); +SYSCTL_INT(_vfs_zfs, OID_AUTO, arc_kmem_cache_reap_retry_ms, CTLFLAG_RWTUN, + &arc_kmem_cache_reap_retry_ms, 0, + "Interval between ARC kmem_cache reapings"); /* * We don't have a tunable for arc_free_target due to the dependency on From owner-svn-src-stable@freebsd.org Wed Aug 29 02:18:16 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0747B109E005; Wed, 29 Aug 2018 02:18:16 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A4E1A771B7; Wed, 29 Aug 2018 02:18:15 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7FA0E16E20; Wed, 29 Aug 2018 02:18:15 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7T2IFNr045256; Wed, 29 Aug 2018 02:18:15 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7T2IDFt045248; Wed, 29 Aug 2018 02:18:13 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201808290218.w7T2IDFt045248@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 29 Aug 2018 02:18:13 +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: r338364 - stable/11/bin/dd X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/11/bin/dd X-SVN-Commit-Revision: 338364 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.27 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, 29 Aug 2018 02:18:16 -0000 Author: kevans Date: Wed Aug 29 02:18:13 2018 New Revision: 338364 URL: https://svnweb.freebsd.org/changeset/base/338364 Log: MFC r337505, r337865, r337869: dd status=progress r337505: dd: add status=progress support This reports the current status on a single line every second, mirroring similar functionality in GNU dd, and carefully interacts with SIGINFO. PR: 229615 r337865: dd: Incorporate some changes from imp for status=progress Notable changes from what landed in r337505: - sigalarm handler isn't setup unless we're actually using it - Humanized versions of the amount of data transferred in the progress update r337869: dd(1): Kill off duplicate progress definition following r337865 Modified: stable/11/bin/dd/Makefile stable/11/bin/dd/args.c stable/11/bin/dd/dd.1 stable/11/bin/dd/dd.c stable/11/bin/dd/dd.h stable/11/bin/dd/extern.h stable/11/bin/dd/misc.c stable/11/bin/dd/position.c Directory Properties: stable/11/ (props changed) Modified: stable/11/bin/dd/Makefile ============================================================================== --- stable/11/bin/dd/Makefile Tue Aug 28 23:56:52 2018 (r338363) +++ stable/11/bin/dd/Makefile Wed Aug 29 02:18:13 2018 (r338364) @@ -6,6 +6,7 @@ PACKAGE=runtime PROG= dd SRCS= args.c conv.c conv_tab.c dd.c misc.c position.c +LIBADD= util # # Test the character conversion functions. We have to be explicit about Modified: stable/11/bin/dd/args.c ============================================================================== --- stable/11/bin/dd/args.c Tue Aug 28 23:56:52 2018 (r338363) +++ stable/11/bin/dd/args.c Wed Aug 29 02:18:13 2018 (r338364) @@ -303,6 +303,8 @@ f_status(char *arg) ddflags |= C_NOINFO; else if (strcmp(arg, "noxfer") == 0) ddflags |= C_NOXFER; + else if (strcmp(arg, "progress") == 0) + ddflags |= C_PROGRESS; else errx(1, "unknown status %s", arg); } Modified: stable/11/bin/dd/dd.1 ============================================================================== --- stable/11/bin/dd/dd.1 Tue Aug 28 23:56:52 2018 (r338363) +++ stable/11/bin/dd/dd.1 Wed Aug 29 02:18:13 2018 (r338364) @@ -32,7 +32,7 @@ .\" @(#)dd.1 8.2 (Berkeley) 1/13/94 .\" $FreeBSD$ .\" -.Dd April 2, 2017 +.Dd August 8, 2018 .Dt DD 1 .Os .Sh NAME @@ -164,12 +164,14 @@ bytes per second. Where .Cm value is one of the symbols from the following list. -.Bl -tag -width "noxfer" +.Bl -tag -width "progress" .It Cm noxfer Do not print the transfer statistics as the last line of status output. .It Cm none Do not print the status output. Error messages are shown; informational messages are not. +.It Cm progress +Print basic transfer statistics once per second. .El .It Cm conv Ns = Ns Ar value Ns Op , Ns Ar value ... Where Modified: stable/11/bin/dd/dd.c ============================================================================== --- stable/11/bin/dd/dd.c Tue Aug 28 23:56:52 2018 (r338363) +++ stable/11/bin/dd/dd.c Wed Aug 29 02:18:13 2018 (r338364) @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -84,15 +85,22 @@ const u_char *ctab; /* conversion table */ char fill_char; /* Character to fill with if defined */ size_t speed = 0; /* maximum speed, in bytes per second */ volatile sig_atomic_t need_summary; +volatile sig_atomic_t need_progress; int main(int argc __unused, char *argv[]) { + struct itimerval itv = { { 1, 0 }, { 1, 0 } }; /* SIGALARM every second, if needed */ + (void)setlocale(LC_CTYPE, ""); jcl(argv); setup(); (void)signal(SIGINFO, siginfo_handler); + if (ddflags & C_PROGRESS) { + (void)signal(SIGALRM, sigalarm_handler); + setitimer(ITIMER_REAL, &itv, NULL); + } (void)signal(SIGINT, terminate); atexit(summary); @@ -420,9 +428,10 @@ dd_in(void) in.dbp += in.dbrcnt; (*cfunc)(); - if (need_summary) { + if (need_summary) summary(); - } + if (need_progress) + progress(); } } Modified: stable/11/bin/dd/dd.h ============================================================================== --- stable/11/bin/dd/dd.h Tue Aug 28 23:56:52 2018 (r338363) +++ stable/11/bin/dd/dd.h Wed Aug 29 02:18:13 2018 (r338364) @@ -99,5 +99,6 @@ typedef struct { #define C_STATUS 0x08000000 #define C_NOXFER 0x10000000 #define C_NOINFO 0x20000000 +#define C_PROGRESS 0x40000000 #define C_PARITY (C_PAREVEN | C_PARODD | C_PARNONE | C_PARSET) Modified: stable/11/bin/dd/extern.h ============================================================================== --- stable/11/bin/dd/extern.h Tue Aug 28 23:56:52 2018 (r338363) +++ stable/11/bin/dd/extern.h Wed Aug 29 02:18:13 2018 (r338364) @@ -43,7 +43,9 @@ void jcl(char **); void pos_in(void); void pos_out(void); double secs_elapsed(void); +void progress(void); void summary(void); +void sigalarm_handler(int); void siginfo_handler(int); void terminate(int); void unblock(void); @@ -64,3 +66,4 @@ extern const u_char a2ibm_32V[], a2ibm_POSIX[]; extern u_char casetab[]; extern char fill_char; extern volatile sig_atomic_t need_summary; +extern volatile sig_atomic_t need_progress; Modified: stable/11/bin/dd/misc.c ============================================================================== --- stable/11/bin/dd/misc.c Tue Aug 28 23:56:52 2018 (r338363) +++ stable/11/bin/dd/misc.c Wed Aug 29 02:18:13 2018 (r338364) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -81,6 +82,9 @@ summary(void) if (ddflags & C_NOINFO) return; + if (ddflags & C_PROGRESS) + fprintf(stderr, "\n"); + secs = secs_elapsed(); (void)fprintf(stderr, @@ -100,12 +104,45 @@ summary(void) need_summary = 0; } +void +progress(void) +{ + static int outlen; + char si[4 + 1 + 2 + 1]; /* 123 NUL */ + char iec[4 + 1 + 2 + 1]; /* 123 NUL */ + char persec[4 + 1 + 2 + 1]; /* 123 NUL */ + char *buf; + double secs; + + secs = secs_elapsed(); + humanize_number(si, sizeof(si), (int64_t)st.bytes, "B", HN_AUTOSCALE, + HN_DECIMAL | HN_DIVISOR_1000); + humanize_number(iec, sizeof(iec), (int64_t)st.bytes, "B", HN_AUTOSCALE, + HN_DECIMAL | HN_IEC_PREFIXES); + humanize_number(persec, sizeof(iec), (int64_t)(st.bytes / secs), "B", + HN_AUTOSCALE, HN_DECIMAL | HN_DIVISOR_1000); + asprintf(&buf, " %'ju bytes (%s, %s) transferred %.3fs, %s/s", + (uintmax_t)st.bytes, si, iec, secs, persec); + outlen = fprintf(stderr, "%-*s\r", outlen, buf); + fflush(stderr); + free(buf); + need_progress = 0; +} + /* ARGSUSED */ void siginfo_handler(int signo __unused) { need_summary = 1; +} + +/* ARGSUSED */ +void +sigalarm_handler(int signo __unused) +{ + + need_progress = 1; } /* ARGSUSED */ Modified: stable/11/bin/dd/position.c ============================================================================== --- stable/11/bin/dd/position.c Tue Aug 28 23:56:52 2018 (r338363) +++ stable/11/bin/dd/position.c Wed Aug 29 02:18:13 2018 (r338364) @@ -123,6 +123,8 @@ pos_in(void) --cnt; if (need_summary) summary(); + if (need_progress) + progress(); continue; } From owner-svn-src-stable@freebsd.org Wed Aug 29 08:35:24 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2E4121081A21; Wed, 29 Aug 2018 08:35:24 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D863082750; Wed, 29 Aug 2018 08:35:23 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B5EB81ACB8; Wed, 29 Aug 2018 08:35:23 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7T8ZNvN040195; Wed, 29 Aug 2018 08:35:23 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7T8ZNBK040194; Wed, 29 Aug 2018 08:35:23 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201808290835.w7T8ZNBK040194@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Wed, 29 Aug 2018 08:35:23 +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: r338369 - stable/11/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: oshogbo X-SVN-Commit-Paths: stable/11/sys/kern X-SVN-Commit-Revision: 338369 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.27 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, 29 Aug 2018 08:35:24 -0000 Author: oshogbo Date: Wed Aug 29 08:35:23 2018 New Revision: 338369 URL: https://svnweb.freebsd.org/changeset/base/338369 Log: MFC r337965: capsicum: allow the setproctitle(3) function in capability mode Capsicum in past allowed to change the process title. This was broken with r335939. PR: 230584 Submitted by: Yuichiro NAITO Reported by: ian@niw.com.au MFC after: 1 week Modified: stable/11/sys/kern/kern_exec.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_exec.c ============================================================================== --- stable/11/sys/kern/kern_exec.c Wed Aug 29 06:49:12 2018 (r338368) +++ stable/11/sys/kern/kern_exec.c Wed Aug 29 08:35:23 2018 (r338369) @@ -121,7 +121,7 @@ static int do_execve(struct thread *td, struct image_a /* XXX This should be vm_size_t. */ SYSCTL_PROC(_kern, KERN_PS_STRINGS, ps_strings, CTLTYPE_ULONG|CTLFLAG_RD| - CTLFLAG_MPSAFE, NULL, 0, sysctl_kern_ps_strings, "LU", ""); + CTLFLAG_CAPRD|CTLFLAG_MPSAFE, NULL, 0, sysctl_kern_ps_strings, "LU", ""); /* XXX This should be vm_size_t. */ SYSCTL_PROC(_kern, KERN_USRSTACK, usrstack, CTLTYPE_ULONG|CTLFLAG_RD| From owner-svn-src-stable@freebsd.org Wed Aug 29 17:50:28 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5E7CC1090B09; Wed, 29 Aug 2018 17:50:28 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 168D376B4E; Wed, 29 Aug 2018 17:50:28 +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 EAC1320658; Wed, 29 Aug 2018 17:50: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 w7THoRwo022349; Wed, 29 Aug 2018 17:50:27 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7THoRqZ022348; Wed, 29 Aug 2018 17:50:27 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201808291750.w7THoRqZ022348@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 29 Aug 2018 17:50: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: r338377 - stable/11/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/11/sys/kern X-SVN-Commit-Revision: 338377 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.27 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, 29 Aug 2018 17:50:28 -0000 Author: markj Date: Wed Aug 29 17:50:27 2018 New Revision: 338377 URL: https://svnweb.freebsd.org/changeset/base/338377 Log: MFC r333280: Style. Modified: stable/11/sys/kern/kern_mbuf.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_mbuf.c ============================================================================== --- stable/11/sys/kern/kern_mbuf.c Wed Aug 29 17:37:23 2018 (r338376) +++ stable/11/sys/kern/kern_mbuf.c Wed Aug 29 17:50:27 2018 (r338377) @@ -687,20 +687,20 @@ mb_free_ext(struct mbuf *m) case EXT_MOD_TYPE: case EXT_DISPOSABLE: KASSERT(m->m_ext.ext_free != NULL, - ("%s: ext_free not set", __func__)); + ("%s: ext_free not set", __func__)); (*(m->m_ext.ext_free))(m, m->m_ext.ext_arg1, m->m_ext.ext_arg2); uma_zfree(zone_mbuf, mref); break; case EXT_EXTREF: KASSERT(m->m_ext.ext_free != NULL, - ("%s: ext_free not set", __func__)); + ("%s: ext_free not set", __func__)); (*(m->m_ext.ext_free))(m, m->m_ext.ext_arg1, m->m_ext.ext_arg2); break; default: KASSERT(m->m_ext.ext_type == 0, - ("%s: unknown ext_type", __func__)); + ("%s: unknown ext_type", __func__)); } } From owner-svn-src-stable@freebsd.org Wed Aug 29 17:58:02 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C2941109136C; Wed, 29 Aug 2018 17:58:02 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7E35E77FC2; Wed, 29 Aug 2018 17:58:02 +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 6010020823; Wed, 29 Aug 2018 17:58:02 +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 w7THw2Ib028071; Wed, 29 Aug 2018 17:58:02 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7THw2Ll028069; Wed, 29 Aug 2018 17:58:02 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201808291758.w7THw2Ll028069@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 29 Aug 2018 17:58:02 +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: r338389 - stable/11/sys/vm X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/11/sys/vm X-SVN-Commit-Revision: 338389 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.27 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, 29 Aug 2018 17:58:02 -0000 Author: markj Date: Wed Aug 29 17:58:01 2018 New Revision: 338389 URL: https://svnweb.freebsd.org/changeset/base/338389 Log: MFC r332968: Add a UMA zone flag to disable the use of buckets. Modified: stable/11/sys/vm/uma.h stable/11/sys/vm/uma_core.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/uma.h ============================================================================== --- stable/11/sys/vm/uma.h Wed Aug 29 17:51:15 2018 (r338388) +++ stable/11/sys/vm/uma.h Wed Aug 29 17:58:01 2018 (r338389) @@ -262,8 +262,8 @@ uma_zone_t uma_zcache_create(char *name, int size, uma * information in the vm_page. */ #define UMA_ZONE_SECONDARY 0x0200 /* Zone is a Secondary Zone */ -/* 0x0400 Unused */ -#define UMA_ZONE_MAXBUCKET 0x0800 /* Use largest buckets */ +#define UMA_ZONE_NOBUCKET 0x0400 /* Do not use buckets. */ +#define UMA_ZONE_MAXBUCKET 0x0800 /* Use largest buckets. */ #define UMA_ZONE_CACHESPREAD 0x1000 /* * Spread memory start locations across * all possible cache lines. May Modified: stable/11/sys/vm/uma_core.c ============================================================================== --- stable/11/sys/vm/uma_core.c Wed Aug 29 17:51:15 2018 (r338388) +++ stable/11/sys/vm/uma_core.c Wed Aug 29 17:58:01 2018 (r338389) @@ -1644,10 +1644,15 @@ zone_ctor(void *mem, int size, void *udata, int flags) } out: - if ((arg->flags & UMA_ZONE_MAXBUCKET) == 0) - zone->uz_count = bucket_select(zone->uz_size); - else + KASSERT((arg->flags & (UMA_ZONE_MAXBUCKET | UMA_ZONE_NOBUCKET)) != + (UMA_ZONE_MAXBUCKET | UMA_ZONE_NOBUCKET), + ("Invalid zone flag combination")); + if ((arg->flags & UMA_ZONE_MAXBUCKET) != 0) zone->uz_count = BUCKET_MAX; + else if ((arg->flags & UMA_ZONE_NOBUCKET) != 0) + zone->uz_count = 0; + else + zone->uz_count = bucket_select(zone->uz_size); zone->uz_count_min = zone->uz_count; return (0); From owner-svn-src-stable@freebsd.org Wed Aug 29 20:49:57 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9EA811095FD1; Wed, 29 Aug 2018 20:49: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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5F456814DE; Wed, 29 Aug 2018 20:49: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 405F0224AC; Wed, 29 Aug 2018 20:49: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 w7TKnvaj021944; Wed, 29 Aug 2018 20:49:57 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7TKnu43021942; Wed, 29 Aug 2018 20:49:56 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201808292049.w7TKnu43021942@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Wed, 29 Aug 2018 20:49:56 +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: r338390 - stable/11/sbin/pfctl X-SVN-Group: stable-11 X-SVN-Commit-Author: kp X-SVN-Commit-Paths: stable/11/sbin/pfctl X-SVN-Commit-Revision: 338390 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.27 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, 29 Aug 2018 20:49:57 -0000 Author: kp Date: Wed Aug 29 20:49:56 2018 New Revision: 338390 URL: https://svnweb.freebsd.org/changeset/base/338390 Log: MFC r338183, r338183: pfctl: Improve set skip handling for groups Rely on the kernel to appropriately mark group members as skipped. Once a group is skipped we can clear the update flag on all the members. PR: 229241 Submitted by: Andreas Longwitz Modified: stable/11/sbin/pfctl/pfctl.c stable/11/sbin/pfctl/pfctl_parser.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/pfctl/pfctl.c ============================================================================== --- stable/11/sbin/pfctl/pfctl.c Wed Aug 29 17:58:01 2018 (r338389) +++ stable/11/sbin/pfctl/pfctl.c Wed Aug 29 20:49:56 2018 (r338390) @@ -69,7 +69,7 @@ int pfctl_disable(int, int); int pfctl_clear_stats(int, int); int pfctl_get_skip_ifaces(void); int pfctl_check_skip_ifaces(char *); -int pfctl_clear_skip_ifaces(struct pfctl *); +int pfctl_adjust_skip_ifaces(struct pfctl *); int pfctl_clear_interface_flags(int, int); int pfctl_clear_rules(int, int, char *); int pfctl_clear_nat(int, int, char *); @@ -319,21 +319,66 @@ int pfctl_check_skip_ifaces(char *ifname) { struct pfi_kif *p; + struct node_host *h = NULL, *n = NULL; - PFRB_FOREACH(p, &skip_b) - if ((p->pfik_flags & PFI_IFLAG_SKIP) && !strcmp(ifname, p->pfik_name)) + PFRB_FOREACH(p, &skip_b) { + if (!strcmp(ifname, p->pfik_name) && + (p->pfik_flags & PFI_IFLAG_SKIP)) p->pfik_flags &= ~PFI_IFLAG_SKIP; + if (!strcmp(ifname, p->pfik_name) && p->pfik_group != NULL) { + if ((h = ifa_grouplookup(p->pfik_name, 0)) == NULL) + continue; + + for (n = h; n != NULL; n = n->next) { + if (p->pfik_ifp == NULL) + continue; + if (strncmp(p->pfik_name, ifname, IFNAMSIZ)) + continue; + + p->pfik_flags &= ~PFI_IFLAG_SKIP; + } + } + } return (0); } int -pfctl_clear_skip_ifaces(struct pfctl *pf) +pfctl_adjust_skip_ifaces(struct pfctl *pf) { - struct pfi_kif *p; + struct pfi_kif *p, *pp; + struct node_host *h = NULL, *n = NULL; - PFRB_FOREACH(p, &skip_b) - if (p->pfik_flags & PFI_IFLAG_SKIP) - pfctl_set_interface_flags(pf, p->pfik_name, PFI_IFLAG_SKIP, 0); + PFRB_FOREACH(p, &skip_b) { + if (p->pfik_group == NULL || !(p->pfik_flags & PFI_IFLAG_SKIP)) + continue; + + pfctl_set_interface_flags(pf, p->pfik_name, PFI_IFLAG_SKIP, 0); + if ((h = ifa_grouplookup(p->pfik_name, 0)) == NULL) + continue; + + for (n = h; n != NULL; n = n->next) + PFRB_FOREACH(pp, &skip_b) { + if (pp->pfik_ifp == NULL) + continue; + + if (strncmp(pp->pfik_name, n->ifname, IFNAMSIZ)) + continue; + + if (!(pp->pfik_flags & PFI_IFLAG_SKIP)) + pfctl_set_interface_flags(pf, + pp->pfik_name, PFI_IFLAG_SKIP, 1); + if (pp->pfik_flags & PFI_IFLAG_SKIP) + pp->pfik_flags &= ~PFI_IFLAG_SKIP; + } + } + + PFRB_FOREACH(p, &skip_b) { + if (p->pfik_ifp == NULL || ! (p->pfik_flags & PFI_IFLAG_SKIP)) + continue; + + pfctl_set_interface_flags(pf, p->pfik_name, PFI_IFLAG_SKIP, 0); + } + return (0); } @@ -1537,7 +1582,7 @@ pfctl_rules(int dev, char *filename, int opts, int opt goto _error; } if (loadopt & PFCTL_FLAG_OPTION) - pfctl_clear_skip_ifaces(&pf); + pfctl_adjust_skip_ifaces(&pf); if ((pf.loadopt & PFCTL_FLAG_FILTER && (pfctl_load_ruleset(&pf, path, rs, PF_RULESET_SCRUB, 0))) || Modified: stable/11/sbin/pfctl/pfctl_parser.h ============================================================================== --- stable/11/sbin/pfctl/pfctl_parser.h Wed Aug 29 17:58:01 2018 (r338389) +++ stable/11/sbin/pfctl/pfctl_parser.h Wed Aug 29 20:49:56 2018 (r338390) @@ -315,6 +315,7 @@ int unmask(struct pf_addr *, sa_family_t); void ifa_load(void); int get_socket_domain(void); struct node_host *ifa_exists(const char *); +struct node_host *ifa_grouplookup(const char *ifa_name, int flags); struct node_host *ifa_lookup(const char *, int); struct node_host *host(const char *); From owner-svn-src-stable@freebsd.org Thu Aug 30 13:45:15 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3909109F015; Thu, 30 Aug 2018 13:45:14 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8B9F6813C8; Thu, 30 Aug 2018 13:45:14 +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 6D530547A; Thu, 30 Aug 2018 13:45:14 +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 w7UDjEAT053849; Thu, 30 Aug 2018 13:45:14 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7UDjEDK053848; Thu, 30 Aug 2018 13:45:14 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201808301345.w7UDjEDK053848@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 30 Aug 2018 13:45:14 +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: r338396 - stable/11/cddl/contrib/opensolaris/cmd/dtrace X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/11/cddl/contrib/opensolaris/cmd/dtrace X-SVN-Commit-Revision: 338396 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.27 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, 30 Aug 2018 13:45:15 -0000 Author: markj Date: Thu Aug 30 13:45:14 2018 New Revision: 338396 URL: https://svnweb.freebsd.org/changeset/base/338396 Log: MFC r337926: Add partial documentation for dtrace(1)'s -x configuration options. Modified: stable/11/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 Directory Properties: stable/11/ (props changed) Modified: stable/11/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 ============================================================================== --- stable/11/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 Thu Aug 30 13:42:01 2018 (r338395) +++ stable/11/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 Thu Aug 30 13:45:14 2018 (r338396) @@ -1,4 +1,3 @@ -'\" te .\" CDDL HEADER START .\" .\" The contents of this file are subject to the terms of the @@ -21,7 +20,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 18, 2015 +.Dd August 16, 2018 .Dt DTRACE 1 .Os .Sh NAME @@ -523,6 +522,116 @@ Enable or modify a DTrace runtime option or D compiler Boolean options are enabled by specifying their name. Options with values are set by separating the option name and value with an equals sign (=). +.Pp +A +.Ar size +argument may be suffixed with one of +.Cm K , +.Cm M , +.Cm G +or +.Cm T +(either upper or lower case) to indicate a multiple of +Kilobytes, Megabytes, Gigabytes or Terabytes +respectively. +.Pp +A +.Ar time +argument may be suffixed with one of +.Cm ns , +.Cm nsec , +.Cm us , +.Cm usec , +.Cm ms , +.Cm msec , +.Cm s , +.Cm sec , +.Cm m , +.Cm min , +.Cm h , +.Cm hour , +.Cm d , +.Cm day , +.Cm hz . +If no suffix is specified +.Cm hz +will be used as the unit. +.Bl -tag -width indent +.It Sy aggrate Ns = Ns Ar time +Rate of aggregation reading. +.It Sy aggsize Ns = Ns Ar size +Size of the aggregation buffer. +.It Sy bufpolicy Ns = Ns Cm fill Ns | Ns Cm switch Ns | Ns Cm ring +Specifies the buffer policy for the principal buffer. +.It Sy bufresize Ns = Ns Cm auto Ns | Ns Cm manual +Buffer resizing policy. +.It Sy bufsize Ns = Ns Ar size +Size of the per-CPU principal buffer. +Same as the +.Fl b +flag. +.It Sy cleanrate Ns = Ns Ar time +Cleaning rate. +Must be specified in number-per-second with the +.Dq Li hz +suffix. +.It Sy cpu Ns = Ns Ar scalar +Specifies the CPU on which to enable tracing. +.It Sy defaultargs +Allow references to unspecified macro arguments. +.It Sy destructive +Allow destructive actions. +Same as the +.Fl w +flag. +.It Sy dynvarsize Ns = Ns Ar size +Size of the dynamic variable space. +.It Sy flowindent +Turn on flow indentation. +Same as the +.Fl F +flag. +.It Sy grabanon +Claim anonymous state. +Same as the +.Fl a +flag. +.It Sy jstackframes Ns = Ns Ar scalar +Number of default stack frames for +.Fn jstack . +.It Sy jstackstrsize Ns = Ns Ar scalar +Default string space size for +.Fn jstack . +.It Sy nspec Ns = Ns Ar scalar +Number of speculations. +.It Sy quiet +Set quiet mode. +Same as the +.Fl q +flag. +.It Sy specsize Ns = Ns Ar size +Size of the speculation buffer. +.It Sy strsize Ns = Ns Ar size +Maximum size of strings. +.It Sy stackframes Ns = Ns Ar scalar +Maximum number of kernelspace stack frames to unwind when executing the +.Fn stack +action. +.It Sy stackindent Ns = Ns Ar scalar +Number of whitespace characters to use when indenting +.Fn stack +and +.Fn ustack +output. +.It Sy statusrate Ns = Ns Ar time +Rate of status checking. +.It Sy switchrate Ns = Ns Ar time +Rate of buffer switching. +.It Sy ustackframes Ns = Ns Ar scalar +Maximum number of userspace stack frames to unwind when executing the +.Fn ustack +action. +.El .It Fl X Cm a | c | s | t Specify the degree of conformance to the ISO C standard that should be selected when invoking From owner-svn-src-stable@freebsd.org Fri Aug 31 01:50:41 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0A9F0EFEEF2; Fri, 31 Aug 2018 01:50:41 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B8C9E7BDEF; Fri, 31 Aug 2018 01:50:40 +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 9744F14BB6; Fri, 31 Aug 2018 01:50:40 +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 w7V1oeNl032618; Fri, 31 Aug 2018 01:50:40 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7V1oesX032617; Fri, 31 Aug 2018 01:50:40 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201808310150.w7V1oesX032617@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 31 Aug 2018 01:50:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r338403 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 338403 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.27 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, 31 Aug 2018 01:50:41 -0000 Author: mav Date: Fri Aug 31 01:50:40 2018 New Revision: 338403 URL: https://svnweb.freebsd.org/changeset/base/338403 Log: MFV r338288: Unblock speculative prefetcher also on pool creation. Fix at r331950 appeared to be incomplete, fixing only case of pool import, but not pool creation, leaving prefetcher still blocked for newly created pools. Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Fri Aug 31 01:01:16 2018 (r338402) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Fri Aug 31 01:50:40 2018 (r338403) @@ -4727,6 +4727,7 @@ spa_create(const char *pool, nvlist_t *nvroot, nvlist_ spa->spa_removing_phys.sr_state = DSS_NONE; spa->spa_removing_phys.sr_removing_vdev = -1; spa->spa_removing_phys.sr_prev_indirect_vdev = -1; + spa->spa_indirect_vdevs_loaded = B_TRUE; /* * Create "The Godfather" zio to hold all async IOs From owner-svn-src-stable@freebsd.org Fri Aug 31 05:21:36 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 393A9F73CCE; Fri, 31 Aug 2018 05:21: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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E0160825BB; Fri, 31 Aug 2018 05:21: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 C122D16E54; Fri, 31 Aug 2018 05:21: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 w7V5LZt4045055; Fri, 31 Aug 2018 05:21:35 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7V5LYfr045047; Fri, 31 Aug 2018 05:21:34 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201808310521.w7V5LYfr045047@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 31 Aug 2018 05:21: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: r338405 - in stable/11: include lib/libc/include lib/libthr lib/libthr/thread share/man/man3 X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/11: include lib/libc/include lib/libthr lib/libthr/thread share/man/man3 X-SVN-Commit-Revision: 338405 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.27 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, 31 Aug 2018 05:21:36 -0000 Author: kib Date: Fri Aug 31 05:21:33 2018 New Revision: 338405 URL: https://svnweb.freebsd.org/changeset/base/338405 Log: MFC r337983, r338044: Add pthread_get_name_np(3). Modified: stable/11/include/pthread_np.h stable/11/lib/libc/include/namespace.h stable/11/lib/libc/include/un-namespace.h stable/11/lib/libthr/pthread.map stable/11/lib/libthr/thread/thr_exit.c stable/11/lib/libthr/thread/thr_info.c stable/11/lib/libthr/thread/thr_private.h stable/11/share/man/man3/Makefile stable/11/share/man/man3/pthread_set_name_np.3 Directory Properties: stable/11/ (props changed) Modified: stable/11/include/pthread_np.h ============================================================================== --- stable/11/include/pthread_np.h Fri Aug 31 02:22:33 2018 (r338404) +++ stable/11/include/pthread_np.h Fri Aug 31 05:21:33 2018 (r338405) @@ -47,6 +47,7 @@ int pthread_attr_setcreatesuspend_np(pthread_attr_t *) int pthread_attr_get_np(pthread_t, pthread_attr_t *); int pthread_attr_getaffinity_np(const pthread_attr_t *, size_t, cpuset_t *); int pthread_attr_setaffinity_np(pthread_attr_t *, size_t, const cpuset_t *); +void pthread_get_name_np(pthread_t, char *, size_t); int pthread_getaffinity_np(pthread_t, size_t, cpuset_t *); int pthread_getthreadid_np(void); int pthread_main_np(void); Modified: stable/11/lib/libc/include/namespace.h ============================================================================== --- stable/11/lib/libc/include/namespace.h Fri Aug 31 02:22:33 2018 (r338404) +++ stable/11/lib/libc/include/namespace.h Fri Aug 31 05:21:33 2018 (r338405) @@ -132,6 +132,7 @@ #define pthread_detach _pthread_detach #define pthread_equal _pthread_equal #define pthread_exit _pthread_exit +#define pthread_get_name_np _pthread_get_name_np #define pthread_getaffinity_np _pthread_getaffinity_np #define pthread_getconcurrency _pthread_getconcurrency #define pthread_getcpuclockid _pthread_getcpuclockid Modified: stable/11/lib/libc/include/un-namespace.h ============================================================================== --- stable/11/lib/libc/include/un-namespace.h Fri Aug 31 02:22:33 2018 (r338404) +++ stable/11/lib/libc/include/un-namespace.h Fri Aug 31 05:21:33 2018 (r338405) @@ -113,6 +113,7 @@ #undef pthread_detach #undef pthread_equal #undef pthread_exit +#undef pthread_get_name_np #undef pthread_getaffinity_np #undef pthread_getconcurrency #undef pthread_getcpuclockid Modified: stable/11/lib/libthr/pthread.map ============================================================================== --- stable/11/lib/libthr/pthread.map Fri Aug 31 02:22:33 2018 (r338404) +++ stable/11/lib/libthr/pthread.map Fri Aug 31 05:21:33 2018 (r338405) @@ -321,3 +321,7 @@ FBSD_1.4 { pthread_mutexattr_getrobust; pthread_mutexattr_setrobust; }; + +FBSD_1.5 { + pthread_get_name_np; +}; Modified: stable/11/lib/libthr/thread/thr_exit.c ============================================================================== --- stable/11/lib/libthr/thread/thr_exit.c Fri Aug 31 02:22:33 2018 (r338404) +++ stable/11/lib/libthr/thread/thr_exit.c Fri Aug 31 05:21:33 2018 (r338405) @@ -281,6 +281,9 @@ exit_thread(void) { struct pthread *curthread = _get_curthread(); + free(curthread->name); + curthread->name = NULL; + /* Check if there is thread specific data: */ if (curthread->specific != NULL) { /* Run the thread-specific data destructors: */ Modified: stable/11/lib/libthr/thread/thr_info.c ============================================================================== --- stable/11/lib/libthr/thread/thr_info.c Fri Aug 31 02:22:33 2018 (r338404) +++ stable/11/lib/libthr/thread/thr_info.c Fri Aug 31 05:21:33 2018 (r338405) @@ -1,7 +1,11 @@ /* * Copyright (c) 1995-1998 John Birrell + * Copyright (c) 2018 The FreeBSD Foundation * All rights reserved. * + * Portions of this software were developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -41,27 +45,65 @@ __FBSDID("$FreeBSD$"); __weak_reference(_pthread_set_name_np, pthread_set_name_np); +static void +thr_set_name_np(struct pthread *thread, const char *name) +{ + + free(thread->name); + thread->name = strdup(name); +} + /* Set the thread name for debug. */ void _pthread_set_name_np(pthread_t thread, const char *name) { - struct pthread *curthread = _get_curthread(); - int ret = 0; + struct pthread *curthread; + curthread = _get_curthread(); if (curthread == thread) { - if (thr_set_name(thread->tid, name)) - ret = errno; + THR_THREAD_LOCK(curthread, thread); + thr_set_name(thread->tid, name); + thr_set_name_np(thread, name); + THR_THREAD_UNLOCK(curthread, thread); } else { - if ((ret=_thr_find_thread(curthread, thread, 0)) == 0) { + if (_thr_find_thread(curthread, thread, 0) == 0) { if (thread->state != PS_DEAD) { - if (thr_set_name(thread->tid, name)) - ret = errno; + thr_set_name(thread->tid, name); + thr_set_name_np(thread, name); } THR_THREAD_UNLOCK(curthread, thread); } } -#if 0 - /* XXX should return error code. */ - return (ret); -#endif +} + +static void +thr_get_name_np(struct pthread *thread, char *buf, size_t len) +{ + + if (thread->name != NULL) + strlcpy(buf, thread->name, len); + else if (len > 0) + buf[0] = '\0'; +} + +__weak_reference(_pthread_get_name_np, pthread_get_name_np); + +void +_pthread_get_name_np(pthread_t thread, char *buf, size_t len) +{ + struct pthread *curthread; + + curthread = _get_curthread(); + if (curthread == thread) { + THR_THREAD_LOCK(curthread, thread); + thr_get_name_np(thread, buf, len); + THR_THREAD_UNLOCK(curthread, thread); + } else { + if (_thr_find_thread(curthread, thread, 0) == 0) { + if (thread->state != PS_DEAD) + thr_get_name_np(thread, buf, len); + THR_THREAD_UNLOCK(curthread, thread); + } else if (len > 0) + buf[0] = '\0'; + } } Modified: stable/11/lib/libthr/thread/thr_private.h ============================================================================== --- stable/11/lib/libthr/thread/thr_private.h Fri Aug 31 02:22:33 2018 (r338404) +++ stable/11/lib/libthr/thread/thr_private.h Fri Aug 31 05:21:33 2018 (r338405) @@ -570,6 +570,8 @@ struct pthread { /* Sleep queue */ struct sleepqueue *sleepqueue; + /* pthread_set/get_name_np */ + char *name; }; #define THR_SHOULD_GC(thrd) \ Modified: stable/11/share/man/man3/Makefile ============================================================================== --- stable/11/share/man/man3/Makefile Fri Aug 31 02:22:33 2018 (r338404) +++ stable/11/share/man/man3/Makefile Fri Aug 31 05:21:33 2018 (r338405) @@ -328,6 +328,7 @@ PTHREAD_MLINKS+=pthread_rwlock_rdlock.3 pthread_rwlock PTHREAD_MLINKS+=pthread_rwlock_wrlock.3 pthread_rwlock_trywrlock.3 PTHREAD_MLINKS+=pthread_schedparam.3 pthread_getschedparam.3 \ pthread_schedparam.3 pthread_setschedparam.3 +PTHREAD_MLINKS+=pthread_set_name_np.3 pthread_get_name_np.3 PTHREAD_MLINKS+=pthread_spin_init.3 pthread_spin_destroy.3 \ pthread_spin_lock.3 pthread_spin_trylock.3 \ pthread_spin_lock.3 pthread_spin_unlock.3 Modified: stable/11/share/man/man3/pthread_set_name_np.3 ============================================================================== --- stable/11/share/man/man3/pthread_set_name_np.3 Fri Aug 31 02:22:33 2018 (r338404) +++ stable/11/share/man/man3/pthread_set_name_np.3 Fri Aug 31 05:21:33 2018 (r338405) @@ -24,17 +24,20 @@ .\" .\" $FreeBSD$ .\" -.Dd December 2, 2016 +.Dd August 12, 2018 .Dt PTHREAD_SET_NAME_NP 3 .Os .Sh NAME +.Nm pthread_get_name_np , .Nm pthread_set_name_np -.Nd set the thread name +.Nd set and retrieve the thread name .Sh LIBRARY .Lb libpthread .Sh SYNOPSIS .In pthread_np.h .Ft void +.Fn pthread_get_name_np "pthread_t thread" "char *name" "size_t len" +.Ft void .Fn pthread_set_name_np "pthread_t thread" "const char *name" .Sh DESCRIPTION The @@ -43,11 +46,32 @@ function applies a copy of the given .Fa name to the given .Fa thread . +.Pp +The +.Fn pthread_get_name_np +function retrieves the +.Fa name +associated with +.Fa thread . +If +.Fn pthread_set_name_np +was not previously called for +.Fa thread , +the buffer pointed to by +.Fa name +will be empty. .Sh ERRORS -Because of the debugging nature of this function, all errors that may +Because of the debugging nature of these functions, all errors that may appear inside are silently ignored. .Sh SEE ALSO .Xr thr_set_name 2 +.Sh STANDARDS +.Fn pthread_set_name_np +and +.Fn pthread_get_name_np +are non-standard extensions. .Sh AUTHORS This manual page was written by -.An Alexey Zelkin Aq Mt phantom@FreeBSD.org . +.An Alexey Zelkin Aq Mt phantom@FreeBSD.org +and +.An Yuri Pankov Aq Mt yuripv@yuripv.net . From owner-svn-src-stable@freebsd.org Fri Aug 31 17:29:25 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8E49AFD14B0; Fri, 31 Aug 2018 17:29:25 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 490C87CCD0; Fri, 31 Aug 2018 17:29:25 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 27B231E493; Fri, 31 Aug 2018 17:29:25 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7VHTOtc023963; Fri, 31 Aug 2018 17:29:24 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7VHTOl6023962; Fri, 31 Aug 2018 17:29:24 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201808311729.w7VHTOl6023962@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 31 Aug 2018 17:29:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r338411 - stable/11/contrib/elftoolchain/libelf X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/contrib/elftoolchain/libelf X-SVN-Commit-Revision: 338411 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.27 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, 31 Aug 2018 17:29:25 -0000 Author: emaste Date: Fri Aug 31 17:29:24 2018 New Revision: 338411 URL: https://svnweb.freebsd.org/changeset/base/338411 Log: MFC r337045: libelf: reload section headers after update with ELF_C_WRITE These issues (PR 218860 and PR 218861) are still undergoing additional discussion in the upstream context and there may be additional changes to come. PR: 218860 Submitted by: Eric McCorkle Sponsored by: The FreeBSD Foundation (MFC) Modified: stable/11/contrib/elftoolchain/libelf/elf_update.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/elftoolchain/libelf/elf_update.c ============================================================================== --- stable/11/contrib/elftoolchain/libelf/elf_update.c Fri Aug 31 16:29:36 2018 (r338410) +++ stable/11/contrib/elftoolchain/libelf/elf_update.c Fri Aug 31 17:29:24 2018 (r338411) @@ -1212,5 +1212,6 @@ elf_update(Elf *e, Elf_Cmd c) done: _libelf_release_extents(&extents); + e->e_flags &= ~LIBELF_F_SHDRS_LOADED; return (rc); } From owner-svn-src-stable@freebsd.org Fri Aug 31 17:34:19 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 199CAFD1924; Fri, 31 Aug 2018 17:34:19 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C8DCC7D1D2; Fri, 31 Aug 2018 17:34:18 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A9F351E635; Fri, 31 Aug 2018 17:34:18 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7VHYIRO028980; Fri, 31 Aug 2018 17:34:18 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7VHYI09028979; Fri, 31 Aug 2018 17:34:18 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201808311734.w7VHYI09028979@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 31 Aug 2018 17:34:18 +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: r338412 - stable/11/sys/sys X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/sys/sys X-SVN-Commit-Revision: 338412 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.27 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, 31 Aug 2018 17:34:19 -0000 Author: emaste Date: Fri Aug 31 17:34:18 2018 New Revision: 338412 URL: https://svnweb.freebsd.org/changeset/base/338412 Log: MFC r333062: elf_common.h: add DT_SUNW_ASLR tag For upcoming ELF Tool Chain import (readelf). Sponsored by: The FreeBSD Foundation Modified: stable/11/sys/sys/elf_common.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/sys/elf_common.h ============================================================================== --- stable/11/sys/sys/elf_common.h Fri Aug 31 17:29:24 2018 (r338411) +++ stable/11/sys/sys/elf_common.h Fri Aug 31 17:34:18 2018 (r338412) @@ -581,6 +581,7 @@ typedef struct { #define DT_SUNW_RTLDINF 0x6000000e /* ld.so.1 info (private) */ #define DT_SUNW_FILTER 0x6000000f /* symbol filter name */ #define DT_SUNW_CAP 0x60000010 /* hardware/software */ +#define DT_SUNW_ASLR 0x60000023 /* ASLR control */ #define DT_HIOS 0x6ffff000 /* Last OS-specific */ /* From owner-svn-src-stable@freebsd.org Fri Aug 31 17:35:10 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 251EDFD1A57; Fri, 31 Aug 2018 17:35:10 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D41627D35E; Fri, 31 Aug 2018 17:35:09 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B56081E636; Fri, 31 Aug 2018 17:35:09 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7VHZ9fj029092; Fri, 31 Aug 2018 17:35:09 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7VHZ9p9029091; Fri, 31 Aug 2018 17:35:09 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201808311735.w7VHZ9p9029091@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 31 Aug 2018 17:35:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r338413 - stable/11/sys/sys X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/sys/sys X-SVN-Commit-Revision: 338413 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.27 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, 31 Aug 2018 17:35:10 -0000 Author: emaste Date: Fri Aug 31 17:35:09 2018 New Revision: 338413 URL: https://svnweb.freebsd.org/changeset/base/338413 Log: MFC r336745: elf_common: update ARM ABI flag names In the V5 ABI the flags are EF_ARM_ABI_FLOAT_HARD and EF_ARM_ABI_FLOAT_SOFT. The flags have the same values as the legacy GCC flags EF_ARM_VFP_FLOAT and EF_ARM_SOFT_FLOAT respectively. The legacy names are kept for compatibility. Reported by: Peter Smith (Linaro) Sponsored by: The FreeBSD Foundation Modified: stable/11/sys/sys/elf_common.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/sys/elf_common.h ============================================================================== --- stable/11/sys/sys/elf_common.h Fri Aug 31 17:34:18 2018 (r338412) +++ stable/11/sys/sys/elf_common.h Fri Aug 31 17:35:09 2018 (r338413) @@ -331,8 +331,10 @@ typedef struct { #define EF_ARM_ALIGN8 0x00000040 #define EF_ARM_NEW_ABI 0x00000080 #define EF_ARM_OLD_ABI 0x00000100 -#define EF_ARM_SOFT_FLOAT 0x00000200 -#define EF_ARM_VFP_FLOAT 0x00000400 +#define EF_ARM_ABI_FLOAT_SOFT 0x00000200 +#define EF_ARM_SOFT_FLOAT EF_ARM_ABI_FLOAT_SOFT /* Pre-V5 ABI name */ +#define EF_ARM_ABI_FLOAT_HARD 0x00000400 +#define EF_ARM_VFP_FLOAT EF_ARM_ABI_FLOAT_HARD /* Pre-V5 ABI name */ #define EF_ARM_MAVERICK_FLOAT 0x00000800 #define EF_MIPS_NOREORDER 0x00000001 From owner-svn-src-stable@freebsd.org Fri Aug 31 17:36:51 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0E948FD1B5F; Fri, 31 Aug 2018 17:36:51 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A574C7D4D5; Fri, 31 Aug 2018 17:36:50 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 81E7B1E638; Fri, 31 Aug 2018 17:36:50 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7VHaoDx029261; Fri, 31 Aug 2018 17:36:50 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7VHajxm029236; Fri, 31 Aug 2018 17:36:45 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201808311736.w7VHajxm029236@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 31 Aug 2018 17:36:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r338414 - in stable/11: contrib/elftoolchain/ar contrib/elftoolchain/common contrib/elftoolchain/elfcopy contrib/elftoolchain/elfdump contrib/elftoolchain/libdwarf contrib/elftoolchain/... X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in stable/11: contrib/elftoolchain/ar contrib/elftoolchain/common contrib/elftoolchain/elfcopy contrib/elftoolchain/elfdump contrib/elftoolchain/libdwarf contrib/elftoolchain/libelf contrib/elftoolcha... X-SVN-Commit-Revision: 338414 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.27 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, 31 Aug 2018 17:36:51 -0000 Author: emaste Date: Fri Aug 31 17:36:45 2018 New Revision: 338414 URL: https://svnweb.freebsd.org/changeset/base/338414 Log: MFC r333063: Update ELF Tool Chain to r3614 Sponsored by: The FreeBSD Foundation Modified: stable/11/contrib/elftoolchain/ar/Makefile stable/11/contrib/elftoolchain/common/Makefile stable/11/contrib/elftoolchain/common/os.Linux.mk stable/11/contrib/elftoolchain/elfcopy/Makefile stable/11/contrib/elftoolchain/elfcopy/binary.c stable/11/contrib/elftoolchain/elfcopy/elfcopy.1 stable/11/contrib/elftoolchain/elfcopy/main.c stable/11/contrib/elftoolchain/elfdump/elfdump.c stable/11/contrib/elftoolchain/libdwarf/Makefile stable/11/contrib/elftoolchain/libdwarf/libdwarf.h stable/11/contrib/elftoolchain/libdwarf/libdwarf_frame.c stable/11/contrib/elftoolchain/libdwarf/libdwarf_reloc.c stable/11/contrib/elftoolchain/libelf/Makefile stable/11/contrib/elftoolchain/libelf/_libelf_config.h stable/11/contrib/elftoolchain/libelf/gelf_phdr.c stable/11/contrib/elftoolchain/libelf/libelf_ehdr.c stable/11/contrib/elftoolchain/libelftc/Makefile stable/11/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c stable/11/contrib/elftoolchain/libpe/Makefile stable/11/contrib/elftoolchain/nm/nm.1 stable/11/contrib/elftoolchain/readelf/readelf.c stable/11/contrib/elftoolchain/strings/strings.c stable/11/lib/libelftc/elftc_version.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/elftoolchain/ar/Makefile ============================================================================== --- stable/11/contrib/elftoolchain/ar/Makefile Fri Aug 31 17:35:09 2018 (r338413) +++ stable/11/contrib/elftoolchain/ar/Makefile Fri Aug 31 17:36:45 2018 (r338414) @@ -1,4 +1,4 @@ -# $Id: Makefile 3107 2014-12-20 08:31:58Z kaiwang27 $ +# $Id: Makefile 3608 2018-04-14 21:23:04Z jkoshy $ TOP= .. @@ -32,4 +32,6 @@ ${EXTRA_TARGETS}: ${PROG} .if ${OS_HOST} == "OpenBSD" CFLAGS+= -I/usr/local/include LDFLAGS+= -L/usr/local/lib +.elif ${OS_HOST} == "DragonFly" +LDADD+= -lbz2 .endif Modified: stable/11/contrib/elftoolchain/common/Makefile ============================================================================== --- stable/11/contrib/elftoolchain/common/Makefile Fri Aug 31 17:35:09 2018 (r338413) +++ stable/11/contrib/elftoolchain/common/Makefile Fri Aug 31 17:36:45 2018 (r338414) @@ -1,4 +1,4 @@ -# $Id: Makefile 3022 2014-04-17 18:05:58Z jkoshy $ +# $Id: Makefile 3594 2018-04-11 18:26:50Z jkoshy $ TOP= .. @@ -7,12 +7,12 @@ INCSDIR= /usr/include .PHONY: all clean clobber depend obj -all depend obj: +all depend: clean clobber: rm -f ${CLEANFILES} cleandepend: - rm -f .depend + rm -f ${.OBJDIR}/.depend .include "${TOP}/mk/elftoolchain.inc.mk" Modified: stable/11/contrib/elftoolchain/common/os.Linux.mk ============================================================================== --- stable/11/contrib/elftoolchain/common/os.Linux.mk Fri Aug 31 17:35:09 2018 (r338413) +++ stable/11/contrib/elftoolchain/common/os.Linux.mk Fri Aug 31 17:36:45 2018 (r338414) @@ -1,13 +1,15 @@ # # Build recipes for Linux based operating systems. # -# $Id: os.Linux.mk 2064 2011-10-26 15:12:32Z jkoshy $ +# $Id: os.Linux.mk 3594 2018-04-11 18:26:50Z jkoshy $ _NATIVE_ELF_FORMAT = native-elf-format -.BEGIN: ${_NATIVE_ELF_FORMAT}.h +.if !make(obj) +.BEGIN: ${.OBJDIR}/${_NATIVE_ELF_FORMAT}.h -${_NATIVE_ELF_FORMAT}.h: +${.OBJDIR}/${_NATIVE_ELF_FORMAT}.h: ${.CURDIR}/${_NATIVE_ELF_FORMAT} > ${.TARGET} || rm ${.TARGET} +.endif -CLEANFILES += ${_NATIVE_ELF_FORMAT}.h +CLEANFILES += ${.OBJDIR}/${_NATIVE_ELF_FORMAT}.h Modified: stable/11/contrib/elftoolchain/elfcopy/Makefile ============================================================================== --- stable/11/contrib/elftoolchain/elfcopy/Makefile Fri Aug 31 17:35:09 2018 (r338413) +++ stable/11/contrib/elftoolchain/elfcopy/Makefile Fri Aug 31 17:36:45 2018 (r338414) @@ -1,4 +1,4 @@ -# $Id: Makefile 3381 2016-01-30 19:39:47Z jkoshy $ +# $Id: Makefile 3608 2018-04-14 21:23:04Z jkoshy $ TOP= .. @@ -18,7 +18,7 @@ LDADD= -lelf -lelftc LDADD+= -larchive .endif -.if defined(WITH_PE) && ${WITH_PE:tl} == "yes" +.if defined(WITH_PE) && ${WITH_PE} == "yes" SRCS+= pe.c CFLAGS+= -DWITH_PE=1 @@ -51,4 +51,6 @@ ${EXTRA_TARGETS}: ${PROG} .if ${OS_HOST} == "OpenBSD" CFLAGS+= -I/usr/local/include LDFLAGS+= -L/usr/local/lib +.elif ${OS_HOST} == "DragonFly" +LDADD+= -lbz2 .endif Modified: stable/11/contrib/elftoolchain/elfcopy/binary.c ============================================================================== --- stable/11/contrib/elftoolchain/elfcopy/binary.c Fri Aug 31 17:35:09 2018 (r338413) +++ stable/11/contrib/elftoolchain/elfcopy/binary.c Fri Aug 31 17:36:45 2018 (r338414) @@ -36,7 +36,7 @@ #include "elfcopy.h" -ELFTC_VCSID("$Id: binary.c 3445 2016-04-20 19:08:30Z emaste $"); +ELFTC_VCSID("$Id: binary.c 3611 2018-04-16 21:35:18Z jkoshy $"); /* * Convert ELF object to `binary'. Sections with SHF_ALLOC flag set @@ -215,7 +215,7 @@ create_elf_from_binary(struct elfcopy *ecp, int ifd, c if ((sym_basename = strdup(ifn)) == NULL) err(1, "strdup"); for (p = sym_basename; *p != '\0'; p++) - if (!isalnum(*p)) + if (!isalnum(*p & 0xFF)) *p = '_'; #define _GEN_SYMNAME(S) do { \ snprintf(name, sizeof(name), "%s%s%s", "_binary_", sym_basename, S); \ Modified: stable/11/contrib/elftoolchain/elfcopy/elfcopy.1 ============================================================================== --- stable/11/contrib/elftoolchain/elfcopy/elfcopy.1 Fri Aug 31 17:35:09 2018 (r338413) +++ stable/11/contrib/elftoolchain/elfcopy/elfcopy.1 Fri Aug 31 17:36:45 2018 (r338414) @@ -21,9 +21,9 @@ .\" out of the use of this software, even if advised of the possibility of .\" such damage. .\" -.\" $Id: elfcopy.1 3426 2016-03-05 13:32:28Z emaste $ +.\" $Id: elfcopy.1 3565 2017-08-31 02:24:19Z emaste $ .\" -.Dd April 20, 2017 +.Dd August 30, 2017 .Os .Dt ELFCOPY 1 .Sh NAME Modified: stable/11/contrib/elftoolchain/elfcopy/main.c ============================================================================== --- stable/11/contrib/elftoolchain/elfcopy/main.c Fri Aug 31 17:35:09 2018 (r338413) +++ stable/11/contrib/elftoolchain/elfcopy/main.c Fri Aug 31 17:36:45 2018 (r338414) @@ -39,7 +39,7 @@ #include "elfcopy.h" -ELFTC_VCSID("$Id: main.c 3520 2017-04-17 01:47:52Z kaiwang27 $"); +ELFTC_VCSID("$Id: main.c 3577 2017-09-14 02:19:42Z emaste $"); enum options { Modified: stable/11/contrib/elftoolchain/elfdump/elfdump.c ============================================================================== --- stable/11/contrib/elftoolchain/elfdump/elfdump.c Fri Aug 31 17:35:09 2018 (r338413) +++ stable/11/contrib/elftoolchain/elfdump/elfdump.c Fri Aug 31 17:36:45 2018 (r338414) @@ -50,7 +50,7 @@ #include "_elftc.h" -ELFTC_VCSID("$Id: elfdump.c 3521 2017-06-04 20:07:09Z jkoshy $"); +ELFTC_VCSID("$Id: elfdump.c 3584 2017-11-05 20:51:43Z jkoshy $"); #if defined(ELFTC_NEED_ELF_NOTE_DEFINITION) #include "native-elf-format.h" @@ -915,7 +915,7 @@ elf_print_ar(struct elfdump *ed, int fd) Elf_Arhdr *arh; Elf_Arsym *arsym; Elf_Cmd cmd; - char idx[10]; + char idx[21]; size_t cnt, i; ed->ar = ed->elf; @@ -1496,7 +1496,7 @@ elf_print_symtab(struct elfdump *ed, int i) struct section *s; const char *name; uint16_t *vs; - char idx[10]; + char idx[13]; Elf_Data *data; GElf_Sym sym; int len, j, elferr, nvs; @@ -1590,7 +1590,7 @@ elf_print_dynamic(struct elfdump *ed) { struct section *s; const char *name; - char idx[10]; + char idx[13]; Elf_Data *data; GElf_Dyn dyn; int elferr, i, len; @@ -2052,7 +2052,7 @@ elf_print_note(struct elfdump *ed) size_t count; int elferr, i; uint8_t *src; - char idx[10]; + char idx[17]; s = NULL; for (i = 0; (size_t)i < ed->shnum; i++) { Modified: stable/11/contrib/elftoolchain/libdwarf/Makefile ============================================================================== --- stable/11/contrib/elftoolchain/libdwarf/Makefile Fri Aug 31 17:35:09 2018 (r338413) +++ stable/11/contrib/elftoolchain/libdwarf/Makefile Fri Aug 31 17:36:45 2018 (r338414) @@ -1,6 +1,6 @@ -# $Id: Makefile 3097 2014-09-02 22:10:18Z kaiwang27 $ +# $Id: Makefile 3594 2018-04-11 18:26:50Z jkoshy $ -TOP= ${.CURDIR}/.. +TOP= .. LIB= dwarf Modified: stable/11/contrib/elftoolchain/libdwarf/libdwarf.h ============================================================================== --- stable/11/contrib/elftoolchain/libdwarf/libdwarf.h Fri Aug 31 17:35:09 2018 (r338413) +++ stable/11/contrib/elftoolchain/libdwarf/libdwarf.h Fri Aug 31 17:36:45 2018 (r338414) @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: libdwarf.h 3295 2016-01-08 22:08:10Z jkoshy $ + * $Id: libdwarf.h 3578 2017-09-14 02:21:28Z emaste $ */ #ifndef _LIBDWARF_H_ Modified: stable/11/contrib/elftoolchain/libdwarf/libdwarf_frame.c ============================================================================== --- stable/11/contrib/elftoolchain/libdwarf/libdwarf_frame.c Fri Aug 31 17:35:09 2018 (r338413) +++ stable/11/contrib/elftoolchain/libdwarf/libdwarf_frame.c Fri Aug 31 17:36:45 2018 (r338414) @@ -26,7 +26,7 @@ #include "_libdwarf.h" -ELFTC_VCSID("$Id: libdwarf_frame.c 3106 2014-12-19 16:00:58Z kaiwang27 $"); +ELFTC_VCSID("$Id: libdwarf_frame.c 3589 2018-03-13 20:34:33Z kaiwang27 $"); static int _dwarf_frame_find_cie(Dwarf_FrameSec fs, Dwarf_Unsigned offset, @@ -142,6 +142,8 @@ _dwarf_frame_parse_lsb_cie_augment(Dwarf_Debug dbg, Dw augdata_p = cie->cie_augdata; while (*aug_p != '\0') { switch (*aug_p) { + case 'S': + break; case 'L': /* Skip one augment in augment data. */ augdata_p++; Modified: stable/11/contrib/elftoolchain/libdwarf/libdwarf_reloc.c ============================================================================== --- stable/11/contrib/elftoolchain/libdwarf/libdwarf_reloc.c Fri Aug 31 17:35:09 2018 (r338413) +++ stable/11/contrib/elftoolchain/libdwarf/libdwarf_reloc.c Fri Aug 31 17:36:45 2018 (r338414) @@ -26,7 +26,7 @@ #include "_libdwarf.h" -ELFTC_VCSID("$Id: libdwarf_reloc.c 3198 2015-05-14 18:36:19Z emaste $"); +ELFTC_VCSID("$Id: libdwarf_reloc.c 3578 2017-09-14 02:21:28Z emaste $"); Dwarf_Unsigned _dwarf_get_reloc_type(Dwarf_P_Debug dbg, int is64) Modified: stable/11/contrib/elftoolchain/libelf/Makefile ============================================================================== --- stable/11/contrib/elftoolchain/libelf/Makefile Fri Aug 31 17:35:09 2018 (r338413) +++ stable/11/contrib/elftoolchain/libelf/Makefile Fri Aug 31 17:36:45 2018 (r338414) @@ -1,6 +1,6 @@ -# $Id: Makefile 2605 2012-10-02 17:52:20Z jkoshy $ +# $Id: Makefile 3594 2018-04-11 18:26:50Z jkoshy $ -TOP= ${.CURDIR}/.. +TOP= .. LIB= elf Modified: stable/11/contrib/elftoolchain/libelf/_libelf_config.h ============================================================================== --- stable/11/contrib/elftoolchain/libelf/_libelf_config.h Fri Aug 31 17:35:09 2018 (r338413) +++ stable/11/contrib/elftoolchain/libelf/_libelf_config.h Fri Aug 31 17:36:45 2018 (r338414) @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: _libelf_config.h 3400 2016-02-12 18:38:49Z emaste $ + * $Id: _libelf_config.h 3566 2017-08-31 02:28:40Z emaste $ */ #if defined(__APPLE__) || defined(__DragonFly__) Modified: stable/11/contrib/elftoolchain/libelf/gelf_phdr.c ============================================================================== --- stable/11/contrib/elftoolchain/libelf/gelf_phdr.c Fri Aug 31 17:35:09 2018 (r338413) +++ stable/11/contrib/elftoolchain/libelf/gelf_phdr.c Fri Aug 31 17:36:45 2018 (r338414) @@ -31,7 +31,7 @@ #include "_libelf.h" -ELFTC_VCSID("$Id: gelf_phdr.c 3177 2015-03-30 18:19:41Z emaste $"); +ELFTC_VCSID("$Id: gelf_phdr.c 3576 2017-09-14 02:15:29Z emaste $"); Elf32_Phdr * elf32_getphdr(Elf *e) Modified: stable/11/contrib/elftoolchain/libelf/libelf_ehdr.c ============================================================================== --- stable/11/contrib/elftoolchain/libelf/libelf_ehdr.c Fri Aug 31 17:35:09 2018 (r338413) +++ stable/11/contrib/elftoolchain/libelf/libelf_ehdr.c Fri Aug 31 17:36:45 2018 (r338414) @@ -31,7 +31,7 @@ #include "_libelf.h" -ELFTC_VCSID("$Id: libelf_ehdr.c 3174 2015-03-27 17:13:41Z emaste $"); +ELFTC_VCSID("$Id: libelf_ehdr.c 3575 2017-09-14 02:13:36Z emaste $"); /* * Retrieve counts for sections, phdrs and the section string table index Modified: stable/11/contrib/elftoolchain/libelftc/Makefile ============================================================================== --- stable/11/contrib/elftoolchain/libelftc/Makefile Fri Aug 31 17:35:09 2018 (r338413) +++ stable/11/contrib/elftoolchain/libelftc/Makefile Fri Aug 31 17:36:45 2018 (r338414) @@ -1,6 +1,6 @@ -# $Id: Makefile 3489 2016-08-31 00:12:15Z emaste $ +# $Id: Makefile 3601 2018-04-12 16:58:53Z jkoshy $ -TOP= ${.CURDIR}/.. +TOP= .. LIB= elftc @@ -28,7 +28,8 @@ SHLIB_MAJOR= 1 WARNS?= 6 -CLEANFILES+= elftc_version.c +ELFTC_VERSION_FILE= ${.OBJDIR}/elftc_version.c +CLEANFILES+= ${ELFTC_VERSION_FILE} LDADD+= -lelf @@ -50,10 +51,10 @@ MLINKS= elftc_bfd_find_target.3 elftc_bfd_target_byteo elftc_string_table_create.3 elftc_string_table_insert.3 \ elftc_string_table_create.3 elftc_string_table_lookup.3 -.if !make(clean) && !make(clobber) +.if !make(clean) && !make(clobber) && !make(obj) .BEGIN: .SILENT - ${.CURDIR}/make-toolchain-version -t ${TOP} -r ${RELEASE} \ - -h ${OS_HOST} + ${.CURDIR}/make-toolchain-version -t ${.CURDIR}/${TOP} \ + -r ${RELEASE} -h ${OS_HOST} -o ${ELFTC_VERSION_FILE} .endif .include "${TOP}/mk/elftoolchain.lib.mk" Modified: stable/11/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c ============================================================================== --- stable/11/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c Fri Aug 31 17:35:09 2018 (r338413) +++ stable/11/contrib/elftoolchain/libelftc/libelftc_dem_gnu3.c Fri Aug 31 17:36:45 2018 (r338414) @@ -37,7 +37,7 @@ #include "_libelftc.h" -ELFTC_VCSID("$Id: libelftc_dem_gnu3.c 3560 2017-06-25 00:28:23Z kaiwang27 $"); +ELFTC_VCSID("$Id: libelftc_dem_gnu3.c 3583 2017-10-15 15:38:47Z emaste $"); /** * @file cpp_demangle.c @@ -574,8 +574,7 @@ cpp_demangle_push_type_qualifier(struct cpp_demangle_d if (!DEM_PUSH_STR(ddata, " imaginary")) goto clean; if (type_str != NULL) { - if (!vector_str_push(&subst_v, " imaginary", - 10)) + if (!VEC_PUSH_STR(&subst_v, " imaginary")) goto clean; if (!cpp_demangle_push_subst_v(ddata, &subst_v)) @@ -1616,8 +1615,7 @@ cpp_demangle_read_encoding(struct cpp_demangle_data *d case SIMPLE_HASH('T', 'v'): /* virtual function virtual override thunk */ - if (!DEM_PUSH_STR(ddata, - "virtual function virtual override ")) + if (!DEM_PUSH_STR(ddata, "virtual function virtual override ")) return (0); ddata->cur += 2; if (*ddata->cur == '\0') Modified: stable/11/contrib/elftoolchain/libpe/Makefile ============================================================================== --- stable/11/contrib/elftoolchain/libpe/Makefile Fri Aug 31 17:35:09 2018 (r338413) +++ stable/11/contrib/elftoolchain/libpe/Makefile Fri Aug 31 17:36:45 2018 (r338414) @@ -1,6 +1,6 @@ -# $Id: Makefile 3349 2016-01-18 21:09:16Z jkoshy $ +# $Id: Makefile 3594 2018-04-11 18:26:50Z jkoshy $ -TOP= ${.CURDIR}/.. +TOP= .. LIB= pe Modified: stable/11/contrib/elftoolchain/nm/nm.1 ============================================================================== --- stable/11/contrib/elftoolchain/nm/nm.1 Fri Aug 31 17:35:09 2018 (r338413) +++ stable/11/contrib/elftoolchain/nm/nm.1 Fri Aug 31 17:36:45 2018 (r338414) @@ -22,9 +22,9 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $Id: nm.1 3195 2015-05-12 17:22:19Z emaste $ +.\" $Id: nm.1 3573 2017-09-14 02:06:31Z emaste $ .\" -.Dd May 21, 2017 +.Dd September 13, 2017 .Os .Dt NM 1 .Sh NAME Modified: stable/11/contrib/elftoolchain/readelf/readelf.c ============================================================================== --- stable/11/contrib/elftoolchain/readelf/readelf.c Fri Aug 31 17:35:09 2018 (r338413) +++ stable/11/contrib/elftoolchain/readelf/readelf.c Fri Aug 31 17:36:45 2018 (r338414) @@ -47,7 +47,7 @@ #include "_elftc.h" -ELFTC_VCSID("$Id: readelf.c 3519 2017-04-09 23:15:58Z kaiwang27 $"); +ELFTC_VCSID("$Id: readelf.c 3580 2017-09-15 23:29:59Z emaste $"); /* Backwards compatability for older FreeBSD releases. */ #ifndef STB_GNU_UNIQUE @@ -822,6 +822,7 @@ dt_type(unsigned int mach, unsigned int dtype) case DT_SUNW_RTLDINF: return "SUNW_RTLDINF"; case DT_SUNW_FILTER: return "SUNW_FILTER"; case DT_SUNW_CAP: return "SUNW_CAP"; + case DT_SUNW_ASLR: return "SUNW_ASLR"; case DT_CHECKSUM: return "CHECKSUM"; case DT_PLTPADSZ: return "PLTPADSZ"; case DT_MOVEENT: return "MOVEENT"; Modified: stable/11/contrib/elftoolchain/strings/strings.c ============================================================================== --- stable/11/contrib/elftoolchain/strings/strings.c Fri Aug 31 17:35:09 2018 (r338413) +++ stable/11/contrib/elftoolchain/strings/strings.c Fri Aug 31 17:36:45 2018 (r338414) @@ -46,7 +46,7 @@ #include "_elftc.h" -ELFTC_VCSID("$Id: strings.c 3498 2016-10-26 19:25:13Z emaste $"); +ELFTC_VCSID("$Id: strings.c 3571 2017-09-14 02:04:50Z emaste $"); enum radix_style { RADIX_DECIMAL, Modified: stable/11/lib/libelftc/elftc_version.c ============================================================================== --- stable/11/lib/libelftc/elftc_version.c Fri Aug 31 17:35:09 2018 (r338413) +++ stable/11/lib/libelftc/elftc_version.c Fri Aug 31 17:36:45 2018 (r338414) @@ -6,5 +6,5 @@ const char * elftc_version(void) { - return "elftoolchain r3561M"; + return "elftoolchain r3614M"; } From owner-svn-src-stable@freebsd.org Sat Sep 1 10:01:20 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 22941FE6343; Sat, 1 Sep 2018 10:01:20 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C85F683529; Sat, 1 Sep 2018 10:01: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 C352092A; Sat, 1 Sep 2018 10:01: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 w81A1Jjl039341; Sat, 1 Sep 2018 10:01:19 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w81A1JgW039340; Sat, 1 Sep 2018 10:01:19 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201809011001.w81A1JgW039340@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 1 Sep 2018 10:01: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: r338420 - stable/11/sys/i386/i386 X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/i386/i386 X-SVN-Commit-Revision: 338420 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.27 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, 01 Sep 2018 10:01:20 -0000 Author: kib Date: Sat Sep 1 10:01:19 2018 New Revision: 338420 URL: https://svnweb.freebsd.org/changeset/base/338420 Log: MFC r338313: Remove dead code in i386 cpu_throw(). Modified: stable/11/sys/i386/i386/swtch.s Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/i386/i386/swtch.s ============================================================================== --- stable/11/sys/i386/i386/swtch.s Sat Sep 1 09:59:46 2018 (r338419) +++ stable/11/sys/i386/i386/swtch.s Sat Sep 1 10:01:19 2018 (r338420) @@ -74,16 +74,12 @@ */ ENTRY(cpu_throw) movl PCPU(CPUID), %esi - movl 4(%esp),%ecx /* Old thread */ - testl %ecx,%ecx /* no thread? */ - jz 1f /* release bit from old pm_active */ movl PCPU(CURPMAP), %ebx #ifdef SMP lock #endif btrl %esi, PM_ACTIVE(%ebx) /* clear old */ -1: movl 8(%esp),%ecx /* New thread */ movl TD_PCB(%ecx),%edx movl PCB_CR3(%edx),%eax From owner-svn-src-stable@freebsd.org Sat Sep 1 09:59:47 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8186FFE5F82; Sat, 1 Sep 2018 09:59:47 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 357928336F; Sat, 1 Sep 2018 09:59:47 +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 306D48E1; Sat, 1 Sep 2018 09:59:47 +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 w819xlIh038216; Sat, 1 Sep 2018 09:59:47 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w819xkVH038212; Sat, 1 Sep 2018 09:59:46 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201809010959.w819xkVH038212@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 1 Sep 2018 09:59: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: r338419 - in stable/11/sys: amd64/amd64 i386/i386 i386/include x86/x86 X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/11/sys: amd64/amd64 i386/i386 i386/include x86/x86 X-SVN-Commit-Revision: 338419 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.27 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, 01 Sep 2018 09:59:47 -0000 Author: kib Date: Sat Sep 1 09:59:46 2018 New Revision: 338419 URL: https://svnweb.freebsd.org/changeset/base/338419 Log: MFC r338312: Unify amd64 and i386 vmspace0 pmap activation. Modified: stable/11/sys/amd64/amd64/mp_machdep.c stable/11/sys/i386/i386/pmap.c stable/11/sys/i386/include/pmap.h stable/11/sys/x86/x86/mp_x86.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/amd64/mp_machdep.c ============================================================================== --- stable/11/sys/amd64/amd64/mp_machdep.c Sat Sep 1 02:23:45 2018 (r338418) +++ stable/11/sys/amd64/amd64/mp_machdep.c Sat Sep 1 09:59:46 2018 (r338419) @@ -56,7 +56,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include @@ -309,7 +308,6 @@ init_secondary(void) while (atomic_load_acq_int(&aps_ready) == 0) ia32_pause(); - pmap_activate_boot(vmspace_pmap(proc0.p_vmspace)); init_secondary_tail(); } Modified: stable/11/sys/i386/i386/pmap.c ============================================================================== --- stable/11/sys/i386/i386/pmap.c Sat Sep 1 02:23:45 2018 (r338418) +++ stable/11/sys/i386/i386/pmap.c Sat Sep 1 09:59:46 2018 (r338419) @@ -1857,9 +1857,9 @@ pmap_pinit0(pmap_t pmap) #endif pmap->pm_root.rt_root = 0; CPU_ZERO(&pmap->pm_active); - PCPU_SET(curpmap, pmap); TAILQ_INIT(&pmap->pm_pvchunk); bzero(&pmap->pm_stats, sizeof pmap->pm_stats); + pmap_activate_boot(pmap); } /* @@ -5595,6 +5595,20 @@ pmap_activate(struct thread *td) load_cr3(cr3); PCPU_SET(curpmap, pmap); critical_exit(); +} + +void +pmap_activate_boot(pmap_t pmap) +{ + u_int cpuid; + + cpuid = PCPU_GET(cpuid); +#if defined(SMP) + CPU_SET_ATOMIC(cpuid, &pmap->pm_active); +#else + CPU_SET(cpuid, &pmap->pm_active); +#endif + PCPU_SET(curpmap, pmap); } void Modified: stable/11/sys/i386/include/pmap.h ============================================================================== --- stable/11/sys/i386/include/pmap.h Sat Sep 1 02:23:45 2018 (r338418) +++ stable/11/sys/i386/include/pmap.h Sat Sep 1 09:59:46 2018 (r338419) @@ -373,6 +373,7 @@ extern vm_offset_t virtual_end; * is called: pmap_kenter(), pmap_kextract(), pmap_kremove(), vtophys(), and * vtopte(). */ +void pmap_activate_boot(pmap_t pmap); void pmap_bootstrap(vm_paddr_t); int pmap_cache_bits(int mode, boolean_t is_pde); int pmap_change_attr(vm_offset_t, vm_size_t, int); Modified: stable/11/sys/x86/x86/mp_x86.c ============================================================================== --- stable/11/sys/x86/x86/mp_x86.c Sat Sep 1 02:23:45 2018 (r338418) +++ stable/11/sys/x86/x86/mp_x86.c Sat Sep 1 09:59:46 2018 (r338419) @@ -61,6 +61,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -863,6 +864,8 @@ void init_secondary_tail(void) { u_int cpuid; + + pmap_activate_boot(vmspace_pmap(proc0.p_vmspace)); /* * On real hardware, switch to x2apic mode if possible. Do it From owner-svn-src-stable@freebsd.org Sat Sep 1 10:03:31 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5EDEFE6682; Sat, 1 Sep 2018 10:03:31 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 523738380B; Sat, 1 Sep 2018 10:03:31 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 49EFBA92; Sat, 1 Sep 2018 10:03:31 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w81A3Vej043612; Sat, 1 Sep 2018 10:03:31 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w81A3UQ3043608; Sat, 1 Sep 2018 10:03:30 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201809011003.w81A3UQ3043608@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 1 Sep 2018 10:03:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r338421 - stable/11/sys/dev/pci X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/dev/pci X-SVN-Commit-Revision: 338421 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.27 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, 01 Sep 2018 10:03:31 -0000 Author: kib Date: Sat Sep 1 10:03:30 2018 New Revision: 338421 URL: https://svnweb.freebsd.org/changeset/base/338421 Log: MFC r338024: Rudimentary AER reading code for ddb(4). Modified: stable/11/sys/dev/pci/pci.c stable/11/sys/dev/pci/pcivar.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/pci/pci.c ============================================================================== --- stable/11/sys/dev/pci/pci.c Sat Sep 1 10:01:19 2018 (r338420) +++ stable/11/sys/dev/pci/pci.c Sat Sep 1 10:03:30 2018 (r338421) @@ -394,6 +394,11 @@ static int pci_enable_ari = 1; SYSCTL_INT(_hw_pci, OID_AUTO, enable_ari, CTLFLAG_RDTUN, &pci_enable_ari, 0, "Enable support for PCIe Alternative RID Interpretation"); +static int pci_clear_aer_on_attach = 0; +SYSCTL_INT(_hw_pci, OID_AUTO, clear_aer_on_attach, CTLFLAG_RWTUN, + &pci_clear_aer_on_attach, 0, + "Clear port and device AER state on driver attach"); + static int pci_has_quirk(uint32_t devid, int quirk) { @@ -4195,17 +4200,98 @@ pci_create_iov_child_method(device_t bus, device_t pf, } #endif +static void +pci_add_child_clear_aer(device_t dev, struct pci_devinfo *dinfo) +{ + int aer; + uint32_t r; + uint16_t r2; + + if (dinfo->cfg.pcie.pcie_location != 0 && + dinfo->cfg.pcie.pcie_type == PCIEM_TYPE_ROOT_PORT) { + r2 = pci_read_config(dev, dinfo->cfg.pcie.pcie_location + + PCIER_ROOT_CTL, 2); + r2 &= ~(PCIEM_ROOT_CTL_SERR_CORR | + PCIEM_ROOT_CTL_SERR_NONFATAL | PCIEM_ROOT_CTL_SERR_FATAL); + pci_write_config(dev, dinfo->cfg.pcie.pcie_location + + PCIER_ROOT_CTL, r2, 2); + } + if (pci_find_extcap(dev, PCIZ_AER, &aer) == 0) { + r = pci_read_config(dev, aer + PCIR_AER_UC_STATUS, 4); + pci_write_config(dev, aer + PCIR_AER_UC_STATUS, r, 4); + if (r != 0 && bootverbose) { + pci_printf(&dinfo->cfg, + "clearing AER UC 0x%08x -> 0x%08x\n", + r, pci_read_config(dev, aer + PCIR_AER_UC_STATUS, + 4)); + } + + r = pci_read_config(dev, aer + PCIR_AER_UC_MASK, 4); + r &= ~(PCIM_AER_UC_TRAINING_ERROR | + PCIM_AER_UC_DL_PROTOCOL_ERROR | + PCIM_AER_UC_SURPRISE_LINK_DOWN | + PCIM_AER_UC_POISONED_TLP | + PCIM_AER_UC_FC_PROTOCOL_ERROR | + PCIM_AER_UC_COMPLETION_TIMEOUT | + PCIM_AER_UC_COMPLETER_ABORT | + PCIM_AER_UC_UNEXPECTED_COMPLETION | + PCIM_AER_UC_RECEIVER_OVERFLOW | + PCIM_AER_UC_MALFORMED_TLP | + PCIM_AER_UC_ECRC_ERROR | + PCIM_AER_UC_UNSUPPORTED_REQUEST | + PCIM_AER_UC_ACS_VIOLATION | + PCIM_AER_UC_INTERNAL_ERROR | + PCIM_AER_UC_MC_BLOCKED_TLP | + PCIM_AER_UC_ATOMIC_EGRESS_BLK | + PCIM_AER_UC_TLP_PREFIX_BLOCKED); + pci_write_config(dev, aer + PCIR_AER_UC_MASK, r, 4); + + r = pci_read_config(dev, aer + PCIR_AER_COR_STATUS, 4); + pci_write_config(dev, aer + PCIR_AER_COR_STATUS, r, 4); + if (r != 0 && bootverbose) { + pci_printf(&dinfo->cfg, + "clearing AER COR 0x%08x -> 0x%08x\n", + r, pci_read_config(dev, aer + PCIR_AER_COR_STATUS, + 4)); + } + + r = pci_read_config(dev, aer + PCIR_AER_COR_MASK, 4); + r &= ~(PCIM_AER_COR_RECEIVER_ERROR | + PCIM_AER_COR_BAD_TLP | + PCIM_AER_COR_BAD_DLLP | + PCIM_AER_COR_REPLAY_ROLLOVER | + PCIM_AER_COR_REPLAY_TIMEOUT | + PCIM_AER_COR_ADVISORY_NF_ERROR | + PCIM_AER_COR_INTERNAL_ERROR | + PCIM_AER_COR_HEADER_LOG_OVFLOW); + pci_write_config(dev, aer + PCIR_AER_COR_MASK, r, 4); + + r = pci_read_config(dev, dinfo->cfg.pcie.pcie_location + + PCIER_DEVICE_CTL, 2); + r |= PCIEM_CTL_COR_ENABLE | PCIEM_CTL_NFER_ENABLE | + PCIEM_CTL_FER_ENABLE | PCIEM_CTL_URR_ENABLE; + pci_write_config(dev, dinfo->cfg.pcie.pcie_location + + PCIER_DEVICE_CTL, r, 2); + } +} + void pci_add_child(device_t bus, struct pci_devinfo *dinfo) { - dinfo->cfg.dev = device_add_child(bus, NULL, -1); - device_set_ivars(dinfo->cfg.dev, dinfo); + device_t dev; + + dinfo->cfg.dev = dev = device_add_child(bus, NULL, -1); + device_set_ivars(dev, dinfo); resource_list_init(&dinfo->resources); - pci_cfg_save(dinfo->cfg.dev, dinfo, 0); - pci_cfg_restore(dinfo->cfg.dev, dinfo); + pci_cfg_save(dev, dinfo, 0); + pci_cfg_restore(dev, dinfo); pci_print_verbose(dinfo); - pci_add_resources(bus, dinfo->cfg.dev, 0, 0); + pci_add_resources(bus, dev, 0, 0); pci_child_added(dinfo->cfg.dev); + + if (pci_clear_aer_on_attach) + pci_add_child_clear_aer(dev, dinfo); + EVENTHANDLER_INVOKE(pci_add_device, dinfo->cfg.dev); } @@ -6210,3 +6296,128 @@ pcie_flr(device_t dev, u_int max_delay, bool force) pci_printf(&dinfo->cfg, "Transactions pending after FLR!\n"); return (true); } + +static void +pci_print_faulted_dev_name(const struct pci_devinfo *dinfo) +{ + const char *dev_name; + device_t dev; + + dev = dinfo->cfg.dev; + printf("pci%d:%d:%d:%d", dinfo->cfg.domain, dinfo->cfg.bus, + dinfo->cfg.slot, dinfo->cfg.func); + dev_name = device_get_name(dev); + if (dev_name != NULL) + printf(" (%s%d)", dev_name, device_get_unit(dev)); +} + +void +pci_print_faulted_dev(void) +{ + struct pci_devinfo *dinfo; + device_t dev; + int aer, i; + uint32_t r1, r2; + uint16_t status; + + STAILQ_FOREACH(dinfo, &pci_devq, pci_links) { + dev = dinfo->cfg.dev; + status = pci_read_config(dev, PCIR_STATUS, 2); + status &= PCIM_STATUS_MDPERR | PCIM_STATUS_STABORT | + PCIM_STATUS_RTABORT | PCIM_STATUS_RMABORT | + PCIM_STATUS_SERR | PCIM_STATUS_PERR; + if (status != 0) { + pci_print_faulted_dev_name(dinfo); + printf(" error 0x%04x\n", status); + } + if (dinfo->cfg.pcie.pcie_location != 0) { + status = pci_read_config(dev, + dinfo->cfg.pcie.pcie_location + + PCIER_DEVICE_STA, 2); + if ((status & (PCIEM_STA_CORRECTABLE_ERROR | + PCIEM_STA_NON_FATAL_ERROR | PCIEM_STA_FATAL_ERROR | + PCIEM_STA_UNSUPPORTED_REQ)) != 0) { + pci_print_faulted_dev_name(dinfo); + printf(" PCIe DEVCTL 0x%04x DEVSTA 0x%04x\n", + pci_read_config(dev, + dinfo->cfg.pcie.pcie_location + + PCIER_DEVICE_CTL, 2), + status); + } + } + if (pci_find_extcap(dev, PCIZ_AER, &aer) == 0) { + r1 = pci_read_config(dev, aer + PCIR_AER_UC_STATUS, 4); + r2 = pci_read_config(dev, aer + PCIR_AER_COR_STATUS, 4); + if (r1 != 0 || r2 != 0) { + pci_print_faulted_dev_name(dinfo); + printf(" AER UC 0x%08x Mask 0x%08x Svr 0x%08x\n" + " COR 0x%08x Mask 0x%08x Ctl 0x%08x\n", + r1, pci_read_config(dev, aer + + PCIR_AER_UC_MASK, 4), + pci_read_config(dev, aer + + PCIR_AER_UC_SEVERITY, 4), + r2, pci_read_config(dev, aer + + PCIR_AER_COR_MASK, 4), + pci_read_config(dev, aer + + PCIR_AER_CAP_CONTROL, 4)); + for (i = 0; i < 4; i++) { + r1 = pci_read_config(dev, aer + + PCIR_AER_HEADER_LOG + i * 4, 4); + printf(" HL%d: 0x%08x\n", i, r1); + } + } + } + } +} + +#ifdef DDB +DB_SHOW_COMMAND(pcierr, pci_print_faulted_dev_db) +{ + + pci_print_faulted_dev(); +} + +static void +db_clear_pcie_errors(const struct pci_devinfo *dinfo) +{ + device_t dev; + int aer; + uint32_t r; + + dev = dinfo->cfg.dev; + r = pci_read_config(dev, dinfo->cfg.pcie.pcie_location + + PCIER_DEVICE_STA, 2); + pci_write_config(dev, dinfo->cfg.pcie.pcie_location + + PCIER_DEVICE_STA, r, 2); + + if (pci_find_extcap(dev, PCIZ_AER, &aer) != 0) + return; + r = pci_read_config(dev, aer + PCIR_AER_UC_STATUS, 4); + if (r != 0) + pci_write_config(dev, aer + PCIR_AER_UC_STATUS, r, 4); + r = pci_read_config(dev, aer + PCIR_AER_COR_STATUS, 4); + if (r != 0) + pci_write_config(dev, aer + PCIR_AER_COR_STATUS, r, 4); +} + +DB_COMMAND(pci_clearerr, db_pci_clearerr) +{ + struct pci_devinfo *dinfo; + device_t dev; + uint16_t status, status1; + + STAILQ_FOREACH(dinfo, &pci_devq, pci_links) { + dev = dinfo->cfg.dev; + status1 = status = pci_read_config(dev, PCIR_STATUS, 2); + status1 &= PCIM_STATUS_MDPERR | PCIM_STATUS_STABORT | + PCIM_STATUS_RTABORT | PCIM_STATUS_RMABORT | + PCIM_STATUS_SERR | PCIM_STATUS_PERR; + if (status1 != 0) { + status &= ~status1; + pci_write_config(dev, PCIR_STATUS, status, 2); + } + if (dinfo->cfg.pcie.pcie_location != 0) + db_clear_pcie_errors(dinfo); + } +} +#endif Modified: stable/11/sys/dev/pci/pcivar.h ============================================================================== --- stable/11/sys/dev/pci/pcivar.h Sat Sep 1 10:01:19 2018 (r338420) +++ stable/11/sys/dev/pci/pcivar.h Sat Sep 1 10:03:30 2018 (r338421) @@ -620,6 +620,8 @@ bool pcie_flr(device_t dev, u_int max_delay, bool forc int pcie_get_max_completion_timeout(device_t dev); bool pcie_wait_for_pending_transactions(device_t dev, u_int max_delay); +void pci_print_faulted_dev(void); + #ifdef BUS_SPACE_MAXADDR #if (BUS_SPACE_MAXADDR > 0xFFFFFFFF) #define PCI_DMA_BOUNDARY 0x100000000 From owner-svn-src-stable@freebsd.org Sat Sep 1 16:13:57 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 51D04FF3AB8; Sat, 1 Sep 2018 16:13:57 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 00D7371FBA; Sat, 1 Sep 2018 16:13:57 +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 EA1F14C1B; Sat, 1 Sep 2018 16:13:56 +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 w81GDuwv036368; Sat, 1 Sep 2018 16:13:56 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w81GDunD036367; Sat, 1 Sep 2018 16:13:56 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201809011613.w81GDunD036367@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 1 Sep 2018 16:13:56 +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: r338425 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 338425 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.27 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, 01 Sep 2018 16:13:57 -0000 Author: markj Date: Sat Sep 1 16:13:56 2018 New Revision: 338425 URL: https://svnweb.freebsd.org/changeset/base/338425 Log: MFC r338365: Add a sysctl for the ZFS abd_scatter_enabled setting. Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c Sat Sep 1 15:07:38 2018 (r338424) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c Sat Sep 1 16:13:56 2018 (r338425) @@ -153,6 +153,8 @@ size_t zfs_abd_chunk_size = 4096; #if defined(__FreeBSD__) && defined(_KERNEL) SYSCTL_DECL(_vfs_zfs); +SYSCTL_INT(_vfs_zfs, OID_AUTO, abd_scatter_enabled, CTLFLAG_RWTUN, + &zfs_abd_scatter_enabled, 0, "Enable scattered ARC data buffers"); SYSCTL_ULONG(_vfs_zfs, OID_AUTO, abd_chunk_size, CTLFLAG_RDTUN, &zfs_abd_chunk_size, 0, "The size of the chunks ABD allocates"); #endif