From owner-svn-src-stable-11@freebsd.org Sun Dec 15 04:20:57 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 955991E1208; Sun, 15 Dec 2019 04:20:57 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47bB6K3Sj9z46t8; Sun, 15 Dec 2019 04:20:57 +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 723777877; Sun, 15 Dec 2019 04:20:57 +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 xBF4KvdB030632; Sun, 15 Dec 2019 04:20:57 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBF4Kv0w030631; Sun, 15 Dec 2019 04:20:57 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201912150420.xBF4Kv0w030631@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sun, 15 Dec 2019 04:20:57 +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: r355768 - stable/11 X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11 X-SVN-Commit-Revision: 355768 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-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Dec 2019 04:20:57 -0000 Author: emaste Date: Sun Dec 15 04:20:57 2019 New Revision: 355768 URL: https://svnweb.freebsd.org/changeset/base/355768 Log: MFC r355638: ObsoleteFiles.inc: chase libpcap update in r334277 libpcap 1.9.0 (pre-release) update removed the export-defs.h header. PR: 242559 Submitted by: John Hein Modified: stable/11/ObsoleteFiles.inc Directory Properties: stable/11/ (props changed) Modified: stable/11/ObsoleteFiles.inc ============================================================================== --- stable/11/ObsoleteFiles.inc Sun Dec 15 04:18:19 2019 (r355767) +++ stable/11/ObsoleteFiles.inc Sun Dec 15 04:20:57 2019 (r355768) @@ -620,6 +620,8 @@ OLD_FILES+=usr/include/c++/v1/__refstring OLD_FILES+=usr/include/c++/v1/__undef_min_max OLD_FILES+=usr/include/c++/v1/tr1/__refstring OLD_FILES+=usr/include/c++/v1/tr1/__undef_min_max +# 20180528: libpcap update removed header file +OLD_FILES+=usr/include/pcap/export-defs.h # 20180513: remove DTrace scripts made obsolete by dwatch(1) OLD_FILES+=usr/share/dtrace/watch_execve OLD_FILES+=usr/share/dtrace/watch_kill From owner-svn-src-stable-11@freebsd.org Sun Dec 15 21:28:09 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A0E4C1CFD19; Sun, 15 Dec 2019 21:28:09 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47bcvX5QJNz40Dl; Sun, 15 Dec 2019 21:28:08 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B525F1B29B; Sun, 15 Dec 2019 21:28:08 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xBFLS8OD037557; Sun, 15 Dec 2019 21:28:08 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBFLS8Xh037556; Sun, 15 Dec 2019 21:28:08 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201912152128.xBFLS8Xh037556@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sun, 15 Dec 2019 21:28:08 +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: r355785 - in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Group: stable-11 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 355785 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-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Dec 2019 21:28:09 -0000 Author: cy Date: Sun Dec 15 21:28:08 2019 New Revision: 355785 URL: https://svnweb.freebsd.org/changeset/base/355785 Log: MFC r355669: in6_cksum() returns zero when checksums are good. Modified: stable/11/sys/contrib/ipfilter/netinet/fil.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/sys/contrib/ipfilter/netinet/fil.c Directory Properties: stable/12/ (props changed) Modified: stable/11/sys/contrib/ipfilter/netinet/fil.c ============================================================================== --- stable/11/sys/contrib/ipfilter/netinet/fil.c Sun Dec 15 21:26:50 2019 (r355784) +++ stable/11/sys/contrib/ipfilter/netinet/fil.c Sun Dec 15 21:28:08 2019 (r355785) @@ -6744,7 +6744,7 @@ ipf_checkl4sum(fin) #endif DT3(l4sums, u_short, hdrsum, u_short, sum, fr_info_t *, fin); #ifdef USE_INET6 - if (hdrsum == sum || (sum == 0 && fin->fin_p == IPPROTO_ICMPV6)) { + if (hdrsum == sum || (sum == 0 && IP_V(fin->fin_ip) == 6)) { #else if (hdrsum == sum) { #endif From owner-svn-src-stable-11@freebsd.org Mon Dec 16 02:38:48 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E40E31D6165; Mon, 16 Dec 2019 02:38:48 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47blp05jZNz4Dsl; Mon, 16 Dec 2019 02:38:48 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A6D7C1E9C3; Mon, 16 Dec 2019 02:38:48 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xBG2cmfu020096; Mon, 16 Dec 2019 02:38:48 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBG2cm6m020093; Mon, 16 Dec 2019 02:38:48 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201912160238.xBG2cm6m020093@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Mon, 16 Dec 2019 02:38:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r355795 - in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Group: stable-11 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 355795 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-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Dec 2019 02:38:49 -0000 Author: cy Date: Mon Dec 16 02:38:47 2019 New Revision: 355795 URL: https://svnweb.freebsd.org/changeset/base/355795 Log: MFC r355670: Rather than pass the address of the packet information control block to ipf_pcksum6(), directly pass the adddress of the mbuf to it. This reduces one pointer dereference. ipf_pcksum6() doesn't use the packet information control block except to obtain the mbuf address. Modified: stable/11/sys/contrib/ipfilter/netinet/fil.c stable/11/sys/contrib/ipfilter/netinet/ip_fil.h stable/11/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/sys/contrib/ipfilter/netinet/fil.c stable/12/sys/contrib/ipfilter/netinet/ip_fil.h stable/12/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Directory Properties: stable/12/ (props changed) Modified: stable/11/sys/contrib/ipfilter/netinet/fil.c ============================================================================== --- stable/11/sys/contrib/ipfilter/netinet/fil.c Mon Dec 16 02:05:44 2019 (r355794) +++ stable/11/sys/contrib/ipfilter/netinet/fil.c Mon Dec 16 02:38:47 2019 (r355795) @@ -3436,7 +3436,7 @@ fr_cksum(fin, ip, l4proto, l4hdr) ip6 = (ip6_t *)ip; off = ((caddr_t)ip6 - m->m_data) + sizeof(struct ip6_hdr); int len = ntohs(ip6->ip6_plen) - (off - sizeof(*ip6)); - return(ipf_pcksum6(fin, ip6, off, len)); + return(ipf_pcksum6(m, ip6, off, len)); } else { return 0xffff; } Modified: stable/11/sys/contrib/ipfilter/netinet/ip_fil.h ============================================================================== --- stable/11/sys/contrib/ipfilter/netinet/ip_fil.h Mon Dec 16 02:05:44 2019 (r355794) +++ stable/11/sys/contrib/ipfilter/netinet/ip_fil.h Mon Dec 16 02:38:47 2019 (r355795) @@ -1840,7 +1840,7 @@ extern int ipf_matchicmpqueryreply __P((int, icmpinfo extern u_32_t ipf_newisn __P((fr_info_t *)); extern u_int ipf_pcksum __P((fr_info_t *, int, u_int)); #ifdef USE_INET6 -extern u_int ipf_pcksum6 __P((fr_info_t *, ip6_t *, +extern u_int ipf_pcksum6 __P((struct mbuf *, ip6_t *, u_int32_t, u_int32_t)); #endif extern void ipf_rule_expire __P((ipf_main_softc_t *)); Modified: stable/11/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c ============================================================================== --- stable/11/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Mon Dec 16 02:05:44 2019 (r355794) +++ stable/11/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Mon Dec 16 02:38:47 2019 (r355795) @@ -1450,17 +1450,15 @@ ipf_pcksum(fin, hlen, sum) #ifdef USE_INET6 u_int -ipf_pcksum6(fin, ip6, off, len) - fr_info_t *fin; +ipf_pcksum6(m, ip6, off, len) + struct mbuf *m; ip6_t *ip6; u_int32_t off; u_int32_t len; { #ifdef _KERNEL - struct mbuf *m; int sum; - m = fin->fin_m; if (m->m_len < sizeof(struct ip6_hdr)) { return 0xffff; } From owner-svn-src-stable-11@freebsd.org Mon Dec 16 18:04:31 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C61221CAACE; Mon, 16 Dec 2019 18:04:31 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47c8L74szCz47V2; Mon, 16 Dec 2019 18:04:31 +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 A27821082; Mon, 16 Dec 2019 18:04:31 +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 xBGI4Vpj073073; Mon, 16 Dec 2019 18:04:31 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBGI4VOx073072; Mon, 16 Dec 2019 18:04:31 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201912161804.xBGI4VOx073072@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 16 Dec 2019 18:04:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r355811 - stable/11/sys/dev/vt/hw/efifb X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/sys/dev/vt/hw/efifb X-SVN-Commit-Revision: 355811 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-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Dec 2019 18:04:31 -0000 Author: emaste Date: Mon Dec 16 18:04:31 2019 New Revision: 355811 URL: https://svnweb.freebsd.org/changeset/base/355811 Log: MFC r348059: vt efifb: add suspend/resume calls PR: 237050 Submitted by: Erik Kurzinger Modified: stable/11/sys/dev/vt/hw/efifb/efifb.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/vt/hw/efifb/efifb.c ============================================================================== --- stable/11/sys/dev/vt/hw/efifb/efifb.c Mon Dec 16 18:02:48 2019 (r355810) +++ stable/11/sys/dev/vt/hw/efifb/efifb.c Mon Dec 16 18:04:31 2019 (r355811) @@ -61,6 +61,8 @@ static struct vt_driver vt_efifb_driver = { .vd_setpixel = vt_fb_setpixel, .vd_fb_ioctl = vt_fb_ioctl, .vd_fb_mmap = vt_fb_mmap, + .vd_suspend = vt_suspend, + .vd_resume = vt_resume, /* Better than VGA, but still generic driver. */ .vd_priority = VD_PRIORITY_GENERIC + 1, }; From owner-svn-src-stable-11@freebsd.org Tue Dec 17 10:23:08 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BE1D11E2EA4; Tue, 17 Dec 2019 10:23:08 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47cZ3J4fb2z48Nr; Tue, 17 Dec 2019 10:23:08 +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 9AD67C809; Tue, 17 Dec 2019 10:23:08 +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 xBHAN8DL051861; Tue, 17 Dec 2019 10:23:08 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBHAN8dQ051860; Tue, 17 Dec 2019 10:23:08 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201912171023.xBHAN8dQ051860@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 17 Dec 2019 10:23:08 +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: r355850 - stable/11/sys/netpfil/ipfw X-SVN-Group: stable-11 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: stable/11/sys/netpfil/ipfw X-SVN-Commit-Revision: 355850 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-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Dec 2019 10:23:08 -0000 Author: ae Date: Tue Dec 17 10:23:08 2019 New Revision: 355850 URL: https://svnweb.freebsd.org/changeset/base/355850 Log: MFC r350413: Avoid possible lock leaking. After r343619 ipfw uses own locking for packets flow. PULLUP_LEN() macro is used in ipfw_chk() to make m_pullup(). When m_pullup() fails, it just returns via `goto pullup_failed`. There are two places where PULLUP_LEN() is called with IPFW_PF_RLOCK() held. Add PULLUP_LEN_LOCKED() macro to use in these places to be able release the lock, when m_pullup() fails. Sponsored by: Yandex LLC NOTE: since r343619 was not merged, this commit is mostly NOP, but it is needed to reduce code difference between stable and head/. Modified: stable/11/sys/netpfil/ipfw/ip_fw2.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netpfil/ipfw/ip_fw2.c ============================================================================== --- stable/11/sys/netpfil/ipfw/ip_fw2.c Tue Dec 17 10:00:19 2019 (r355849) +++ stable/11/sys/netpfil/ipfw/ip_fw2.c Tue Dec 17 10:23:08 2019 (r355850) @@ -1426,17 +1426,23 @@ ipfw_chk(struct ip_fw_args *args) * this way). */ #define PULLUP_TO(_len, p, T) PULLUP_LEN(_len, p, sizeof(T)) -#define PULLUP_LEN(_len, p, T) \ +#define _PULLUP_LOCKED(_len, p, T, unlock) \ do { \ int x = (_len) + T; \ if ((m)->m_len < x) { \ args->m = m = m_pullup(m, x); \ - if (m == NULL) \ + if (m == NULL) { \ + unlock; \ goto pullup_failed; \ + } \ } \ p = (mtod(m, char *) + (_len)); \ } while (0) +#define PULLUP_LEN(_len, p, T) _PULLUP_LOCKED(_len, p, T, ) +#define PULLUP_LEN_LOCKED(_len, p, T) \ + _PULLUP_LOCKED(_len, p, T, IPFW_PF_RUNLOCK(chain)); + /* * if we have an ether header, */ @@ -2267,7 +2273,7 @@ do { \ case O_TCPOPTS: if (proto == IPPROTO_TCP && offset == 0 && ulp){ - PULLUP_LEN(hlen, ulp, + PULLUP_LEN_LOCKED(hlen, ulp, (TCP(ulp)->th_off << 2)); match = tcpopts_match(TCP(ulp), cmd); } @@ -2292,7 +2298,7 @@ do { \ uint16_t mss, *p; int i; - PULLUP_LEN(hlen, ulp, + PULLUP_LEN_LOCKED(hlen, ulp, (TCP(ulp)->th_off << 2)); if ((tcpopts_parse(TCP(ulp), &mss) & IP_FW_TCPOPT_MSS) == 0) @@ -3143,6 +3149,7 @@ do { \ } /* end of inner loop, scan opcodes */ #undef PULLUP_LEN +#undef PULLUP_LEN_LOCKED if (done) break; From owner-svn-src-stable-11@freebsd.org Tue Dec 17 10:26:44 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B965F1E2F7D; Tue, 17 Dec 2019 10:26:44 +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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47cZ7S4XXbz48XT; Tue, 17 Dec 2019 10:26:44 +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 96614C810; Tue, 17 Dec 2019 10:26:44 +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 xBHAQiM7052074; Tue, 17 Dec 2019 10:26:44 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBHAQiqj052073; Tue, 17 Dec 2019 10:26:44 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201912171026.xBHAQiqj052073@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 17 Dec 2019 10:26:44 +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: r355851 - stable/11/sys/netpfil/ipfw X-SVN-Group: stable-11 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: stable/11/sys/netpfil/ipfw X-SVN-Commit-Revision: 355851 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-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Dec 2019 10:26:44 -0000 Author: ae Date: Tue Dec 17 10:26:44 2019 New Revision: 355851 URL: https://svnweb.freebsd.org/changeset/base/355851 Log: MFC r355581: Avoid access to stale ip pointer and call UPDATE_POINTERS() after PULLUP_LEN_LOCKED(). PULLUP_LEN_LOCKED() could update mbuf and thus we need to update related pointers that can be used in next opcodes. Reported by: Maxime Villard NOTE: this commit also adds UPDATE_POINTERS() stub macro, that originally is part of r345166 commit that was not merged. Modified: stable/11/sys/netpfil/ipfw/ip_fw2.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netpfil/ipfw/ip_fw2.c ============================================================================== --- stable/11/sys/netpfil/ipfw/ip_fw2.c Tue Dec 17 10:23:08 2019 (r355850) +++ stable/11/sys/netpfil/ipfw/ip_fw2.c Tue Dec 17 10:26:44 2019 (r355851) @@ -1441,7 +1441,15 @@ do { \ #define PULLUP_LEN(_len, p, T) _PULLUP_LOCKED(_len, p, T, ) #define PULLUP_LEN_LOCKED(_len, p, T) \ - _PULLUP_LOCKED(_len, p, T, IPFW_PF_RUNLOCK(chain)); + _PULLUP_LOCKED(_len, p, T, IPFW_PF_RUNLOCK(chain)); \ + UPDATE_POINTERS() +/* + * In case pointers got stale after pullups, update them. + */ +#define UPDATE_POINTERS() \ +do { \ + ip = mtod(m, struct ip *); \ +} while (0) /* * if we have an ether header, From owner-svn-src-stable-11@freebsd.org Tue Dec 17 15:03:52 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 67DC31EAA1E; Tue, 17 Dec 2019 15:03:52 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47chHD21qsz4RQZ; Tue, 17 Dec 2019 15:03:52 +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 40BECFAF5; Tue, 17 Dec 2019 15:03:52 +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 xBHF3qVU017472; Tue, 17 Dec 2019 15:03:52 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBHF3qS5017471; Tue, 17 Dec 2019 15:03:52 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201912171503.xBHF3qS5017471@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 17 Dec 2019 15:03:52 +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: r355857 - stable/11/share/vt/keymaps X-SVN-Group: stable-11 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/11/share/vt/keymaps X-SVN-Commit-Revision: 355857 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-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Dec 2019 15:03:52 -0000 Author: emaste Date: Tue Dec 17 15:03:51 2019 New Revision: 355857 URL: https://svnweb.freebsd.org/changeset/base/355857 Log: MFC r355575: Add missing language specifier for Hebrew il.kbd description PR: 235094 (related) Sponsored by: The FreeBSD Foundation Modified: stable/11/share/vt/keymaps/INDEX.keymaps Directory Properties: stable/11/ (props changed) Modified: stable/11/share/vt/keymaps/INDEX.keymaps ============================================================================== --- stable/11/share/vt/keymaps/INDEX.keymaps Tue Dec 17 15:02:29 2019 (r355856) +++ stable/11/share/vt/keymaps/INDEX.keymaps Tue Dec 17 15:03:51 2019 (r355857) @@ -248,7 +248,7 @@ gr.101.acc.kbd:el:Ελληνικό (101 πλήκτρω il.kbd:en:Hebrew il.kbd:de:Hebräisch il.kbd:fr:Hébreu -il.kbd::תירבע +il.kbd:he:תירבע hr.kbd:en:Croatian hr.kbd:de:Kroatisch From owner-svn-src-stable-11@freebsd.org Tue Dec 17 20:30:33 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 655E71C9307; Tue, 17 Dec 2019 20:30:33 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47cqX924Vkz3G8H; Tue, 17 Dec 2019 20:30:33 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 42A3B1B4B7; Tue, 17 Dec 2019 20:30:33 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xBHKUXGN007834; Tue, 17 Dec 2019 20:30:33 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBHKUXFP007833; Tue, 17 Dec 2019 20:30:33 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201912172030.xBHKUXFP007833@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Tue, 17 Dec 2019 20:30:33 +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: r355863 - stable/11/sys/cam/scsi X-SVN-Group: stable-11 X-SVN-Commit-Author: ken X-SVN-Commit-Paths: stable/11/sys/cam/scsi X-SVN-Commit-Revision: 355863 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-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Dec 2019 20:30:33 -0000 Author: ken Date: Tue Dec 17 20:30:32 2019 New Revision: 355863 URL: https://svnweb.freebsd.org/changeset/base/355863 Log: MFC r355299: ------------------------------------------------------------------------ r355299 | ken | 2019-12-02 14:57:39 -0500 (Mon, 02 Dec 2019) | 52 lines Fix a hang introduced in r351599. My changes in 351599 (kindly committed by avg) made the cd(4) media check asynchronous to avoid a sleep while holding a mutex. There was a difficult to reproduce bug with those changes that caused a hang on boot on some single processor machines/VMs. Leandro Lupori managed to reproduce the bug, diagnose it, and supplied a patch! Here is his analysis, from the PR: ====== I was able to reproduce the problem described in comment#14. Actually, I wasn't trying to reproduce it, I just started seeing it a few weeks ago, in CURRENT. I can reproduce it consistently, by using QEMU to run a PowerPC64 VM with a single core/thread (-smp 1). It happens only when there is no media in the emulated CD-ROM, a device that QEMU adds by default, unless -nodefaults is specified in command line. I've debugged it and this is what I've found: 1- After the CD probe is successful, GEOM will try to open the device, which will end up calling cdcheckmedia(), that sets CD state to CD_STATE_MEDIA_PREVENT. 2- Next, scsi_prevent() is executed and succeeds, the CD_FLAG_DISC_LOCKED flag is set and CD state moves to CD_STATE_MEDIA_SIZE. 3- Next, scsi_read_capacity() is executed and fails, state is set to CD_STATE_MEDIA_ALLOW, cdmediaprobedone() is called and wakes up cdcheckmedia(). 4- Then, when cdstart() is invoked to process CD_STATE_MEDIA_ALLOW, it first checks if CD_FLAG_DISC_LOCKED is set, and if so skips directly to CD_STATE_MEDIA_SIZE state. This will repeat the steps of bullet 3, entering an infinite MEDIA_SIZE command loop. When there is a least another core/thread, the GEOM thread that performed the initial cdopen() will get scheduled again, closing the CD device, that will call cdprevent(PR_ALLOW) that clears the CD_FLAG_DISC_LOCKED flag and breaks the loop. So, apparently, the problem is CD_STATE_MEDIA_ALLOW being skipped when CD_FLAG_DISC_LOCKED is set. If I understand correctly, in this case, the state should be advanced to CD_STATE_MEDIA size only when the current state is CD_STATE_MEDIA_PREVENT. ===== ------------------------------------------------------------------------ PR: kern/219857 Submitted by: Leandro Lupori Modified: stable/11/sys/cam/scsi/scsi_cd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cam/scsi/scsi_cd.c ============================================================================== --- stable/11/sys/cam/scsi/scsi_cd.c Tue Dec 17 20:29:47 2019 (r355862) +++ stable/11/sys/cam/scsi/scsi_cd.c Tue Dec 17 20:30:32 2019 (r355863) @@ -1009,7 +1009,8 @@ cdstart(struct cam_periph *periph, union ccb *start_cc * If the CD is already locked, we don't need to do this. * Move on to the capacity check. */ - if ((softc->flags & CD_FLAG_DISC_LOCKED) != 0) { + if (softc->state == CD_STATE_MEDIA_PREVENT + && (softc->flags & CD_FLAG_DISC_LOCKED) != 0) { softc->state = CD_STATE_MEDIA_SIZE; xpt_release_ccb(start_ccb); xpt_schedule(periph, CAM_PRIORITY_NORMAL); From owner-svn-src-stable-11@freebsd.org Tue Dec 17 23:45:50 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C56E11CD9B7; Tue, 17 Dec 2019 23:45:50 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47cvsV4vyVz3Qq8; Tue, 17 Dec 2019 23:45:50 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A22D81D940; Tue, 17 Dec 2019 23:45:50 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xBHNjoGB025455; Tue, 17 Dec 2019 23:45:50 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBHNjokv025454; Tue, 17 Dec 2019 23:45:50 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201912172345.xBHNjokv025454@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Tue, 17 Dec 2019 23:45:50 +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: r355869 - stable/11/usr.bin/netstat X-SVN-Group: stable-11 X-SVN-Commit-Author: bz X-SVN-Commit-Paths: stable/11/usr.bin/netstat X-SVN-Commit-Revision: 355869 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-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Dec 2019 23:45:50 -0000 Author: bz Date: Tue Dec 17 23:45:50 2019 New Revision: 355869 URL: https://svnweb.freebsd.org/changeset/base/355869 Log: MFC r350522: IPv6 cleanup: netstat Rename the variable for the in6_addr from in6p to ia6 to follow the convention generally used in FreeBSD. No functional changes. Sponsored by: Netflix Modified: stable/11/usr.bin/netstat/inet6.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/netstat/inet6.c ============================================================================== --- stable/11/usr.bin/netstat/inet6.c Tue Dec 17 23:45:34 2019 (r355868) +++ stable/11/usr.bin/netstat/inet6.c Tue Dec 17 23:45:50 2019 (r355869) @@ -1306,7 +1306,7 @@ inet6print(const char *container, struct in6_addr *in6 */ char * -inet6name(struct in6_addr *in6p) +inet6name(struct in6_addr *ia6) { struct sockaddr_in6 sin6; char hbuf[NI_MAXHOST], *cp; @@ -1315,7 +1315,7 @@ inet6name(struct in6_addr *in6p) static int first = 1; int flags, error; - if (IN6_IS_ADDR_UNSPECIFIED(in6p)) { + if (IN6_IS_ADDR_UNSPECIFIED(ia6)) { strcpy(line, "*"); return (line); } @@ -1328,9 +1328,9 @@ inet6name(struct in6_addr *in6p) domain[0] = 0; } memset(&sin6, 0, sizeof(sin6)); - memcpy(&sin6.sin6_addr, in6p, sizeof(*in6p)); + memcpy(&sin6.sin6_addr, ia6, sizeof(*ia6)); sin6.sin6_family = AF_INET6; - /* XXX: in6p.s6_addr[2] can contain scopeid. */ + /* XXX: ia6.s6_addr[2] can contain scopeid. */ in6_fillscopeid(&sin6); flags = (numeric_addr) ? NI_NUMERICHOST : 0; error = getnameinfo((struct sockaddr *)&sin6, sizeof(sin6), hbuf, From owner-svn-src-stable-11@freebsd.org Thu Dec 19 02:04:41 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 25DEF1D0242; Thu, 19 Dec 2019 02:04:41 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47dZvF0DqJz44NG; Thu, 19 Dec 2019 02:04:41 +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 0335F783C; Thu, 19 Dec 2019 02:04:41 +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 xBJ24eiD060724; Thu, 19 Dec 2019 02:04:40 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBJ24e1X060723; Thu, 19 Dec 2019 02:04:40 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201912190204.xBJ24e1X060723@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 19 Dec 2019 02:04: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: r355896 - in stable: 11/usr.sbin/ntp 11/usr.sbin/ntp/scripts 12/usr.sbin/ntp 12/usr.sbin/ntp/scripts X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/usr.sbin/ntp 11/usr.sbin/ntp/scripts 12/usr.sbin/ntp 12/usr.sbin/ntp/scripts X-SVN-Commit-Revision: 355896 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-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Dec 2019 02:04:41 -0000 Author: kevans Date: Thu Dec 19 02:04:40 2019 New Revision: 355896 URL: https://svnweb.freebsd.org/changeset/base/355896 Log: usr.sbin/ntp: don't emit versions w/ make -s defines ECHO=echo when not using make -s, and ECHO=true when using make -s. export ECHO for ntp products and use it in the mkver script to echo the version. This suppresses the output as appropriate. ECHO is given a default value to make sure things still work as expected for anyone that isn't redefining ECHO. Modified: stable/11/usr.sbin/ntp/Makefile.inc stable/11/usr.sbin/ntp/scripts/mkver Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/usr.sbin/ntp/Makefile.inc stable/12/usr.sbin/ntp/scripts/mkver Directory Properties: stable/12/ (props changed) Modified: stable/11/usr.sbin/ntp/Makefile.inc ============================================================================== --- stable/11/usr.sbin/ntp/Makefile.inc Thu Dec 19 01:34:34 2019 (r355895) +++ stable/11/usr.sbin/ntp/Makefile.inc Thu Dec 19 02:04:40 2019 (r355896) @@ -16,4 +16,6 @@ CFLAGS+= -DOPENSSL -DUSE_OPENSSL_CRYPTO_RAND -DAUTOKEY WARNS?= 0 +.export ECHO + .include "../Makefile.inc" Modified: stable/11/usr.sbin/ntp/scripts/mkver ============================================================================== --- stable/11/usr.sbin/ntp/scripts/mkver Thu Dec 19 01:34:34 2019 (r355895) +++ stable/11/usr.sbin/ntp/scripts/mkver Thu Dec 19 02:04:40 2019 (r355896) @@ -4,6 +4,8 @@ # PROG=${1-UNKNOWN} +: ${ECHO:=echo} + ConfStr="$PROG" ConfStr="$ConfStr 4.2.8p12" @@ -32,7 +34,7 @@ echo $RUN > .version ConfStr="$ConfStr (${RUN})" -echo "Version <${ConfStr}>"; +${ECHO} "Version <${ConfStr}>"; rm -f version.c cat > version.c << -EoF- From owner-svn-src-stable-11@freebsd.org Thu Dec 19 02:05:49 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 20F8C1D03C5; Thu, 19 Dec 2019 02:05:49 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47dZwY0995z44dH; Thu, 19 Dec 2019 02:05:49 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 010037846; Thu, 19 Dec 2019 02:05:49 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xBJ25mAR060860; Thu, 19 Dec 2019 02:05:48 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBJ25mZ8060859; Thu, 19 Dec 2019 02:05:48 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201912190205.xBJ25mZ8060859@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 19 Dec 2019 02:05:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r355897 - in stable: 11/stand/liblua 12/stand/liblua X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/stand/liblua 12/stand/liblua X-SVN-Commit-Revision: 355897 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-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Dec 2019 02:05:49 -0000 Author: kevans Date: Thu Dec 19 02:05:48 2019 New Revision: 355897 URL: https://svnweb.freebsd.org/changeset/base/355897 Log: stand: liblua: drop default buffer size to 128 Lua allocates LUAL_BUFFERSIZE buffers on the stack for various string functions (string.format, string.gsub) -- this works out to be somewhat significant and not necessary, based on how we use string operations. Dropping it risks having to allocate per call to format/gsub, but this is not the case for our usage. This simply stops allocating 8K buffers on the stack when luaL_Buffer is used. Modified: stable/11/stand/liblua/luaconf.h Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/stand/liblua/luaconf.h Directory Properties: stable/12/ (props changed) Modified: stable/11/stand/liblua/luaconf.h ============================================================================== --- stable/11/stand/liblua/luaconf.h Thu Dec 19 02:04:40 2019 (r355896) +++ stable/11/stand/liblua/luaconf.h Thu Dec 19 02:05:48 2019 (r355897) @@ -783,11 +783,7 @@ ** smaller buffer would force a memory allocation for each call to ** 'string.format'.) */ -#if LUA_FLOAT_TYPE == LUA_FLOAT_LONGDOUBLE -#define LUAL_BUFFERSIZE 8192 -#else -#define LUAL_BUFFERSIZE ((int)(0x80 * sizeof(void*) * sizeof(lua_Integer))) -#endif +#define LUAL_BUFFERSIZE 128 /* }================================================================== */ From owner-svn-src-stable-11@freebsd.org Thu Dec 19 02:09:18 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4B1071D077A; Thu, 19 Dec 2019 02:09:18 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47db0Z21kVz451l; Thu, 19 Dec 2019 02:09:18 +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 26609785C; Thu, 19 Dec 2019 02:09:18 +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 xBJ29ItW061084; Thu, 19 Dec 2019 02:09:18 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBJ29Gcn061078; Thu, 19 Dec 2019 02:09:16 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201912190209.xBJ29Gcn061078@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 19 Dec 2019 02:09:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r355898 - in stable: 11/include 11/lib/libc/gen 11/lib/libc/tests/gen 12/include 12/lib/libc/gen 12/lib/libc/tests/gen X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/include 11/lib/libc/gen 11/lib/libc/tests/gen 12/include 12/lib/libc/gen 12/lib/libc/tests/gen X-SVN-Commit-Revision: 355898 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-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Dec 2019 02:09:18 -0000 Author: kevans Date: Thu Dec 19 02:09:16 2019 New Revision: 355898 URL: https://svnweb.freebsd.org/changeset/base/355898 Log: Add sigsetop extensions commonly found in musl libc and glibc These functions (sigandset, sigisemptyset, sigorset) are commonly available in at least musl libc and glibc; sigorset, at least, has proven quite useful in qemu-bsd-user work for tracking the current process signal mask in a more self-documenting/aesthetically pleasing manner. Added: stable/11/lib/libc/tests/gen/sigsetops_test.c - copied unchanged from r355641, head/lib/libc/tests/gen/sigsetops_test.c Modified: stable/11/include/signal.h stable/11/lib/libc/gen/Makefile.inc stable/11/lib/libc/gen/Symbol.map stable/11/lib/libc/gen/sigsetops.3 stable/11/lib/libc/gen/sigsetops.c stable/11/lib/libc/tests/gen/Makefile Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Added: stable/12/lib/libc/tests/gen/sigsetops_test.c - copied unchanged from r355641, head/lib/libc/tests/gen/sigsetops_test.c Modified: stable/12/include/signal.h stable/12/lib/libc/gen/Makefile.inc stable/12/lib/libc/gen/Symbol.map stable/12/lib/libc/gen/sigsetops.3 stable/12/lib/libc/gen/sigsetops.c stable/12/lib/libc/tests/gen/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/11/include/signal.h ============================================================================== --- stable/11/include/signal.h Thu Dec 19 02:05:48 2019 (r355897) +++ stable/11/include/signal.h Thu Dec 19 02:09:16 2019 (r355898) @@ -120,7 +120,10 @@ void psignal(int, const char *); #endif #if __BSD_VISIBLE +int sigandset(sigset_t *dest, const sigset_t *left, const sigset_t *right); int sigblock(int); +int sigisemptyset(const sigset_t *set); +int sigorset(sigset_t *dest, const sigset_t *left, const sigset_t *right); int sigreturn(const struct __ucontext *); int sigsetmask(int); int sigstack(const struct sigstack *, struct sigstack *); Modified: stable/11/lib/libc/gen/Makefile.inc ============================================================================== --- stable/11/lib/libc/gen/Makefile.inc Thu Dec 19 02:05:48 2019 (r355897) +++ stable/11/lib/libc/gen/Makefile.inc Thu Dec 19 02:09:16 2019 (r355898) @@ -473,10 +473,13 @@ MLINKS+=setjmp.3 _longjmp.3 \ MLINKS+=setmode.3 getmode.3 MLINKS+=setproctitle.3 setproctitle_fast.3 MLINKS+=sigsetops.3 sigaddset.3 \ + sigsetops.3 sigandset.3 \ sigsetops.3 sigdelset.3 \ sigsetops.3 sigemptyset.3 \ sigsetops.3 sigfillset.3 \ - sigsetops.3 sigismember.3 + sigsetops.3 sigisemptyset.3 \ + sigsetops.3 sigismember.3 \ + sigsetops.3 sigorset.3 MLINKS+=statvfs.3 fstatvfs.3 MLINKS+=stringlist.3 sl_add.3 \ stringlist.3 sl_find.3 \ Modified: stable/11/lib/libc/gen/Symbol.map ============================================================================== --- stable/11/lib/libc/gen/Symbol.map Thu Dec 19 02:05:48 2019 (r355897) +++ stable/11/lib/libc/gen/Symbol.map Thu Dec 19 02:09:16 2019 (r355898) @@ -424,6 +424,12 @@ FBSD_1.5 { setproctitle_fast; }; +FBSD_1.6 { + sigandset; + sigisemptyset; + sigorset; +}; + FBSDprivate_1.0 { /* needed by thread libraries */ __thr_jtable; Modified: stable/11/lib/libc/gen/sigsetops.3 ============================================================================== --- stable/11/lib/libc/gen/sigsetops.3 Thu Dec 19 02:05:48 2019 (r355897) +++ stable/11/lib/libc/gen/sigsetops.3 Thu Dec 19 02:09:16 2019 (r355898) @@ -28,15 +28,18 @@ .\" @(#)sigsetops.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd December 16, 2004 +.Dd October 29, 2019 .Dt SIGSETOPS 3 .Os .Sh NAME .Nm sigemptyset , .Nm sigfillset , .Nm sigaddset , +.Nm sigandset , .Nm sigdelset , -.Nm sigismember +.Nm sigisemptyset , +.Nm sigismember , +.Nm sigorset .Nd manipulate signal sets .Sh LIBRARY .Lb libc @@ -49,9 +52,15 @@ .Ft int .Fn sigaddset "sigset_t *set" "int signo" .Ft int +.Fn sigandset "sigset_t *set" "const sigset_t *left" "const sigset_t *right" +.Ft int .Fn sigdelset "sigset_t *set" "int signo" .Ft int +.Fn sigisemptyset "const sigset_t *set" +.Ft int .Fn sigismember "const sigset_t *set" "int signo" +.Ft int +.Fn sigorset "sigset_t *set" "const sigset_t *left" "const sigset_t *right" .Sh DESCRIPTION These functions manipulate signal sets stored in a .Fa sigset_t . @@ -78,22 +87,54 @@ function adds the specified signal to the signal set. .Pp The +.Fn sigandset +function sets the specified +.Fa set +to the logical AND of all signals from the +.Fa left +and +.Fa right +signal sets. +.Pp +The .Fn sigdelset function deletes the specified signal .Fa signo from the signal set. .Pp The +.Fn sigisemptyset +function returns whether the specified +.Fa set +is empty or not. +.Pp +The .Fn sigismember function returns whether a specified signal .Fa signo is contained in the signal set. +.Pp +The +.Fn sigorset +function sets the specified +.Fa set +to the logical OR of all signals from the +.Fa left +and +.Fa right +signal sets. .Sh RETURN VALUES The +.Fn sigisemptyset +function returns 1 +if the set is empty, 0 otherwise. +.Pp +The .Fn sigismember function returns 1 if the signal is a member of the set, 0 otherwise. +.Pp The other functions return 0 upon success. A \-1 return value indicates an error occurred and the global variable @@ -113,5 +154,13 @@ has an invalid value. .Xr sigprocmask 2 , .Xr sigsuspend 2 .Sh STANDARDS -These functions are defined by +The +.Fn sigandset , +.Fn sigisemptyset , +and +.Fn sigorset +functions are FreeBSD extensions, compatible with functions of the same name +provided by both musl libc and GNU libc. +.Pp +The rest of these functions are defined by .St -p1003.1-88 . Modified: stable/11/lib/libc/gen/sigsetops.c ============================================================================== --- stable/11/lib/libc/gen/sigsetops.c Thu Dec 19 02:05:48 2019 (r355897) +++ stable/11/lib/libc/gen/sigsetops.c Thu Dec 19 02:09:16 2019 (r355898) @@ -83,6 +83,37 @@ sigfillset(sigset_t *set) } int +sigorset(sigset_t *dest, const sigset_t *left, const sigset_t *right) +{ + int i; + + for (i = 0; i < _SIG_WORDS; i++) + dest->__bits[i] = left->__bits[i] | right->__bits[i]; + return (0); +} + +int +sigandset(sigset_t *dest, const sigset_t *left, const sigset_t *right) +{ + int i; + + for (i = 0; i < _SIG_WORDS; i++) + dest->__bits[i] = left->__bits[i] & right->__bits[i]; + return (0); +} + +int +sigisemptyset(const sigset_t *set) +{ + int i; + + for (i = 0; i < _SIG_WORDS; i++) + if (set->__bits[i] != 0) + return (0); + return (1); +} + +int sigismember(const sigset_t *set, int signo) { Modified: stable/11/lib/libc/tests/gen/Makefile ============================================================================== --- stable/11/lib/libc/tests/gen/Makefile Thu Dec 19 02:05:48 2019 (r355897) +++ stable/11/lib/libc/tests/gen/Makefile Thu Dec 19 02:09:16 2019 (r355898) @@ -13,6 +13,7 @@ ATF_TESTS_C+= ftw_test ATF_TESTS_C+= popen_test ATF_TESTS_C+= posix_spawn_test ATF_TESTS_C+= realpath2_test +ATF_TESTS_C+= sigsetops_test ATF_TESTS_C+= wordexp_test # TODO: t_closefrom, t_cpuset, t_fmtcheck, t_randomid, Copied: stable/11/lib/libc/tests/gen/sigsetops_test.c (from r355641, head/lib/libc/tests/gen/sigsetops_test.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/lib/libc/tests/gen/sigsetops_test.c Thu Dec 19 02:09:16 2019 (r355898, copy of r355641, head/lib/libc/tests/gen/sigsetops_test.c) @@ -0,0 +1,191 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019 Kyle Evans + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +#include + +/* Return the status of the specified sig's bit. */ +static bool +sigbitstatus(const sigset_t *set, int sig) +{ + + return (set->__bits[_SIG_WORD(sig)] & _SIG_BIT(sig)) != 0; +} + +/* Verify that sig is the lone bit set in the sigset. */ +static void +siglonebit(const sigset_t *set, int sig) +{ + int i; + + for (i = 0; i < _SIG_WORDS; ++i) { + if (i != _SIG_WORD(sig)) + ATF_REQUIRE_MSG(set->__bits[i] == 0, + "word %d altered to %x", i, set->__bits[i]); + else + ATF_REQUIRE_MSG((set->__bits[i] & ~_SIG_BIT(sig)) == 0, + "word %d has other bits set: %x", i, + set->__bits[i] & ~_SIG_BIT(sig)); + } +} + +static void +sigcompare(const sigset_t *left, const sigset_t *right) +{ + int i; + + for (i = 0; i < _SIG_WORDS; ++i) { + ATF_REQUIRE_MSG(left->__bits[i] == right->__bits[i], + "sig comparison failed at %d; left=%x, right=%x", + i, left->__bits[i], right->__bits[i]); + } +} + +/* + * Test implementation details of our sigsetops... make sure the correct bits + * are getting set, for the most part, and that duplicate operations don't + * error out. + */ +ATF_TC_WITHOUT_HEAD(posix_sigsetop_test); +ATF_TC_BODY(posix_sigsetop_test, tc) +{ + sigset_t set; + int i; + + ATF_REQUIRE(sigfillset(&set) == 0); + for (i = 0; i < _SIG_WORDS; ++i) { + ATF_REQUIRE_MSG(set.__bits[i] == ~0U, "sigfillset failed @ %d", + i); + } + ATF_REQUIRE(sigemptyset(&set) == 0); + for (i = 0; i < _SIG_WORDS; ++i) { + ATF_REQUIRE_MSG(set.__bits[i] == 0, "sigemptyset failed @ %d", + i); + } + /* Ensure that sigismember reflects the empty set status. */ + for (i = 1; i < NSIG; ++i) { + ATF_REQUIRE(sigismember(&set, i) == 0); + } + + ATF_REQUIRE(sigaddset(&set, -1) == -1 && errno == EINVAL); + ATF_REQUIRE(sigaddset(&set, _SIG_MAXSIG + 1) == -1 && errno == EINVAL); + ATF_REQUIRE(sigdelset(&set, -1) == -1 && errno == EINVAL); + ATF_REQUIRE(sigdelset(&set, _SIG_MAXSIG + 1) == -1 && errno == EINVAL); + + ATF_REQUIRE(sigaddset(&set, SIGSEGV) == 0); + ATF_REQUIRE(sigismember(&set, SIGSEGV) != 0); + ATF_REQUIRE_MSG(sigbitstatus(&set, SIGSEGV), "sigaddset failure"); + siglonebit(&set, SIGSEGV); + + /* + * A second addition should succeed without altering the state. This + * should be trivially true. + */ + ATF_REQUIRE(sigaddset(&set, SIGSEGV) == 0); + ATF_REQUIRE_MSG(sigbitstatus(&set, SIGSEGV), + "sigaddset twice changed bit"); + + ATF_REQUIRE(sigdelset(&set, SIGSEGV) == 0); + ATF_REQUIRE_MSG(!sigbitstatus(&set, SIGSEGV), "sigdelset failure"); + ATF_REQUIRE(sigismember(&set, SIGSEGV) == 0); + ATF_REQUIRE(sigdelset(&set, SIGSEGV) == 0); + ATF_REQUIRE_MSG(!sigbitstatus(&set, SIGSEGV), + "sigdelset twice changed bit"); + for (i = 0; i < _SIG_WORDS; ++i) { + ATF_REQUIRE_MSG(set.__bits[i] == 0, "set not empty @ %d", + i); + } + for (i = 1; i < NSIG; ++i) { + ATF_REQUIRE(sigismember(&set, i) == 0); + } +} + +/* + * Test extended sigset ops for union/intersection and testing of empty set. + */ +ATF_TC_WITHOUT_HEAD(extended_sigsetop_test); +ATF_TC_BODY(extended_sigsetop_test, tc) +{ + sigset_t chkset, set1, set2, set3; + + sigemptyset(&chkset); + sigemptyset(&set1); + sigemptyset(&set2); + ATF_REQUIRE(sigisemptyset(&chkset) != 0); + sigaddset(&set1, SIGSEGV); + sigaddset(&set2, SIGKILL); + sigaddset(&chkset, SIGSEGV); + ATF_REQUIRE(sigisemptyset(&chkset) == 0); + sigaddset(&chkset, SIGKILL); + ATF_REQUIRE(sigorset(&set3, &set1, &set2) == 0); + ATF_REQUIRE(sigbitstatus(&set3, SIGSEGV)); + ATF_REQUIRE(sigbitstatus(&set3, SIGKILL)); + + /* + * chkset was built with our POSIX-specified set operations that we've + * already tested, so it's a good comparison. + */ + sigcompare(&chkset, &set3); + /* + * Clear chkset; make sure sigisemptyset() still looks ok. sigaddset + * and sigdelset have already been tested to make sure that they're not + * touching other bits. + */ + sigdelset(&chkset, SIGSEGV); + sigdelset(&chkset, SIGKILL); + ATF_REQUIRE(sigisemptyset(&chkset) != 0); + ATF_REQUIRE(sigandset(&set3, &set1, &set2) == 0); + /* Make sure we clobbered these. */ + ATF_REQUIRE(!sigbitstatus(&set3, SIGSEGV)); + ATF_REQUIRE(!sigbitstatus(&set3, SIGKILL)); + ATF_REQUIRE(sigisemptyset(&set3) != 0); + /* Rebuild for sigandset test */ + sigemptyset(&set1); + sigemptyset(&set2); + sigaddset(&set1, SIGSEGV); + sigaddset(&set1, SIGKILL); + sigaddset(&set2, SIGSEGV); + ATF_REQUIRE(sigandset(&set3, &set1, &set2) == 0); + ATF_REQUIRE(sigbitstatus(&set3, SIGSEGV)); + ATF_REQUIRE(!sigbitstatus(&set3, SIGKILL)); +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, posix_sigsetop_test); + ATF_TP_ADD_TC(tp, extended_sigsetop_test); + + return (atf_no_error()); +} From owner-svn-src-stable-11@freebsd.org Thu Dec 19 02:14:50 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2B3971D0CFE; Thu, 19 Dec 2019 02:14:50 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47db6y0Mr2z45Zv; Thu, 19 Dec 2019 02:14:50 +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 0302B7A3B; Thu, 19 Dec 2019 02:14:50 +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 xBJ2Enjb066548; Thu, 19 Dec 2019 02:14:49 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBJ2Eng8066547; Thu, 19 Dec 2019 02:14:49 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201912190214.xBJ2Eng8066547@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 19 Dec 2019 02:14:49 +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: r355899 - in stable: 11/sys/sys 12/sys/sys X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/sys/sys 12/sys/sys X-SVN-Commit-Revision: 355899 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-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Dec 2019 02:14:50 -0000 Author: kevans Date: Thu Dec 19 02:14:49 2019 New Revision: 355899 URL: https://svnweb.freebsd.org/changeset/base/355899 Log: MFC r355643: __FreeBSD__version bumps for sigsetops Modified: stable/11/sys/sys/param.h Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/sys/sys/param.h Directory Properties: stable/12/ (props changed) Modified: stable/11/sys/sys/param.h ============================================================================== --- stable/11/sys/sys/param.h Thu Dec 19 02:09:16 2019 (r355898) +++ stable/11/sys/sys/param.h Thu Dec 19 02:14:49 2019 (r355899) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1103504 /* Master, propagated to newvers */ +#define __FreeBSD_version 1103505 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-stable-11@freebsd.org Thu Dec 19 02:19:05 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 192C91D0F6A; Thu, 19 Dec 2019 02:19:05 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47dbCr6tyWz45tH; Thu, 19 Dec 2019 02:19:04 +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 E7E137A4C; Thu, 19 Dec 2019 02:19:04 +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 xBJ2J4Rv066802; Thu, 19 Dec 2019 02:19:04 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBJ2J4Nf066801; Thu, 19 Dec 2019 02:19:04 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201912190219.xBJ2J4Nf066801@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 19 Dec 2019 02:19: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: r355900 - in stable: 11/include 12/include X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable: 11/include 12/include X-SVN-Commit-Revision: 355900 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-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Dec 2019 02:19:05 -0000 Author: kevans Date: Thu Dec 19 02:19:04 2019 New Revision: 355900 URL: https://svnweb.freebsd.org/changeset/base/355900 Log: MFC r355761: : remove redundant __BSD_VISIBLE This bit is already inside of a larger __BSD_VISIBLE block. Modified: stable/11/include/unistd.h Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/include/unistd.h Directory Properties: stable/12/ (props changed) Modified: stable/11/include/unistd.h ============================================================================== --- stable/11/include/unistd.h Thu Dec 19 02:14:49 2019 (r355899) +++ stable/11/include/unistd.h Thu Dec 19 02:19:04 2019 (r355900) @@ -550,11 +550,9 @@ pid_t rfork_thread(int, void *, int (*)(void *), void int rresvport(int *); int rresvport_af(int *, int); int ruserok(const char *, int, const char *, const char *); -#if __BSD_VISIBLE #ifndef _SELECT_DECLARED #define _SELECT_DECLARED int select(int, fd_set *, fd_set *, fd_set *, struct timeval *); -#endif #endif int setdomainname(const char *, int); int setgroups(int, const gid_t *); From owner-svn-src-stable-11@freebsd.org Thu Dec 19 02:24:25 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ECB611D13C7; Thu, 19 Dec 2019 02:24:25 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47dbL15yBtz46gj; Thu, 19 Dec 2019 02:24:25 +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 C7A077C14; Thu, 19 Dec 2019 02:24:25 +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 xBJ2OPkZ072732; Thu, 19 Dec 2019 02:24:25 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBJ2OPb1072731; Thu, 19 Dec 2019 02:24:25 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201912190224.xBJ2OPb1072731@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 19 Dec 2019 02:24:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r355901 - stable/11/lib/libc X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/11/lib/libc X-SVN-Commit-Revision: 355901 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-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Dec 2019 02:24:26 -0000 Author: kevans Date: Thu Dec 19 02:24:25 2019 New Revision: 355901 URL: https://svnweb.freebsd.org/changeset/base/355901 Log: MFC r340383: Create namespace for the symbols added during 13-CURRENT cycle. Pointy hat to: kevans Modified: stable/11/lib/libc/Versions.def Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/Versions.def ============================================================================== --- stable/11/lib/libc/Versions.def Thu Dec 19 02:19:04 2019 (r355900) +++ stable/11/lib/libc/Versions.def Thu Dec 19 02:24:25 2019 (r355901) @@ -31,6 +31,9 @@ FBSD_1.4 { FBSD_1.5 { } FBSD_1.4; +# This version was first added to 13.0-current. +FBSD_1.6 { +} FBSD_1.5; # This is our private namespace. Any global interfaces that are # strictly for use only by other FreeBSD applications and libraries @@ -39,4 +42,4 @@ FBSD_1.5 { # # Please do NOT increment the version of this namespace. FBSDprivate_1.0 { -} FBSD_1.5; +} FBSD_1.6; From owner-svn-src-stable-11@freebsd.org Fri Dec 20 16:05:30 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 22F001DD0A7; Fri, 20 Dec 2019 16:05:30 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47fYVx72HXz46fC; Fri, 20 Dec 2019 16:05:29 +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 ECB3112C3; Fri, 20 Dec 2019 16:05:29 +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 xBKG5TLF007885; Fri, 20 Dec 2019 16:05:29 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBKG5TjV007884; Fri, 20 Dec 2019 16:05:29 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201912201605.xBKG5TjV007884@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 20 Dec 2019 16:05:29 +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: r355934 - stable/11/sys/dev/an X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/11/sys/dev/an X-SVN-Commit-Revision: 355934 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-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Dec 2019 16:05:30 -0000 Author: markj Date: Fri Dec 20 16:05:29 2019 New Revision: 355934 URL: https://svnweb.freebsd.org/changeset/base/355934 Log: MFC r355864: an(4): Require privileges for all SIOCGAIRONET requests. Modified: stable/11/sys/dev/an/if_an.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/an/if_an.c ============================================================================== --- stable/11/sys/dev/an/if_an.c Fri Dec 20 16:04:26 2019 (r355933) +++ stable/11/sys/dev/an/if_an.c Fri Dec 20 16:05:29 2019 (r355934) @@ -1873,6 +1873,7 @@ an_ioctl(struct ifnet *ifp, u_long command, caddr_t da int len; int i, max; struct an_softc *sc; + struct an_req *areq; struct ifreq *ifr; struct thread *td = curthread; struct ieee80211req *ireq; @@ -1932,17 +1933,21 @@ an_ioctl(struct ifnet *ifp, u_long command, caddr_t da error = 0; break; case SIOCGAIRONET: - error = copyin(ifr_data_get_ptr(ifr), &sc->areq, - sizeof(sc->areq)); - if (error != 0) + error = priv_check(td, PRIV_DRIVER); + if (error) break; + areq = malloc(sizeof(*areq), M_TEMP, M_WAITOK); + error = copyin(ifr_data_get_ptr(ifr), areq, sizeof(*areq)); + if (error != 0) { + free(areq, M_TEMP); + break; + } AN_LOCK(sc); + memcpy(&sc->areq, areq, sizeof(sc->areq)); #ifdef ANCACHE if (sc->areq.an_type == AN_RID_ZERO_CACHE) { - error = priv_check(td, PRIV_DRIVER); - if (error) - break; sc->an_sigitems = sc->an_nextitem = 0; + free(areq, M_TEMP); break; } else if (sc->areq.an_type == AN_RID_READ_CACHE) { char *pt = (char *)&sc->areq.an_val; @@ -1958,12 +1963,14 @@ an_ioctl(struct ifnet *ifp, u_long command, caddr_t da #endif if (an_read_record(sc, (struct an_ltv_gen *)&sc->areq)) { AN_UNLOCK(sc); + free(areq, M_TEMP); error = EINVAL; break; } + memcpy(areq, &sc->areq, sizeof(*areq)); AN_UNLOCK(sc); - error = copyout(&sc->areq, ifr_data_get_ptr(ifr), - sizeof(sc->areq)); + error = copyout(areq, ifr_data_get_ptr(ifr), sizeof(*areq)); + free(areq, M_TEMP); break; case SIOCSAIRONET: if ((error = priv_check(td, PRIV_DRIVER))) From owner-svn-src-stable-11@freebsd.org Fri Dec 20 22:12:22 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8870A1E558C; Fri, 20 Dec 2019 22:12:22 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47fjfG36Nlz4Vqg; Fri, 20 Dec 2019 22:12:22 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 66165590F; Fri, 20 Dec 2019 22:12:22 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xBKMCMj0027996; Fri, 20 Dec 2019 22:12:22 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBKMCMhw027995; Fri, 20 Dec 2019 22:12:22 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201912202212.xBKMCMhw027995@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Fri, 20 Dec 2019 22:12:22 +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: r355965 - stable/11/sys/dev/ata/chipsets X-SVN-Group: stable-11 X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: stable/11/sys/dev/ata/chipsets X-SVN-Commit-Revision: 355965 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-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Dec 2019 22:12:22 -0000 Author: brooks Date: Fri Dec 20 22:12:21 2019 New Revision: 355965 URL: https://svnweb.freebsd.org/changeset/base/355965 Log: MFC r355830: Avoid a tautological bitwise compare. This looks like a bit of debugging code that sliped into the initial import of the sos@ ATA framework. This changes the behavior to omit a line of output that appears to have been intended for omission. Reviewed by: mav Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D22845 Modified: stable/11/sys/dev/ata/chipsets/ata-promise.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/ata/chipsets/ata-promise.c ============================================================================== --- stable/11/sys/dev/ata/chipsets/ata-promise.c Fri Dec 20 22:07:05 2019 (r355964) +++ stable/11/sys/dev/ata/chipsets/ata-promise.c Fri Dec 20 22:12:21 2019 (r355965) @@ -793,7 +793,7 @@ ata_promise_mio_reset(device_t dev) if (ata_sata_phy_reset(dev, -1, 1)) { u_int32_t signature = ch->hw.softreset(dev, ATA_PM); - if (1 | bootverbose) + if (bootverbose) device_printf(dev, "SIGNATURE: %08x\n", signature); switch (signature >> 16) { From owner-svn-src-stable-11@freebsd.org Fri Dec 20 23:08:10 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A82E31E6554; Fri, 20 Dec 2019 23:08:10 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47fktf43Lwz4Y6X; Fri, 20 Dec 2019 23:08:10 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 86643622C; Fri, 20 Dec 2019 23:08:10 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xBKN8AZZ058059; Fri, 20 Dec 2019 23:08:10 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBKN8Av1058058; Fri, 20 Dec 2019 23:08:10 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201912202308.xBKN8Av1058058@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Fri, 20 Dec 2019 23:08: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: r355967 - stable/11/sys/rpc/rpcsec_gss X-SVN-Group: stable-11 X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: stable/11/sys/rpc/rpcsec_gss X-SVN-Commit-Revision: 355967 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-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Dec 2019 23:08:10 -0000 Author: rmacklem Date: Fri Dec 20 23:08:10 2019 New Revision: 355967 URL: https://svnweb.freebsd.org/changeset/base/355967 Log: MFC: r355157, r355161 Add a cap on credential lifetime for Kerberized NFS. The kernel RPCSEC_GSS code sets the credential (called a client) lifetime to the lifetime of the Kerberos ticket, which is typically several hours. As such, when a user's credentials change such as being added to a new group, it can take several hours for this change to be recognized by the NFS server. This patch adds a sysctl called kern.rpc.gss.lifetime_max which can be set by a sysadmin to put a cap on the time to expire for the credentials, so that a sysadmin can reduce the timeout. It also fixes a bug, where time_uptime is added twice when GSS_C_INDEFINITE is returned for a lifetime. This has no effect in practice, since Kerberos never does this. PR: 242132 Modified: stable/11/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c ============================================================================== --- stable/11/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Fri Dec 20 22:53:23 2019 (r355966) +++ stable/11/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Fri Dec 20 23:08:10 2019 (r355967) @@ -177,6 +177,11 @@ SYSCTL_UINT(_kern_rpc_gss, OID_AUTO, client_max, CTLFL &svc_rpc_gss_client_max, 0, "Max number of rpc-gss clients"); +static u_int svc_rpc_gss_lifetime_max = 0; +SYSCTL_UINT(_kern_rpc_gss, OID_AUTO, lifetime_max, CTLFLAG_RW, + &svc_rpc_gss_lifetime_max, 0, + "Maximum lifetime (seconds) of rpc-gss clients"); + static u_int svc_rpc_gss_client_count; SYSCTL_UINT(_kern_rpc_gss, OID_AUTO, client_count, CTLFLAG_RD, &svc_rpc_gss_client_count, 0, @@ -947,8 +952,15 @@ svc_rpc_gss_accept_sec_context(struct svc_rpc_gss_clie * that out). */ if (cred_lifetime == GSS_C_INDEFINITE) - cred_lifetime = time_uptime + 24*60*60; + cred_lifetime = 24*60*60; + /* + * Cap cred_lifetime if sysctl kern.rpc.gss.lifetime_max is set. + */ + if (svc_rpc_gss_lifetime_max > 0 && cred_lifetime > + svc_rpc_gss_lifetime_max) + cred_lifetime = svc_rpc_gss_lifetime_max; + client->cl_expiration = time_uptime + cred_lifetime; /*