From owner-svn-src-head@freebsd.org Sat Aug 11 16:35:53 2018 Return-Path: Delivered-To: svn-src-head@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 0FC741072F85; Sat, 11 Aug 2018 16:35:53 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B8D7387566; Sat, 11 Aug 2018 16:35:52 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from venus.codepro.be (venus.codepro.be [IPv6:2a01:4f8:162:1127::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.codepro.be", Issuer "Gandi Standard SSL CA 2" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id 6ABC31143F; Sat, 11 Aug 2018 16:35:52 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from [172.28.128.1] (p5B34BA34.dip0.t-ipconnect.de [91.52.186.52]) (Authenticated sender: kp) by venus.codepro.be (Postfix) with ESMTPSA id 6B6C84CC09; Sat, 11 Aug 2018 18:35:50 +0200 (CEST) From: "Kristof Provost" To: "Cy Schubert" Cc: "Devin Teske" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r337611 - head/cddl/usr.sbin/dwatch/libexec Date: Sat, 11 Aug 2018 18:35:49 +0200 X-Mailer: MailMate (2.0BETAr6116) Message-ID: <2A5DDBE0-5A97-4B78-8A1E-5B1E11AE1B76@FreeBSD.org> In-Reply-To: <201808111630.w7BGUigO095292@slippy.cwsent.com> References: <201808111630.w7BGUigO095292@slippy.cwsent.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.27 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Aug 2018 16:35:53 -0000 On 11 Aug 2018, at 18:30, Cy Schubert wrote: > In message , > "Kristof > Provost > " writes: >> >> --=_MailMate_CF172F01-6AF0-4E9D-A175-454A09953300_= >> Content-Type: text/plain; format=flowed >> >> Hi Devin, >> >> On 11 Aug 2018, at 8:32, Devin Teske wrote: >>> Author: dteske >>> Date: Sat Aug 11 06:32:31 2018 >>> New Revision: 337611 >>> URL: https://svnweb.freebsd.org/changeset/base/337611 >>> >>> Log: >>> dwatch(1): Add systop profile >>> >>> Provides a top-like view of syscall consumers. >>> >>> MFC after: 3 days >>> X-MFC-to: stable/11 >>> Sponsored by: Smule, Inc. >>> >>> Added: >>> head/cddl/usr.sbin/dwatch/libexec/systop (contents, props >>> changed) >>> Modified: >>> head/cddl/usr.sbin/dwatch/libexec/Makefile >>> >>> Modified: head/cddl/usr.sbin/dwatch/libexec/Makefile >>> =========================================================================== >> === >>> --- head/cddl/usr.sbin/dwatch/libexec/Makefile Sat Aug 11 06:13:11 >>> 2018 (r337610) >>> +++ head/cddl/usr.sbin/dwatch/libexec/Makefile Sat Aug 11 06:32:31 >>> 2018 (r337611) >>> @@ -62,6 +62,7 @@ LINKS+= ${LIBEXECDIR}/dwatch/sendrecv >>> ${LIBEXECDIR}/dw >>> LINKS+= ${LIBEXECDIR}/dwatch/sendrecv ${LIBEXECDIR}/dwatch/send >>> LINKS+= ${LIBEXECDIR}/dwatch/sendrecv ${LIBEXECDIR}/dwatch/sendmsg >>> LINKS+= ${LIBEXECDIR}/dwatch/sendrecv ${LIBEXECDIR}/dwatch/sendto >>> +LINKS+= ${LIBEXECDIR}/dwatch/systop ${LIBEXECDIR}/dwatch/systop >> >> This breaks install world: >> install: link >> /usr/obj/usr/src/amd64.amd64/release/dist/base/usr/libexec/dwatch/systop >> -> >> /usr/obj/usr/src/amd64.amd64/release/dist/base/usr/libexec/dwatch/systop: >> No such file or directory >> >> Regards, >> Kristof > > Hi Kristof, > > This should get you going. > > Index: /opt/src/svn-current/cddl/usr.sbin/dwatch/libexec/Makefile > =================================================================== > --- /opt/src/svn-current/cddl/usr.sbin/dwatch/libexec/Makefile > (revision 337628) > +++ > /opt/src/svn-current/cddl/usr.sbin/dwatch/libexec/Makefile (working > copy) > @@ -12,6 +12,7 @@ > rw \ > sched \ > sendrecv \ > + systop \ > tcp \ > udp \ > udplite \ > @@ -62,7 +63,6 @@ > LINKS+= ${LIBEXECDIR}/dwatch/sendrecv ${LIBEXECDIR}/dwatch/send > LINKS+= ${LIBEXECDIR}/dwatch/sendrecv ${LIBEXECDIR}/dwatch/sendmsg > LINKS+= ${LIBEXECDIR}/dwatch/sendrecv ${LIBEXECDIR}/dwatch/sendto > -LINKS+= ${LIBEXECDIR}/dwatch/systop ${LIBEXECDIR}/dwatch/systop > LINKS+= ${LIBEXECDIR}/dwatch/tcp ${LIBEXECDIR}/dwatch/tcp-accept > LINKS+= ${LIBEXECDIR}/dwatch/tcp > ${LIBEXECDIR}/dwatch/tcp-accept-establ > ished > LINKS+= ${LIBEXECDIR}/dwatch/tcp > ${LIBEXECDIR}/dwatch/tcp-accept-refuse > d > Thanks for the pointer. Brad’s fixed it meanwhile. Regards, Kristof From owner-svn-src-head@freebsd.org Sat Aug 11 16:37:56 2018 Return-Path: Delivered-To: svn-src-head@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 C7F921073355; Sat, 11 Aug 2018 16:37:56 +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 75EC58822F; Sat, 11 Aug 2018 16:37:56 +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 574B619C5D; Sat, 11 Aug 2018 16:37:56 +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 w7BGbuX7025485; Sat, 11 Aug 2018 16:37:56 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7BGbucG025484; Sat, 11 Aug 2018 16:37:56 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201808111637.w7BGbucG025484@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Sat, 11 Aug 2018 16:37:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r337644 - head/sys/netpfil/pf X-SVN-Group: head X-SVN-Commit-Author: kp X-SVN-Commit-Paths: head/sys/netpfil/pf X-SVN-Commit-Revision: 337644 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Aug 2018 16:37:57 -0000 Author: kp Date: Sat Aug 11 16:37:55 2018 New Revision: 337644 URL: https://svnweb.freebsd.org/changeset/base/337644 Log: pf: Take the IF_ADDR_RLOCK() when iterating over the group list We did do this elsewhere in pf, but the lock was missing here. Sponsored by: Essen Hackathon Modified: head/sys/netpfil/pf/pf_if.c Modified: head/sys/netpfil/pf/pf_if.c ============================================================================== --- head/sys/netpfil/pf/pf_if.c Sat Aug 11 16:34:30 2018 (r337643) +++ head/sys/netpfil/pf/pf_if.c Sat Aug 11 16:37:55 2018 (r337644) @@ -297,11 +297,16 @@ pfi_kif_match(struct pfi_kif *rule_kif, struct pfi_kif if (rule_kif == NULL || rule_kif == packet_kif) return (1); - if (rule_kif->pfik_group != NULL) - /* XXXGL: locking? */ + if (rule_kif->pfik_group != NULL) { + IF_ADDR_RLOCK(packet_kif->pfik_ifp); CK_STAILQ_FOREACH(p, &packet_kif->pfik_ifp->if_groups, ifgl_next) - if (p->ifgl_group == rule_kif->pfik_group) + if (p->ifgl_group == rule_kif->pfik_group) { + IF_ADDR_RUNLOCK(packet_kif->pfik_ifp); return (1); + } + IF_ADDR_RUNLOCK(packet_kif->pfik_ifp); + } + return (0); }