From owner-svn-src-stable-12@freebsd.org Sun Dec 15 04:18:20 2019 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 126101E10D0; Sun, 15 Dec 2019 04:18:20 +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 47bB3H6khBz46k1; Sun, 15 Dec 2019 04:18:19 +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 DDEA47849; Sun, 15 Dec 2019 04:18:19 +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 xBF4IJB8029718; Sun, 15 Dec 2019 04:18:19 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBF4IJeV029717; Sun, 15 Dec 2019 04:18:19 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201912150418.xBF4IJeV029717@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:18:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r355767 - stable/12 X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/12 X-SVN-Commit-Revision: 355767 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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Dec 2019 04:18:20 -0000 Author: emaste Date: Sun Dec 15 04:18:19 2019 New Revision: 355767 URL: https://svnweb.freebsd.org/changeset/base/355767 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/12/ObsoleteFiles.inc Directory Properties: stable/12/ (props changed) Modified: stable/12/ObsoleteFiles.inc ============================================================================== --- stable/12/ObsoleteFiles.inc Sun Dec 15 04:08:24 2019 (r355766) +++ stable/12/ObsoleteFiles.inc Sun Dec 15 04:18:19 2019 (r355767) @@ -926,6 +926,8 @@ OLD_FILES+=usr/share/nls/es_ES.ISO8859-1/grep.cat OLD_FILES+=usr/share/nls/ru_RU.KOI8-R/grep.cat OLD_FILES+=usr/share/nls/uk_UA.UTF-8/grep.cat OLD_FILES+=usr/share/nls/ja_JP.UTF-8/grep.cat +# 20180528: libpcap update removed header file +OLD_FILES+=usr/include/pcap/export-defs.h # 20180517: retire vxge OLD_FILES+=usr/share/man/man4/if_vxge.4.gz OLD_FILES+=usr/share/man/man4/vxge.4.gz From owner-svn-src-stable-12@freebsd.org Sun Dec 15 08:23:39 2019 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9B5CC1E61B7; Sun, 15 Dec 2019 08:23:39 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 47bHVM3dCTz4Hdn; Sun, 15 Dec 2019 08:23:39 +0000 (UTC) (envelope-from delphij@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 77DEAA439; Sun, 15 Dec 2019 08:23:39 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xBF8NdqZ075049; Sun, 15 Dec 2019 08:23:39 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBF8NckM075046; Sun, 15 Dec 2019 08:23:38 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201912150823.xBF8NckM075046@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sun, 15 Dec 2019 08:23:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r355772 - in stable/12: libexec/getty sbin/ipfw X-SVN-Group: stable-12 X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: in stable/12: libexec/getty sbin/ipfw X-SVN-Commit-Revision: 355772 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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Dec 2019 08:23:39 -0000 Author: delphij Date: Sun Dec 15 08:23:38 2019 New Revision: 355772 URL: https://svnweb.freebsd.org/changeset/base/355772 Log: MFC r355222, r355260: r355222: Use strlcat(). r355260: Simplify code with strlcpy/strlcat. Modified: stable/12/libexec/getty/main.c stable/12/libexec/getty/subr.c stable/12/sbin/ipfw/dummynet.c Directory Properties: stable/12/ (props changed) Modified: stable/12/libexec/getty/main.c ============================================================================== --- stable/12/libexec/getty/main.c Sun Dec 15 06:26:47 2019 (r355771) +++ stable/12/libexec/getty/main.c Sun Dec 15 08:23:38 2019 (r355772) @@ -97,7 +97,6 @@ static int crmod, digit, lower, upper; char hostname[MAXHOSTNAMELEN]; static char name[MAXLOGNAME*3]; -static char dev[] = _PATH_DEV; static char ttyn[32]; #define OBUFSIZ 128 @@ -218,8 +217,8 @@ main(int argc, char *argv[]) if (argc <= 2 || strcmp(argv[2], "-") == 0) strcpy(ttyn, ttyname(STDIN_FILENO)); else { - strcpy(ttyn, dev); - strncat(ttyn, argv[2], sizeof(ttyn)-sizeof(dev)); + strcpy(ttyn, _PATH_DEV); + strlcat(ttyn, argv[2], sizeof(ttyn)); if (strcmp(argv[0], "+") != 0) { chown(ttyn, 0, 0); chmod(ttyn, 0600); Modified: stable/12/libexec/getty/subr.c ============================================================================== --- stable/12/libexec/getty/subr.c Sun Dec 15 06:26:47 2019 (r355771) +++ stable/12/libexec/getty/subr.c Sun Dec 15 08:23:38 2019 (r355772) @@ -89,10 +89,8 @@ gettable(const char *name, char *buf) l = 2; else l = strlen(sp->value) + 1; - if ((p = malloc(l)) != NULL) { - strncpy(p, sp->value, l); - p[l-1] = '\0'; - } + if ((p = malloc(l)) != NULL) + strlcpy(p, sp->value, l); /* * replace, even if NULL, else we'll * have problems with free()ing static mem Modified: stable/12/sbin/ipfw/dummynet.c ============================================================================== --- stable/12/sbin/ipfw/dummynet.c Sun Dec 15 06:26:47 2019 (r355771) +++ stable/12/sbin/ipfw/dummynet.c Sun Dec 15 08:23:38 2019 (r355772) @@ -497,7 +497,7 @@ print_flowset_parms(struct dn_fs *fs, char *prefix) fs->max_th, 1.0 * fs->max_p / (double)(1 << SCALE_RED)); if (fs->flags & DN_IS_ECN) - strncat(red, " (ecn)", 6); + strlcat(red, " (ecn)", sizeof(red)); #ifdef NEW_AQM /* get AQM parameters */ } else if (fs->flags & DN_IS_AQM) { From owner-svn-src-stable-12@freebsd.org Sun Dec 15 21:28:09 2019 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A0E701CFD1A; 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 47bcvY1NNlz40Dm; Sun, 15 Dec 2019 21:28:09 +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 2A88B1B29C; Sun, 15 Dec 2019 21:28:09 +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 xBFLS8io037563; 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 xBFLS8ja037562; Sun, 15 Dec 2019 21:28:08 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201912152128.xBFLS8ja037562@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-12@freebsd.org Subject: svn commit: r355785 - in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Group: stable-12 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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-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/12/sys/contrib/ipfilter/netinet/fil.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/contrib/ipfilter/netinet/fil.c Directory Properties: stable/11/ (props changed) Modified: stable/12/sys/contrib/ipfilter/netinet/fil.c ============================================================================== --- stable/12/sys/contrib/ipfilter/netinet/fil.c Sun Dec 15 21:26:50 2019 (r355784) +++ stable/12/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-12@freebsd.org Mon Dec 16 02:38:49 2019 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AA6B21D6170; Mon, 16 Dec 2019 02:38:49 +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 47blp1466pz4Dsm; Mon, 16 Dec 2019 02:38:49 +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 6E57E1E9C4; Mon, 16 Dec 2019 02:38:49 +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 xBG2cntA020104; Mon, 16 Dec 2019 02:38:49 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBG2cmiG020101; Mon, 16 Dec 2019 02:38:48 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201912160238.xBG2cmiG020101@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-12@freebsd.org Subject: svn commit: r355795 - in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Group: stable-12 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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-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/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) Changes in other areas also in this revision: 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) Modified: stable/12/sys/contrib/ipfilter/netinet/fil.c ============================================================================== --- stable/12/sys/contrib/ipfilter/netinet/fil.c Mon Dec 16 02:05:44 2019 (r355794) +++ stable/12/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/12/sys/contrib/ipfilter/netinet/ip_fil.h ============================================================================== --- stable/12/sys/contrib/ipfilter/netinet/ip_fil.h Mon Dec 16 02:05:44 2019 (r355794) +++ stable/12/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/12/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c ============================================================================== --- stable/12/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Mon Dec 16 02:05:44 2019 (r355794) +++ stable/12/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Mon Dec 16 02:38:47 2019 (r355795) @@ -1454,17 +1454,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-12@freebsd.org Mon Dec 16 15:41:14 2019 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1471A1E7584; Mon, 16 Dec 2019 15:41: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.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 47c58n6t1Tz3xCr; Mon, 16 Dec 2019 15:41:13 +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 E7126275BB; Mon, 16 Dec 2019 15:41:13 +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 xBGFfDpS083094; Mon, 16 Dec 2019 15:41:13 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBGFfDub083093; Mon, 16 Dec 2019 15:41:13 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201912161541.xBGFfDub083093@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 16 Dec 2019 15:41:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r355804 - stable/12/sys/dev/sound/pci/hda X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/dev/sound/pci/hda X-SVN-Commit-Revision: 355804 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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Dec 2019 15:41:14 -0000 Author: markj Date: Mon Dec 16 15:41:13 2019 New Revision: 355804 URL: https://svnweb.freebsd.org/changeset/base/355804 Log: MFC r353682 (by emaste): snd_hda: style(9) whitespace fixup PR: 241299 Modified: stable/12/sys/dev/sound/pci/hda/hdaa_patches.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/sound/pci/hda/hdaa_patches.c ============================================================================== --- stable/12/sys/dev/sound/pci/hda/hdaa_patches.c Mon Dec 16 14:08:49 2019 (r355803) +++ stable/12/sys/dev/sound/pci/hda/hdaa_patches.c Mon Dec 16 15:41:13 2019 (r355804) @@ -447,7 +447,7 @@ hdac_pin_patch(struct hdaa_widget *w) config = 0x01a1913d; break; } - } else if (id == HDA_CODEC_ALC256 && subid == DELL_I7577_SUBVENDOR ) { + } else if (id == HDA_CODEC_ALC256 && subid == DELL_I7577_SUBVENDOR) { switch (nid) { case 20: patch = "as=1 seq=0"; From owner-svn-src-stable-12@freebsd.org Mon Dec 16 15:41:33 2019 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4C8E21E75F4; Mon, 16 Dec 2019 15:41:33 +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 47c5986Tcgz3xM3; Mon, 16 Dec 2019 15:41:32 +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 D90BC275DA; Mon, 16 Dec 2019 15:41:32 +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 xBGFfWe2085438; Mon, 16 Dec 2019 15:41:32 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBGFfW41085436; Mon, 16 Dec 2019 15:41:32 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201912161541.xBGFfW41085436@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 16 Dec 2019 15:41:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r355805 - stable/12/sys/dev/sound/pci/hda X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/dev/sound/pci/hda X-SVN-Commit-Revision: 355805 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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Dec 2019 15:41:33 -0000 Author: markj Date: Mon Dec 16 15:41:32 2019 New Revision: 355805 URL: https://svnweb.freebsd.org/changeset/base/355805 Log: MFC r355570: Configure headphone redirection for the Dell L780 and X1 Carbon 7th gen. Modified: stable/12/sys/dev/sound/pci/hda/hdaa_patches.c stable/12/sys/dev/sound/pci/hda/hdac.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/sound/pci/hda/hdaa_patches.c ============================================================================== --- stable/12/sys/dev/sound/pci/hda/hdaa_patches.c Mon Dec 16 15:41:13 2019 (r355804) +++ stable/12/sys/dev/sound/pci/hda/hdaa_patches.c Mon Dec 16 15:41:32 2019 (r355805) @@ -390,7 +390,8 @@ hdac_pin_patch(struct hdaa_widget *w) break; } } else if (id == HDA_CODEC_ALC285 && - subid == LENOVO_X120KH_SUBVENDOR) { + (subid == LENOVO_X120KH_SUBVENDOR || + subid == LENOVO_X120QD_SUBVENDOR)) { switch (nid) { case 33: patch = "as=1 seq=15"; @@ -447,7 +448,8 @@ hdac_pin_patch(struct hdaa_widget *w) config = 0x01a1913d; break; } - } else if (id == HDA_CODEC_ALC256 && subid == DELL_I7577_SUBVENDOR) { + } else if (id == HDA_CODEC_ALC256 && (subid == DELL_I7577_SUBVENDOR || + subid == DELL_L7480_SUBVENDOR)) { switch (nid) { case 20: patch = "as=1 seq=0"; Modified: stable/12/sys/dev/sound/pci/hda/hdac.h ============================================================================== --- stable/12/sys/dev/sound/pci/hda/hdac.h Mon Dec 16 15:41:13 2019 (r355804) +++ stable/12/sys/dev/sound/pci/hda/hdac.h Mon Dec 16 15:41:32 2019 (r355805) @@ -200,6 +200,7 @@ #define DELL_V1400_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0227) #define DELL_V1500_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0228) #define DELL_I1300_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x01c9) +#define DELL_L7480_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x07a0) #define DELL_XPSM1210_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x01d7) #define DELL_OPLX745_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x01da) #define DELL_XPS9560_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x07be) @@ -258,6 +259,7 @@ #define LENOVO_X1CRBN_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21f9) #define LENOVO_X120BS_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x2227) #define LENOVO_X120KH_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x225c) +#define LENOVO_X120QD_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x2292) #define LENOVO_X220_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21da) #define LENOVO_X300_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x20ac) #define LENOVO_T400_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x20f2) From owner-svn-src-stable-12@freebsd.org Mon Dec 16 17:59:02 2019 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E10F11CA5E3; Mon, 16 Dec 2019 17:59:02 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 47c8Cp5fztz46dR; Mon, 16 Dec 2019 17:59:02 +0000 (UTC) (envelope-from manu@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 BD644EBF; Mon, 16 Dec 2019 17:59:02 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xBGHx2dM067527; Mon, 16 Dec 2019 17:59:02 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBGHx2SP067526; Mon, 16 Dec 2019 17:59:02 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201912161759.xBGHx2SP067526@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Mon, 16 Dec 2019 17:59:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r355808 - stable/12/sys/dev/flash X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: stable/12/sys/dev/flash X-SVN-Commit-Revision: 355808 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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Dec 2019 17:59:02 -0000 Author: manu Date: Mon Dec 16 17:59:02 2019 New Revision: 355808 URL: https://svnweb.freebsd.org/changeset/base/355808 Log: MFC r354086: flash: Add GigaDevice gd25q128 flash Add this flash chip which is a 128Mb spi flash. Modified: stable/12/sys/dev/flash/mx25l.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/flash/mx25l.c ============================================================================== --- stable/12/sys/dev/flash/mx25l.c Mon Dec 16 17:45:15 2019 (r355807) +++ stable/12/sys/dev/flash/mx25l.c Mon Dec 16 17:59:02 2019 (r355808) @@ -150,6 +150,7 @@ static struct mx25l_flash_ident flash_devices[] = { /* GigaDevice */ { "gd25q64", 0xc8, 0x4017, 64 * 1024, 128, FL_ERASE_4K }, + { "gd25q128", 0xc8, 0x4018, 64 * 1024, 256, FL_ERASE_4K }, }; static int From owner-svn-src-stable-12@freebsd.org Mon Dec 16 18:00:06 2019 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7DB451CA67D; Mon, 16 Dec 2019 18:00:06 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 47c8F22mPqz46nN; Mon, 16 Dec 2019 18:00:06 +0000 (UTC) (envelope-from manu@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 5A2C7EC9; Mon, 16 Dec 2019 18:00:06 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xBGI06tj067693; Mon, 16 Dec 2019 18:00:06 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBGI06Sn067692; Mon, 16 Dec 2019 18:00:06 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201912161800.xBGI06Sn067692@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Mon, 16 Dec 2019 18:00:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r355809 - stable/12/usr.bin/dtc X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: stable/12/usr.bin/dtc X-SVN-Commit-Revision: 355809 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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Dec 2019 18:00:06 -0000 Author: manu Date: Mon Dec 16 18:00:05 2019 New Revision: 355809 URL: https://svnweb.freebsd.org/changeset/base/355809 Log: MFC r354115: dtc: Allow multiple dts-v1 tag Some dts are including dtsi that also contain a /dts-v1/ tag at the top. GNU DTC doesn't seems to have a problem with that so fix our dtc to behave the same. Reviewed by: kevans Modified: stable/12/usr.bin/dtc/fdt.cc Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.bin/dtc/fdt.cc ============================================================================== --- stable/12/usr.bin/dtc/fdt.cc Mon Dec 16 17:59:02 2019 (r355808) +++ stable/12/usr.bin/dtc/fdt.cc Mon Dec 16 18:00:05 2019 (r355809) @@ -1563,11 +1563,11 @@ device_tree::parse_file(text_input_buffer &input, { input.next_token(); // Read the header - if (input.consume("/dts-v1/;")) + while (input.consume("/dts-v1/;")) { read_header = true; + input.next_token(); } - input.next_token(); if (input.consume("/plugin/;")) { is_plugin = true; From owner-svn-src-stable-12@freebsd.org Mon Dec 16 18:02:49 2019 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8A8441CAA04; Mon, 16 Dec 2019 18:02:49 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 47c8J936mVz47L0; Mon, 16 Dec 2019 18:02:49 +0000 (UTC) (envelope-from manu@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 66387107D; Mon, 16 Dec 2019 18:02:49 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xBGI2ns7072949; Mon, 16 Dec 2019 18:02:49 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBGI2n8f072948; Mon, 16 Dec 2019 18:02:49 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201912161802.xBGI2n8f072948@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Mon, 16 Dec 2019 18:02:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r355810 - stable/12/sys/arm/allwinner/clkng X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: stable/12/sys/arm/allwinner/clkng X-SVN-Commit-Revision: 355810 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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Dec 2019 18:02:49 -0000 Author: manu Date: Mon Dec 16 18:02:48 2019 New Revision: 355810 URL: https://svnweb.freebsd.org/changeset/base/355810 Log: MFC r354407: arm64: allwinner: a64: Do not init the video related clocks This should be handled by the video drivers and this break EFIFB as this changes clock setup by the bootloader. Modified: stable/12/sys/arm/allwinner/clkng/ccu_a64.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm/allwinner/clkng/ccu_a64.c ============================================================================== --- stable/12/sys/arm/allwinner/clkng/ccu_a64.c Mon Dec 16 18:00:05 2019 (r355809) +++ stable/12/sys/arm/allwinner/clkng/ccu_a64.c Mon Dec 16 18:02:48 2019 (r355810) @@ -789,10 +789,6 @@ static struct aw_clk_init a64_init_clks[] = { {"ahb1", "pll_periph0", 0, false}, {"ahb2", "pll_periph0", 0, false}, {"dram", "pll_ddr0", 0, false}, - {"pll_de", NULL, 432000000, true}, - {"de", "pll_de", 0, true}, - {"tcon0", "pll_video0-2x", 0, false}, - {"tcon1", "pll_video1", 0, false}, }; static int From owner-svn-src-stable-12@freebsd.org Mon Dec 16 18:05:29 2019 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0E0271CAB56; Mon, 16 Dec 2019 18:05:29 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 47c8MD6dWxz47fX; Mon, 16 Dec 2019 18:05:28 +0000 (UTC) (envelope-from manu@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 DDCC2108C; Mon, 16 Dec 2019 18:05:28 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xBGI5SGG073193; Mon, 16 Dec 2019 18:05:28 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBGI5SFV073192; Mon, 16 Dec 2019 18:05:28 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201912161805.xBGI5SFV073192@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Mon, 16 Dec 2019 18:05:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r355812 - stable/12/sys/arm64/rockchip X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: stable/12/sys/arm64/rockchip X-SVN-Commit-Revision: 355812 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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Dec 2019 18:05:29 -0000 Author: manu Date: Mon Dec 16 18:05:28 2019 New Revision: 355812 URL: https://svnweb.freebsd.org/changeset/base/355812 Log: MFC r355648-r355649 r355648: arm64: rockchip: rk_pinctrl: Add bias parsing based on the SoC type Not all rockchip have the same value for pullup/pulldown so add a function per SoC and call the right one to have the proper value. r355649: arm64: rockchip: rk_pinctrl: Fix parse_bias for RK3399 Only bank 0 and bank 2 are different than other rockchip SoC, fix this. While here remove some debug printfs that where added in r355648 X-MFC-With: r355648 Modified: stable/12/sys/arm64/rockchip/rk_pinctrl.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm64/rockchip/rk_pinctrl.c ============================================================================== --- stable/12/sys/arm64/rockchip/rk_pinctrl.c Mon Dec 16 18:04:31 2019 (r355811) +++ stable/12/sys/arm64/rockchip/rk_pinctrl.c Mon Dec 16 18:05:28 2019 (r355812) @@ -101,6 +101,7 @@ struct rk_pinctrl_conf { uint32_t ngpio_bank; uint32_t (*get_pd_offset)(struct rk_pinctrl_softc *, uint32_t); struct syscon *(*get_syscon)(struct rk_pinctrl_softc *, uint32_t); + int (*parse_bias)(phandle_t, int); }; struct rk_pinctrl_softc { @@ -371,6 +372,19 @@ rk3288_get_syscon(struct rk_pinctrl_softc *sc, uint32_ return (sc->grf); } +static int +rk3288_parse_bias(phandle_t node, int bank) +{ + if (OF_hasprop(node, "bias-disable")) + return (0); + if (OF_hasprop(node, "bias-pull-up")) + return (1); + if (OF_hasprop(node, "bias-pull-down")) + return (2); + + return (-1); +} + struct rk_pinctrl_conf rk3288_conf = { .iomux_conf = rk3288_iomux_bank, .iomux_nbanks = nitems(rk3288_iomux_bank), @@ -382,6 +396,7 @@ struct rk_pinctrl_conf rk3288_conf = { .ngpio_bank = nitems(rk3288_gpio_bank), .get_pd_offset = rk3288_get_pd_offset, .get_syscon = rk3288_get_syscon, + .parse_bias = rk3288_parse_bias, }; static struct rk_pinctrl_gpio rk3328_gpio_bank[] = { @@ -525,6 +540,7 @@ struct rk_pinctrl_conf rk3328_conf = { .ngpio_bank = nitems(rk3328_gpio_bank), .get_pd_offset = rk3328_get_pd_offset, .get_syscon = rk3328_get_syscon, + .parse_bias = rk3288_parse_bias, }; static struct rk_pinctrl_gpio rk3399_gpio_bank[] = { @@ -618,6 +634,36 @@ rk3399_get_syscon(struct rk_pinctrl_softc *sc, uint32_ return (sc->grf); } +static int +rk3399_parse_bias(phandle_t node, int bank) +{ + int pullup, pulldown; + + if (OF_hasprop(node, "bias-disable")) + return (0); + + switch (bank) { + case 0: + case 2: + pullup = 3; + pulldown = 1; + break; + case 1: + case 3: + case 4: + pullup = 1; + pulldown = 2; + break; + } + + if (OF_hasprop(node, "bias-pull-up")) + return (pullup); + if (OF_hasprop(node, "bias-pull-down")) + return (pulldown); + + return (-1); +} + struct rk_pinctrl_conf rk3399_conf = { .iomux_conf = rk3399_iomux_bank, .iomux_nbanks = nitems(rk3399_iomux_bank), @@ -629,6 +675,7 @@ struct rk_pinctrl_conf rk3399_conf = { .ngpio_bank = nitems(rk3399_gpio_bank), .get_pd_offset = rk3399_get_pd_offset, .get_syscon = rk3399_get_syscon, + .parse_bias = rk3399_parse_bias, }; static struct ofw_compat_data compat_data[] = { @@ -639,19 +686,6 @@ static struct ofw_compat_data compat_data[] = { }; static int -rk_pinctrl_parse_bias(phandle_t node) -{ - if (OF_hasprop(node, "bias-disable")) - return (0); - if (OF_hasprop(node, "bias-pull-up")) - return (1); - if (OF_hasprop(node, "bias-pull-down")) - return (2); - - return (-1); -} - -static int rk_pinctrl_parse_drive(struct rk_pinctrl_softc *sc, phandle_t node, uint32_t bank, uint32_t subbank, uint32_t *drive, uint32_t *offset) { @@ -843,7 +877,7 @@ rk_pinctrl_configure_pin(struct rk_pinctrl_softc *sc, SYSCON_MODIFY_4(syscon, reg, mask, function << bit | (mask << 16)); /* Pull-Up/Down */ - bias = rk_pinctrl_parse_bias(pin_conf); + bias = sc->conf->parse_bias(pin_conf, bank); if (bias >= 0) { reg = sc->conf->get_pd_offset(sc, bank); From owner-svn-src-stable-12@freebsd.org Tue Dec 17 09:46:01 2019 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6B6B91E1F7C; Tue, 17 Dec 2019 09:46:01 +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 47cYDT2H1mz45ht; Tue, 17 Dec 2019 09:46:01 +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 310E9C0A9; Tue, 17 Dec 2019 09:46:01 +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 xBH9k1ru028374; Tue, 17 Dec 2019 09:46:01 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBH9k1Q0028373; Tue, 17 Dec 2019 09:46:01 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201912170946.xBH9k1Q0028373@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 09:46:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r355848 - stable/12/sys/netpfil/ipfw X-SVN-Group: stable-12 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: stable/12/sys/netpfil/ipfw X-SVN-Commit-Revision: 355848 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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Dec 2019 09:46:01 -0000 Author: ae Date: Tue Dec 17 09:46:00 2019 New Revision: 355848 URL: https://svnweb.freebsd.org/changeset/base/355848 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/12/sys/netpfil/ipfw/ip_fw2.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netpfil/ipfw/ip_fw2.c ============================================================================== --- stable/12/sys/netpfil/ipfw/ip_fw2.c Tue Dec 17 09:13:48 2019 (r355847) +++ stable/12/sys/netpfil/ipfw/ip_fw2.c Tue Dec 17 09:46:00 2019 (r355848) @@ -1427,18 +1427,24 @@ ipfw_chk(struct ip_fw_args *args) * pointer might become stale after other pullups (but we never use it * this way). */ -#define PULLUP_TO(_len, p, T) PULLUP_LEN(_len, p, sizeof(T)) -#define PULLUP_LEN(_len, p, T) \ +#define PULLUP_TO(_len, p, T) PULLUP_LEN(_len, p, sizeof(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, */ @@ -2269,7 +2275,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); } @@ -2294,7 +2300,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) @@ -3145,6 +3151,7 @@ do { \ } /* end of inner loop, scan opcodes */ #undef PULLUP_LEN +#undef PULLUP_LEN_LOCKED if (done) break; From owner-svn-src-stable-12@freebsd.org Tue Dec 17 10:00:19 2019 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B5BC31E241C; Tue, 17 Dec 2019 10:00:19 +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 47cYXz4Q2qz46rb; Tue, 17 Dec 2019 10:00:19 +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 92AC8C270; Tue, 17 Dec 2019 10:00:19 +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 xBHA0JgS035348; Tue, 17 Dec 2019 10:00:19 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBHA0JsZ035347; Tue, 17 Dec 2019 10:00:19 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201912171000.xBHA0JsZ035347@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:00:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r355849 - stable/12/sys/netpfil/ipfw X-SVN-Group: stable-12 X-SVN-Commit-Author: ae X-SVN-Commit-Paths: stable/12/sys/netpfil/ipfw X-SVN-Commit-Revision: 355849 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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Dec 2019 10:00:19 -0000 Author: ae Date: Tue Dec 17 10:00:19 2019 New Revision: 355849 URL: https://svnweb.freebsd.org/changeset/base/355849 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/12/sys/netpfil/ipfw/ip_fw2.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netpfil/ipfw/ip_fw2.c ============================================================================== --- stable/12/sys/netpfil/ipfw/ip_fw2.c Tue Dec 17 09:46:00 2019 (r355848) +++ stable/12/sys/netpfil/ipfw/ip_fw2.c Tue Dec 17 10:00:19 2019 (r355849) @@ -1443,7 +1443,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-12@freebsd.org Tue Dec 17 15:02:30 2019 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F3F321EA94F; Tue, 17 Dec 2019 15:02:29 +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 47chFd6J8Vz4RBk; Tue, 17 Dec 2019 15:02:29 +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 D36FBFAE3; Tue, 17 Dec 2019 15:02:29 +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 xBHF2TAA017180; Tue, 17 Dec 2019 15:02:29 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBHF2TGH017179; Tue, 17 Dec 2019 15:02:29 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201912171502.xBHF2TGH017179@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:02:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r355856 - stable/12/share/vt/keymaps X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/12/share/vt/keymaps X-SVN-Commit-Revision: 355856 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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Dec 2019 15:02:30 -0000 Author: emaste Date: Tue Dec 17 15:02:29 2019 New Revision: 355856 URL: https://svnweb.freebsd.org/changeset/base/355856 Log: MFC r355575: Add missing language specifier for Hebrew il.kbd description PR: 235094 (related) Sponsored by: The FreeBSD Foundation Modified: stable/12/share/vt/keymaps/INDEX.keymaps Directory Properties: stable/12/ (props changed) Modified: stable/12/share/vt/keymaps/INDEX.keymaps ============================================================================== --- stable/12/share/vt/keymaps/INDEX.keymaps Tue Dec 17 14:53:55 2019 (r355855) +++ stable/12/share/vt/keymaps/INDEX.keymaps Tue Dec 17 15:02:29 2019 (r355856) @@ -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-12@freebsd.org Tue Dec 17 20:29:47 2019 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E0AAB1C921E; Tue, 17 Dec 2019 20:29:47 +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 47cqWH5fNQz3FyM; Tue, 17 Dec 2019 20:29:47 +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 BD2AA1B4A4; Tue, 17 Dec 2019 20:29:47 +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 xBHKTlq6007702; Tue, 17 Dec 2019 20:29:47 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBHKTlpE007701; Tue, 17 Dec 2019 20:29:47 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201912172029.xBHKTlpE007701@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:29:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r355862 - stable/12/sys/cam/scsi X-SVN-Group: stable-12 X-SVN-Commit-Author: ken X-SVN-Commit-Paths: stable/12/sys/cam/scsi X-SVN-Commit-Revision: 355862 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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Dec 2019 20:29:47 -0000 Author: ken Date: Tue Dec 17 20:29:47 2019 New Revision: 355862 URL: https://svnweb.freebsd.org/changeset/base/355862 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/12/sys/cam/scsi/scsi_cd.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cam/scsi/scsi_cd.c ============================================================================== --- stable/12/sys/cam/scsi/scsi_cd.c Tue Dec 17 19:01:09 2019 (r355861) +++ stable/12/sys/cam/scsi/scsi_cd.c Tue Dec 17 20:29:47 2019 (r355862) @@ -1030,7 +1030,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-12@freebsd.org Tue Dec 17 23:45:35 2019 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B2ED21CD8BB; Tue, 17 Dec 2019 23:45:35 +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 47cvsC3K7dz3Qh8; Tue, 17 Dec 2019 23:45:35 +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 65C3C1D93F; Tue, 17 Dec 2019 23:45:35 +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 xBHNjZCe025398; Tue, 17 Dec 2019 23:45:35 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBHNjZJ0025397; Tue, 17 Dec 2019 23:45:35 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201912172345.xBHNjZJ0025397@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:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r355868 - stable/12/usr.bin/netstat X-SVN-Group: stable-12 X-SVN-Commit-Author: bz X-SVN-Commit-Paths: stable/12/usr.bin/netstat X-SVN-Commit-Revision: 355868 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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Dec 2019 23:45:35 -0000 Author: bz Date: Tue Dec 17 23:45:34 2019 New Revision: 355868 URL: https://svnweb.freebsd.org/changeset/base/355868 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/12/usr.bin/netstat/inet6.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.bin/netstat/inet6.c ============================================================================== --- stable/12/usr.bin/netstat/inet6.c Tue Dec 17 23:01:37 2019 (r355867) +++ stable/12/usr.bin/netstat/inet6.c Tue Dec 17 23:45:34 2019 (r355868) @@ -1308,7 +1308,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; @@ -1317,7 +1317,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); } @@ -1330,9 +1330,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-12@freebsd.org Wed Dec 18 00:12:33 2019 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CA1331CE4C2; Wed, 18 Dec 2019 00:12:33 +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 47cwSK5bxzz3x4W; Wed, 18 Dec 2019 00:12:33 +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 BB2701DEC7; Wed, 18 Dec 2019 00:12:33 +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 xBI0CXRu042739; Wed, 18 Dec 2019 00:12:33 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBI0CURI042722; Wed, 18 Dec 2019 00:12:30 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201912180012.xBI0CURI042722@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Wed, 18 Dec 2019 00:12:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r355870 - in stable/12/sys: contrib/ipfilter/netinet netinet netinet6 X-SVN-Group: stable-12 X-SVN-Commit-Author: bz X-SVN-Commit-Paths: in stable/12/sys: contrib/ipfilter/netinet netinet netinet6 X-SVN-Commit-Revision: 355870 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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Dec 2019 00:12:33 -0000 Author: bz Date: Wed Dec 18 00:12:30 2019 New Revision: 355870 URL: https://svnweb.freebsd.org/changeset/base/355870 Log: MFC r350531: IPv6 cleanup: kernel Finish what was started a few years ago and harmonize IPv6 and IPv4 kernel names. We are down to very few places now that it is feasible to do the change for everything remaining with causing too much disturbance. Remove "aliases" for IPv6 names which confusingly could indicate that we are talking about a different data structure or field or have two fields, one for each address family. Try to follow common conventions used in FreeBSD. * Rename sin6p to sin6 as that is how it is spelt in most places. * Remove "aliases" (#defines) for: - in6pcb which really is an inpcb and nothing separate - sotoin6pcb which is sotoinpcb (as per above) - in6p_sp which is inp_sp - in6p_flowinfo which is inp_flow * Try to use ia6 for in6_addr rather than in6p. * With all these gone also rename the in6p variables to inp as that is what we call it in most of the network stack including parts of netinet6. The reasons behind this cleanup are that we try to further unify netinet and netinet6 code where possible and that people will less ignore one or the other protocol family when doing code changes as they may not have spotted places due to different names for the same thing. No functional changes inteded. Sponsored by: Netflix Do not MFC the in_pcb.h changes for the stable branch. This MFC is mostly only done in order to be able to MFC other changes with less conflicts. Modified: stable/12/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c stable/12/sys/netinet/sctp_asconf.c stable/12/sys/netinet/sctp_os_bsd.h stable/12/sys/netinet/sctp_output.c stable/12/sys/netinet/sctp_pcb.c stable/12/sys/netinet/sctp_pcb.h stable/12/sys/netinet/sctp_usrreq.c stable/12/sys/netinet/tcp_usrreq.c stable/12/sys/netinet6/icmp6.c stable/12/sys/netinet6/in6_mcast.c stable/12/sys/netinet6/in6_pcb.c stable/12/sys/netinet6/in6_pcb.h stable/12/sys/netinet6/in6_src.c stable/12/sys/netinet6/ip6_input.c stable/12/sys/netinet6/ip6_output.c stable/12/sys/netinet6/raw_ip6.c stable/12/sys/netinet6/sctp6_usrreq.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c ============================================================================== --- stable/12/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Tue Dec 17 23:45:50 2019 (r355869) +++ stable/12/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Wed Dec 18 00:12:30 2019 (r355870) @@ -979,7 +979,7 @@ ipf_ifpaddr(softc, v, atype, ifptr, inp, inpmask) i6addr_t *inp, *inpmask; { #ifdef USE_INET6 - struct in6_addr *inp6 = NULL; + struct in6_addr *ia6 = NULL; #endif struct sockaddr *sock, *mask; struct sockaddr_in *sin; @@ -1007,9 +1007,9 @@ ipf_ifpaddr(softc, v, atype, ifptr, inp, inpmask) break; #ifdef USE_INET6 if ((v == 6) && (sin->sin_family == AF_INET6)) { - inp6 = &((struct sockaddr_in6 *)sin)->sin6_addr; - if (!IN6_IS_ADDR_LINKLOCAL(inp6) && - !IN6_IS_ADDR_LOOPBACK(inp6)) + ia6 = &((struct sockaddr_in6 *)sin)->sin6_addr; + if (!IN6_IS_ADDR_LINKLOCAL(ia6) && + !IN6_IS_ADDR_LOOPBACK(ia6)) break; } #endif Modified: stable/12/sys/netinet/sctp_asconf.c ============================================================================== --- stable/12/sys/netinet/sctp_asconf.c Tue Dec 17 23:45:50 2019 (r355869) +++ stable/12/sys/netinet/sctp_asconf.c Wed Dec 18 00:12:30 2019 (r355870) @@ -1979,12 +1979,10 @@ sctp_addr_mgmt_assoc(struct sctp_inpcb *inp, struct sc case AF_INET: { struct sockaddr_in *sin; - struct in6pcb *inp6; - inp6 = (struct in6pcb *)&inp->ip_inp.inp; /* invalid if we are a v6 only endpoint */ if ((inp->sctp_flags & SCTP_PCB_FLAGS_BOUND_V6) && - SCTP_IPV6_V6ONLY(inp6)) + SCTP_IPV6_V6ONLY(&inp->ip_inp.inp)) return; sin = &ifa->address.sin; @@ -2057,11 +2055,9 @@ sctp_asconf_iterator_ep(struct sctp_inpcb *inp, void * case AF_INET: { /* invalid if we are a v6 only endpoint */ - struct in6pcb *inp6; - inp6 = (struct in6pcb *)&inp->ip_inp.inp; if ((inp->sctp_flags & SCTP_PCB_FLAGS_BOUND_V6) && - SCTP_IPV6_V6ONLY(inp6)) { + SCTP_IPV6_V6ONLY(&inp->ip_inp.inp)) { cnt_invalid++; if (asc->cnt == cnt_invalid) return (1); @@ -2172,13 +2168,11 @@ sctp_asconf_iterator_stcb(struct sctp_inpcb *inp, stru case AF_INET: { /* invalid if we are a v6 only endpoint */ - struct in6pcb *inp6; struct sockaddr_in *sin; - inp6 = (struct in6pcb *)&inp->ip_inp.inp; /* invalid if we are a v6 only endpoint */ if ((inp->sctp_flags & SCTP_PCB_FLAGS_BOUND_V6) && - SCTP_IPV6_V6ONLY(inp6)) + SCTP_IPV6_V6ONLY(&inp->ip_inp.inp)) continue; sin = &ifa->address.sin; @@ -2195,7 +2189,7 @@ sctp_asconf_iterator_stcb(struct sctp_inpcb *inp, stru continue; } if ((inp->sctp_flags & SCTP_PCB_FLAGS_BOUND_V6) && - SCTP_IPV6_V6ONLY(inp6)) { + SCTP_IPV6_V6ONLY(&inp->ip_inp.inp)) { cnt_invalid++; if (asc->cnt == cnt_invalid) return; Modified: stable/12/sys/netinet/sctp_os_bsd.h ============================================================================== --- stable/12/sys/netinet/sctp_os_bsd.h Tue Dec 17 23:45:50 2019 (r355869) +++ stable/12/sys/netinet/sctp_os_bsd.h Wed Dec 18 00:12:30 2019 (r355870) @@ -97,9 +97,6 @@ __FBSDID("$FreeBSD$"); #include #include -#ifndef in6pcb -#define in6pcb inpcb -#endif /* Declare all the malloc names for all the various mallocs */ MALLOC_DECLARE(SCTP_M_MAP); MALLOC_DECLARE(SCTP_M_STRMI); @@ -368,7 +365,7 @@ typedef struct callout sctp_os_timer_t; */ /* get the v6 hop limit */ -#define SCTP_GET_HLIM(inp, ro) in6_selecthlim((struct in6pcb *)&inp->ip_inp.inp, (ro ? (ro->ro_rt ? (ro->ro_rt->rt_ifp) : (NULL)) : (NULL))); +#define SCTP_GET_HLIM(inp, ro) in6_selecthlim((struct inpcb *)&inp->ip_inp.inp, (ro ? (ro->ro_rt ? (ro->ro_rt->rt_ifp) : (NULL)) : (NULL))); /* is the endpoint v6only? */ #define SCTP_IPV6_V6ONLY(inp) (((struct inpcb *)inp)->inp_flags & IN6P_IPV6_V6ONLY) @@ -431,7 +428,7 @@ typedef struct rtentry sctp_rtentry_t; m_clrprotoflags(o_pak); \ if (local_stcb && local_stcb->sctp_ep) \ result = ip6_output(o_pak, \ - ((struct in6pcb *)(local_stcb->sctp_ep))->in6p_outputopts, \ + ((struct inpcb *)(local_stcb->sctp_ep))->in6p_outputopts, \ (ro), 0, 0, ifp, NULL); \ else \ result = ip6_output(o_pak, NULL, (ro), 0, 0, ifp, NULL); \ Modified: stable/12/sys/netinet/sctp_output.c ============================================================================== --- stable/12/sys/netinet/sctp_output.c Tue Dec 17 23:45:50 2019 (r355869) +++ stable/12/sys/netinet/sctp_output.c Wed Dec 18 00:12:30 2019 (r355870) @@ -4336,7 +4336,7 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp, * at the SCTP layer. So use the value from * the IP layer. */ - flowlabel = ntohl(((struct in6pcb *)inp)->in6p_flowinfo); + flowlabel = ntohl(((struct inpcb *)inp)->inp_flow); } flowlabel &= 0x000fffff; len = SCTP_MIN_OVERHEAD; @@ -4391,7 +4391,7 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp, * at the SCTP layer. So use the value from * the IP layer. */ - tos_value = (ntohl(((struct in6pcb *)inp)->in6p_flowinfo) >> 20) & 0xff; + tos_value = (ntohl(((struct inpcb *)inp)->inp_flow) >> 20) & 0xff; } tos_value &= 0xfc; if (ecn_ok) { Modified: stable/12/sys/netinet/sctp_pcb.c ============================================================================== --- stable/12/sys/netinet/sctp_pcb.c Tue Dec 17 23:45:50 2019 (r355869) +++ stable/12/sys/netinet/sctp_pcb.c Wed Dec 18 00:12:30 2019 (r355870) @@ -3642,12 +3642,8 @@ sctp_inpcb_free(struct sctp_inpcb *inp, int immediate, #ifdef INET6 - if (ip_pcb->inp_vflag & INP_IPV6) { - struct in6pcb *in6p; - - in6p = (struct in6pcb *)inp; - ip6_freepcbopts(in6p->in6p_outputopts); - } + if (ip_pcb->inp_vflag & INP_IPV6) + ip6_freepcbopts(((struct inpcb *)inp)->in6p_outputopts); #endif /* INET6 */ ip_pcb->inp_vflag = 0; /* free up authentication fields */ Modified: stable/12/sys/netinet/sctp_pcb.h ============================================================================== --- stable/12/sys/netinet/sctp_pcb.h Tue Dec 17 23:45:50 2019 (r355869) +++ stable/12/sys/netinet/sctp_pcb.h Wed Dec 18 00:12:30 2019 (r355870) @@ -362,7 +362,7 @@ struct sctp_inpcb { */ union { struct inpcb inp; - char align[(sizeof(struct in6pcb) + SCTP_ALIGNM1) & + char align[(sizeof(struct inpcb) + SCTP_ALIGNM1) & ~SCTP_ALIGNM1]; } ip_inp; Modified: stable/12/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/12/sys/netinet/sctp_usrreq.c Tue Dec 17 23:45:50 2019 (r355869) +++ stable/12/sys/netinet/sctp_usrreq.c Wed Dec 18 00:12:30 2019 (r355870) @@ -1412,10 +1412,8 @@ sctp_do_connect_x(struct socket *so, struct sctp_inpcb } if ((inp->sctp_flags & SCTP_PCB_FLAGS_BOUND_V6) && (num_v4 > 0)) { - struct in6pcb *inp6; - inp6 = (struct in6pcb *)inp; - if (SCTP_IPV6_V6ONLY(inp6)) { + if (SCTP_IPV6_V6ONLY(inp)) { /* * if IPV6_V6ONLY flag, ignore connections destined * to a v4 addr or v4-mapped addr @@ -6916,14 +6914,14 @@ sctp_connect(struct socket *so, struct sockaddr *addr, #ifdef INET6 case AF_INET6: { - struct sockaddr_in6 *sin6p; + struct sockaddr_in6 *sin6; if (addr->sa_len != sizeof(struct sockaddr_in6)) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); return (EINVAL); } - sin6p = (struct sockaddr_in6 *)addr; - if (p != NULL && (error = prison_remote_ip6(p->td_ucred, &sin6p->sin6_addr)) != 0) { + sin6 = (struct sockaddr_in6 *)addr; + if (p != NULL && (error = prison_remote_ip6(p->td_ucred, &sin6->sin6_addr)) != 0) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, error); return (error); } Modified: stable/12/sys/netinet/tcp_usrreq.c ============================================================================== --- stable/12/sys/netinet/tcp_usrreq.c Tue Dec 17 23:45:50 2019 (r355869) +++ stable/12/sys/netinet/tcp_usrreq.c Wed Dec 18 00:12:30 2019 (r355870) @@ -344,18 +344,18 @@ tcp6_usr_bind(struct socket *so, struct sockaddr *nam, int error = 0; struct inpcb *inp; struct tcpcb *tp = NULL; - struct sockaddr_in6 *sin6p; + struct sockaddr_in6 *sin6; u_char vflagsav; - sin6p = (struct sockaddr_in6 *)nam; - if (nam->sa_len != sizeof (*sin6p)) + sin6 = (struct sockaddr_in6 *)nam; + if (nam->sa_len != sizeof (*sin6)) return (EINVAL); /* * Must check for multicast addresses and disallow binding * to them. */ - if (sin6p->sin6_family == AF_INET6 && - IN6_IS_ADDR_MULTICAST(&sin6p->sin6_addr)) + if (sin6->sin6_family == AF_INET6 && + IN6_IS_ADDR_MULTICAST(&sin6->sin6_addr)) return (EAFNOSUPPORT); TCPDEBUG0; @@ -374,12 +374,12 @@ tcp6_usr_bind(struct socket *so, struct sockaddr *nam, inp->inp_vflag |= INP_IPV6; #ifdef INET if ((inp->inp_flags & IN6P_IPV6_V6ONLY) == 0) { - if (IN6_IS_ADDR_UNSPECIFIED(&sin6p->sin6_addr)) + if (IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr)) inp->inp_vflag |= INP_IPV4; - else if (IN6_IS_ADDR_V4MAPPED(&sin6p->sin6_addr)) { + else if (IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr)) { struct sockaddr_in sin; - in6_sin6_2_sin(&sin, sin6p); + in6_sin6_2_sin(&sin, sin6); if (IN_MULTICAST(ntohl(sin.sin_addr.s_addr))) { error = EAFNOSUPPORT; INP_HASH_WUNLOCK(&V_tcbinfo); @@ -575,20 +575,20 @@ tcp6_usr_connect(struct socket *so, struct sockaddr *n int error = 0; struct inpcb *inp; struct tcpcb *tp = NULL; - struct sockaddr_in6 *sin6p; + struct sockaddr_in6 *sin6; u_int8_t incflagsav; u_char vflagsav; TCPDEBUG0; - sin6p = (struct sockaddr_in6 *)nam; - if (nam->sa_len != sizeof (*sin6p)) + sin6 = (struct sockaddr_in6 *)nam; + if (nam->sa_len != sizeof (*sin6)) return (EINVAL); /* * Must disallow TCP ``connections'' to multicast addresses. */ - if (sin6p->sin6_family == AF_INET6 - && IN6_IS_ADDR_MULTICAST(&sin6p->sin6_addr)) + if (sin6->sin6_family == AF_INET6 + && IN6_IS_ADDR_MULTICAST(&sin6->sin6_addr)) return (EAFNOSUPPORT); inp = sotoinpcb(so); @@ -612,7 +612,7 @@ tcp6_usr_connect(struct socket *so, struct sockaddr *n * therefore probably require the hash lock, which isn't held here. * Is this a significant problem? */ - if (IN6_IS_ADDR_V4MAPPED(&sin6p->sin6_addr)) { + if (IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr)) { struct sockaddr_in sin; if ((inp->inp_flags & IN6P_IPV6_V6ONLY) != 0) { @@ -624,7 +624,7 @@ tcp6_usr_connect(struct socket *so, struct sockaddr *n goto out; } - in6_sin6_2_sin(&sin, sin6p); + in6_sin6_2_sin(&sin, sin6); if (IN_MULTICAST(ntohl(sin.sin_addr.s_addr))) { error = EAFNOSUPPORT; goto out; @@ -651,7 +651,7 @@ tcp6_usr_connect(struct socket *so, struct sockaddr *n } } #endif - if ((error = prison_remote_ip6(td->td_ucred, &sin6p->sin6_addr)) != 0) + if ((error = prison_remote_ip6(td->td_ucred, &sin6->sin6_addr)) != 0) goto out; inp->inp_vflag &= ~INP_IPV4; inp->inp_vflag |= INP_IPV6; @@ -1000,22 +1000,22 @@ tcp_usr_send(struct socket *so, int flags, struct mbuf #ifdef INET6 case AF_INET6: { - struct sockaddr_in6 *sin6p; + struct sockaddr_in6 *sin6; - sin6p = (struct sockaddr_in6 *)nam; - if (sin6p->sin6_len != sizeof(struct sockaddr_in6)) { + sin6 = (struct sockaddr_in6 *)nam; + if (sin6->sin6_len != sizeof(*sin6)) { if (m) m_freem(m); error = EINVAL; goto out; } - if (IN6_IS_ADDR_MULTICAST(&sin6p->sin6_addr)) { + if (IN6_IS_ADDR_MULTICAST(&sin6->sin6_addr)) { if (m) m_freem(m); error = EAFNOSUPPORT; goto out; } - if (IN6_IS_ADDR_V4MAPPED(&sin6p->sin6_addr)) { + if (IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr)) { #ifdef INET if ((inp->inp_flags & IN6P_IPV6_V6ONLY) != 0) { error = EINVAL; @@ -1032,7 +1032,7 @@ tcp_usr_send(struct socket *so, int flags, struct mbuf restoreflags = true; inp->inp_vflag &= ~INP_IPV6; sinp = &sin; - in6_sin6_2_sin(sinp, sin6p); + in6_sin6_2_sin(sinp, sin6); if (IN_MULTICAST( ntohl(sinp->sin_addr.s_addr))) { error = EAFNOSUPPORT; @@ -1064,7 +1064,7 @@ tcp_usr_send(struct socket *so, int flags, struct mbuf inp->inp_vflag &= ~INP_IPV4; inp->inp_inc.inc_flags |= INC_ISIPV6; if ((error = prison_remote_ip6(td->td_ucred, - &sin6p->sin6_addr))) { + &sin6->sin6_addr))) { if (m) m_freem(m); goto out; Modified: stable/12/sys/netinet6/icmp6.c ============================================================================== --- stable/12/sys/netinet6/icmp6.c Tue Dec 17 23:45:50 2019 (r355869) +++ stable/12/sys/netinet6/icmp6.c Wed Dec 18 00:12:30 2019 (r355870) @@ -1892,7 +1892,7 @@ icmp6_rip6_input(struct mbuf **mp, int off) { struct mbuf *m = *mp; struct ip6_hdr *ip6 = mtod(m, struct ip6_hdr *); - struct inpcb *in6p; + struct inpcb *inp; struct inpcb *last = NULL; struct sockaddr_in6 fromsa; struct icmp6_hdr *icmp6; @@ -1924,25 +1924,25 @@ icmp6_rip6_input(struct mbuf **mp, int off) } INP_INFO_RLOCK_ET(&V_ripcbinfo, et); - CK_LIST_FOREACH(in6p, &V_ripcb, inp_list) { - if ((in6p->inp_vflag & INP_IPV6) == 0) + CK_LIST_FOREACH(inp, &V_ripcb, inp_list) { + if ((inp->inp_vflag & INP_IPV6) == 0) continue; - if (in6p->inp_ip_p != IPPROTO_ICMPV6) + if (inp->inp_ip_p != IPPROTO_ICMPV6) continue; - if (!IN6_IS_ADDR_UNSPECIFIED(&in6p->in6p_laddr) && - !IN6_ARE_ADDR_EQUAL(&in6p->in6p_laddr, &ip6->ip6_dst)) + if (!IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_laddr) && + !IN6_ARE_ADDR_EQUAL(&inp->in6p_laddr, &ip6->ip6_dst)) continue; - if (!IN6_IS_ADDR_UNSPECIFIED(&in6p->in6p_faddr) && - !IN6_ARE_ADDR_EQUAL(&in6p->in6p_faddr, &ip6->ip6_src)) + if (!IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_faddr) && + !IN6_ARE_ADDR_EQUAL(&inp->in6p_faddr, &ip6->ip6_src)) continue; - INP_RLOCK(in6p); - if (__predict_false(in6p->inp_flags2 & INP_FREED)) { - INP_RUNLOCK(in6p); + INP_RLOCK(inp); + if (__predict_false(inp->inp_flags2 & INP_FREED)) { + INP_RUNLOCK(inp); continue; } if (ICMP6_FILTER_WILLBLOCK(icmp6->icmp6_type, - in6p->in6p_icmp6filt)) { - INP_RUNLOCK(in6p); + inp->in6p_icmp6filt)) { + INP_RUNLOCK(inp); continue; } if (last != NULL) { @@ -2003,7 +2003,7 @@ icmp6_rip6_input(struct mbuf **mp, int off) } INP_RUNLOCK(last); } - last = in6p; + last = inp; } INP_INFO_RUNLOCK_ET(&V_ripcbinfo, et); if (last != NULL) { Modified: stable/12/sys/netinet6/in6_mcast.c ============================================================================== --- stable/12/sys/netinet6/in6_mcast.c Tue Dec 17 23:45:50 2019 (r355869) +++ stable/12/sys/netinet6/in6_mcast.c Wed Dec 18 00:12:30 2019 (r355870) @@ -1828,7 +1828,7 @@ ip6_getmoptions(struct inpcb *inp, struct sockopt *sop * Returns NULL if no ifp could be found. */ static struct ifnet * -in6p_lookup_mcast_ifp(const struct inpcb *in6p, +in6p_lookup_mcast_ifp(const struct inpcb *inp, const struct sockaddr_in6 *gsin6) { struct nhop6_basic nh6; @@ -1836,13 +1836,13 @@ in6p_lookup_mcast_ifp(const struct inpcb *in6p, uint32_t scopeid; uint32_t fibnum; - KASSERT(in6p->inp_vflag & INP_IPV6, + KASSERT(inp->inp_vflag & INP_IPV6, ("%s: not INP_IPV6 inpcb", __func__)); KASSERT(gsin6->sin6_family == AF_INET6, ("%s: not AF_INET6 group", __func__)); in6_splitscope(&gsin6->sin6_addr, &dst, &scopeid); - fibnum = in6p ? in6p->inp_inc.inc_fibnum : RT_DEFAULT_FIB; + fibnum = inp ? inp->inp_inc.inc_fibnum : RT_DEFAULT_FIB; if (fib6_lookup_nh_basic(fibnum, &dst, scopeid, 0, 0, &nh6) != 0) return (NULL); Modified: stable/12/sys/netinet6/in6_pcb.c ============================================================================== --- stable/12/sys/netinet6/in6_pcb.c Tue Dec 17 23:45:50 2019 (r355869) +++ stable/12/sys/netinet6/in6_pcb.c Wed Dec 18 00:12:30 2019 (r355870) @@ -802,20 +802,20 @@ in6_pcblookup_local(struct inpcbinfo *pcbinfo, struct void in6_pcbpurgeif0(struct inpcbinfo *pcbinfo, struct ifnet *ifp) { - struct inpcb *in6p; + struct inpcb *inp; struct in6_multi *inm; struct in6_mfilter *imf; struct ip6_moptions *im6o; INP_INFO_WLOCK(pcbinfo); - CK_LIST_FOREACH(in6p, pcbinfo->ipi_listhead, inp_list) { - INP_WLOCK(in6p); - if (__predict_false(in6p->inp_flags2 & INP_FREED)) { - INP_WUNLOCK(in6p); + CK_LIST_FOREACH(inp, pcbinfo->ipi_listhead, inp_list) { + INP_WLOCK(inp); + if (__predict_false(inp->inp_flags2 & INP_FREED)) { + INP_WUNLOCK(inp); continue; } - im6o = in6p->in6p_moptions; - if ((in6p->inp_vflag & INP_IPV6) && im6o != NULL) { + im6o = inp->in6p_moptions; + if ((inp->inp_vflag & INP_IPV6) && im6o != NULL) { /* * Unselect the outgoing ifp for multicast if it * is being detached. @@ -839,7 +839,7 @@ restart: goto restart; } } - INP_WUNLOCK(in6p); + INP_WUNLOCK(inp); } INP_INFO_WUNLOCK(pcbinfo); } Modified: stable/12/sys/netinet6/in6_pcb.h ============================================================================== --- stable/12/sys/netinet6/in6_pcb.h Tue Dec 17 23:45:50 2019 (r355869) +++ stable/12/sys/netinet6/in6_pcb.h Wed Dec 18 00:12:30 2019 (r355870) @@ -113,7 +113,7 @@ int in6_getpeeraddr(struct socket *so, struct sockaddr int in6_getsockaddr(struct socket *so, struct sockaddr **nam); int in6_mapped_sockaddr(struct socket *so, struct sockaddr **nam); int in6_mapped_peeraddr(struct socket *so, struct sockaddr **nam); -int in6_selecthlim(struct in6pcb *, struct ifnet *); +int in6_selecthlim(struct inpcb *, struct ifnet *); int in6_pcbsetport(struct in6_addr *, struct inpcb *, struct ucred *); void init_sin6(struct sockaddr_in6 *sin6, struct mbuf *m, int); #endif /* _KERNEL */ Modified: stable/12/sys/netinet6/in6_src.c ============================================================================== --- stable/12/sys/netinet6/in6_src.c Tue Dec 17 23:45:50 2019 (r355869) +++ stable/12/sys/netinet6/in6_src.c Wed Dec 18 00:12:30 2019 (r355870) @@ -931,21 +931,21 @@ in6_selectroute_fib(struct sockaddr_in6 *dstsock, stru * 3. The system default hoplimit. */ int -in6_selecthlim(struct inpcb *in6p, struct ifnet *ifp) +in6_selecthlim(struct inpcb *inp, struct ifnet *ifp) { - if (in6p && in6p->in6p_hops >= 0) - return (in6p->in6p_hops); + if (inp && inp->in6p_hops >= 0) + return (inp->in6p_hops); else if (ifp) return (ND_IFINFO(ifp)->chlim); - else if (in6p && !IN6_IS_ADDR_UNSPECIFIED(&in6p->in6p_faddr)) { + else if (inp && !IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_faddr)) { struct nhop6_basic nh6; struct in6_addr dst; uint32_t fibnum, scopeid; int hlim; - fibnum = in6p->inp_inc.inc_fibnum; - in6_splitscope(&in6p->in6p_faddr, &dst, &scopeid); + fibnum = inp->inp_inc.inc_fibnum; + in6_splitscope(&inp->in6p_faddr, &dst, &scopeid); if (fib6_lookup_nh_basic(fibnum, &dst, scopeid, 0, 0, &nh6)==0){ hlim = ND_IFINFO(nh6.nh_ifp)->chlim; return (hlim); Modified: stable/12/sys/netinet6/ip6_input.c ============================================================================== --- stable/12/sys/netinet6/ip6_input.c Tue Dec 17 23:45:50 2019 (r355869) +++ stable/12/sys/netinet6/ip6_input.c Wed Dec 18 00:12:30 2019 (r355870) @@ -1409,12 +1409,12 @@ ip6_savecontrol_v4(struct inpcb *inp, struct mbuf *m, } void -ip6_savecontrol(struct inpcb *in6p, struct mbuf *m, struct mbuf **mp) +ip6_savecontrol(struct inpcb *inp, struct mbuf *m, struct mbuf **mp) { struct ip6_hdr *ip6 = mtod(m, struct ip6_hdr *); int v4only = 0; - mp = ip6_savecontrol_v4(in6p, m, mp, &v4only); + mp = ip6_savecontrol_v4(inp, m, mp, &v4only); if (v4only) return; @@ -1425,7 +1425,7 @@ ip6_savecontrol(struct inpcb *in6p, struct mbuf *m, st * returned to normal user. * See also RFC 2292 section 6 (or RFC 3542 section 8). */ - if ((in6p->inp_flags & IN6P_HOPOPTS) != 0) { + if ((inp->inp_flags & IN6P_HOPOPTS) != 0) { /* * Check if a hop-by-hop options header is contatined in the * received packet, and if so, store the options as ancillary @@ -1467,7 +1467,7 @@ ip6_savecontrol(struct inpcb *in6p, struct mbuf *m, st * Note: this constraint is removed in RFC3542 */ *mp = sbcreatecontrol((caddr_t)hbh, hbhlen, - IS2292(in6p, IPV6_2292HOPOPTS, IPV6_HOPOPTS), + IS2292(inp, IPV6_2292HOPOPTS, IPV6_HOPOPTS), IPPROTO_IPV6); if (*mp) mp = &(*mp)->m_next; @@ -1477,7 +1477,7 @@ ip6_savecontrol(struct inpcb *in6p, struct mbuf *m, st } } - if ((in6p->inp_flags & (IN6P_RTHDR | IN6P_DSTOPTS)) != 0) { + if ((inp->inp_flags & (IN6P_RTHDR | IN6P_DSTOPTS)) != 0) { int nxt = ip6->ip6_nxt, off = sizeof(struct ip6_hdr); /* @@ -1538,22 +1538,22 @@ ip6_savecontrol(struct inpcb *in6p, struct mbuf *m, st switch (nxt) { case IPPROTO_DSTOPTS: - if (!(in6p->inp_flags & IN6P_DSTOPTS)) + if (!(inp->inp_flags & IN6P_DSTOPTS)) break; *mp = sbcreatecontrol((caddr_t)ip6e, elen, - IS2292(in6p, + IS2292(inp, IPV6_2292DSTOPTS, IPV6_DSTOPTS), IPPROTO_IPV6); if (*mp) mp = &(*mp)->m_next; break; case IPPROTO_ROUTING: - if (!(in6p->inp_flags & IN6P_RTHDR)) + if (!(inp->inp_flags & IN6P_RTHDR)) break; *mp = sbcreatecontrol((caddr_t)ip6e, elen, - IS2292(in6p, IPV6_2292RTHDR, IPV6_RTHDR), + IS2292(inp, IPV6_2292RTHDR, IPV6_RTHDR), IPPROTO_IPV6); if (*mp) mp = &(*mp)->m_next; @@ -1589,7 +1589,7 @@ ip6_savecontrol(struct inpcb *in6p, struct mbuf *m, st ; } - if (in6p->inp_flags2 & INP_RECVFLOWID) { + if (inp->inp_flags2 & INP_RECVFLOWID) { uint32_t flowid, flow_type; flowid = m->m_pkthdr.flowid; @@ -1610,7 +1610,7 @@ ip6_savecontrol(struct inpcb *in6p, struct mbuf *m, st } #ifdef RSS - if (in6p->inp_flags2 & INP_RECVRSSBUCKETID) { + if (inp->inp_flags2 & INP_RECVRSSBUCKETID) { uint32_t flowid, flow_type; uint32_t rss_bucketid; Modified: stable/12/sys/netinet6/ip6_output.c ============================================================================== --- stable/12/sys/netinet6/ip6_output.c Tue Dec 17 23:45:50 2019 (r355869) +++ stable/12/sys/netinet6/ip6_output.c Wed Dec 18 00:12:30 2019 (r355870) @@ -1421,7 +1421,7 @@ ip6_ctloutput(struct socket *so, struct sockopt *sopt) { int optdatalen, uproto; void *optdata; - struct inpcb *in6p = sotoinpcb(so); + struct inpcb *inp = sotoinpcb(so); int error, optval; int level, op, optname; int optlen; @@ -1456,43 +1456,43 @@ ip6_ctloutput(struct socket *so, struct sockopt *sopt) sopt->sopt_dir == SOPT_SET) { switch (sopt->sopt_name) { case SO_REUSEADDR: - INP_WLOCK(in6p); + INP_WLOCK(inp); if ((so->so_options & SO_REUSEADDR) != 0) - in6p->inp_flags2 |= INP_REUSEADDR; + inp->inp_flags2 |= INP_REUSEADDR; else - in6p->inp_flags2 &= ~INP_REUSEADDR; - INP_WUNLOCK(in6p); + inp->inp_flags2 &= ~INP_REUSEADDR; + INP_WUNLOCK(inp); error = 0; break; case SO_REUSEPORT: - INP_WLOCK(in6p); + INP_WLOCK(inp); if ((so->so_options & SO_REUSEPORT) != 0) - in6p->inp_flags2 |= INP_REUSEPORT; + inp->inp_flags2 |= INP_REUSEPORT; else - in6p->inp_flags2 &= ~INP_REUSEPORT; - INP_WUNLOCK(in6p); + inp->inp_flags2 &= ~INP_REUSEPORT; + INP_WUNLOCK(inp); error = 0; break; case SO_REUSEPORT_LB: - INP_WLOCK(in6p); + INP_WLOCK(inp); if ((so->so_options & SO_REUSEPORT_LB) != 0) - in6p->inp_flags2 |= INP_REUSEPORT_LB; + inp->inp_flags2 |= INP_REUSEPORT_LB; else - in6p->inp_flags2 &= ~INP_REUSEPORT_LB; - INP_WUNLOCK(in6p); + inp->inp_flags2 &= ~INP_REUSEPORT_LB; + INP_WUNLOCK(inp); error = 0; break; case SO_SETFIB: - INP_WLOCK(in6p); - in6p->inp_inc.inc_fibnum = so->so_fibnum; - INP_WUNLOCK(in6p); + INP_WLOCK(inp); + inp->inp_inc.inc_fibnum = so->so_fibnum; + INP_WUNLOCK(inp); error = 0; break; case SO_MAX_PACING_RATE: #ifdef RATELIMIT - INP_WLOCK(in6p); - in6p->inp_flags2 |= INP_RATE_LIMIT_CHANGED; - INP_WUNLOCK(in6p); + INP_WLOCK(inp); + inp->inp_flags2 |= INP_RATE_LIMIT_CHANGED; + INP_WUNLOCK(inp); error = 0; #else error = EOPNOTSUPP; @@ -1526,7 +1526,7 @@ ip6_ctloutput(struct socket *so, struct sockopt *sopt) error = soopt_mcopyin(sopt, m); /* XXX */ if (error != 0) break; - error = ip6_pcbopts(&in6p->in6p_outputopts, + error = ip6_pcbopts(&inp->in6p_outputopts, m, so, sopt); m_freem(m); /* XXX */ break; @@ -1597,57 +1597,57 @@ ip6_ctloutput(struct socket *so, struct sockopt *sopt) error = EINVAL; else { /* -1 = kernel default */ - in6p->in6p_hops = optval; - if ((in6p->inp_vflag & + inp->in6p_hops = optval; + if ((inp->inp_vflag & INP_IPV4) != 0) - in6p->inp_ip_ttl = optval; + inp->inp_ip_ttl = optval; } break; #define OPTSET(bit) \ do { \ - INP_WLOCK(in6p); \ + INP_WLOCK(inp); \ if (optval) \ - in6p->inp_flags |= (bit); \ + inp->inp_flags |= (bit); \ else \ - in6p->inp_flags &= ~(bit); \ - INP_WUNLOCK(in6p); \ + inp->inp_flags &= ~(bit); \ + INP_WUNLOCK(inp); \ } while (/*CONSTCOND*/ 0) #define OPTSET2292(bit) \ do { \ - INP_WLOCK(in6p); \ - in6p->inp_flags |= IN6P_RFC2292; \ + INP_WLOCK(inp); \ + inp->inp_flags |= IN6P_RFC2292; \ if (optval) \ - in6p->inp_flags |= (bit); \ + inp->inp_flags |= (bit); \ else \ - in6p->inp_flags &= ~(bit); \ - INP_WUNLOCK(in6p); \ + inp->inp_flags &= ~(bit); \ + INP_WUNLOCK(inp); \ } while (/*CONSTCOND*/ 0) -#define OPTBIT(bit) (in6p->inp_flags & (bit) ? 1 : 0) +#define OPTBIT(bit) (inp->inp_flags & (bit) ? 1 : 0) #define OPTSET2_N(bit, val) do { \ if (val) \ - in6p->inp_flags2 |= bit; \ + inp->inp_flags2 |= bit; \ else \ - in6p->inp_flags2 &= ~bit; \ + inp->inp_flags2 &= ~bit; \ } while (0) #define OPTSET2(bit, val) do { \ - INP_WLOCK(in6p); \ + INP_WLOCK(inp); \ OPTSET2_N(bit, val); \ - INP_WUNLOCK(in6p); \ + INP_WUNLOCK(inp); \ } while (0) -#define OPTBIT2(bit) (in6p->inp_flags2 & (bit) ? 1 : 0) +#define OPTBIT2(bit) (inp->inp_flags2 & (bit) ? 1 : 0) #define OPTSET2292_EXCLUSIVE(bit) \ do { \ - INP_WLOCK(in6p); \ + INP_WLOCK(inp); \ if (OPTBIT(IN6P_RFC2292)) { \ error = EINVAL; \ } else { \ if (optval) \ - in6p->inp_flags |= (bit); \ + inp->inp_flags |= (bit); \ else \ - in6p->inp_flags &= ~(bit); \ + inp->inp_flags &= ~(bit); \ } \ - INP_WUNLOCK(in6p); \ + INP_WUNLOCK(inp); \ } while (/*CONSTCOND*/ 0) case IPV6_RECVPKTINFO: @@ -1663,17 +1663,17 @@ do { \ error = EINVAL; break; } - INP_WLOCK(in6p); - if (in6p->inp_flags & (INP_TIMEWAIT | INP_DROPPED)) { - INP_WUNLOCK(in6p); + INP_WLOCK(inp); + if (inp->inp_flags & (INP_TIMEWAIT | INP_DROPPED)) { + INP_WUNLOCK(inp); return (ECONNRESET); } - optp = &in6p->in6p_outputopts; + optp = &inp->in6p_outputopts; error = ip6_pcbopt(IPV6_HOPLIMIT, (u_char *)&optval, sizeof(optval), optp, (td != NULL) ? td->td_ucred : NULL, uproto); - INP_WUNLOCK(in6p); + INP_WUNLOCK(inp); break; } @@ -1724,16 +1724,16 @@ do { \ * available only prior to bind(2). * see ipng mailing list, Jun 22 2001. */ - if (in6p->inp_lport || - !IN6_IS_ADDR_UNSPECIFIED(&in6p->in6p_laddr)) { + if (inp->inp_lport || + !IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_laddr)) { error = EINVAL; break; } OPTSET(IN6P_IPV6_V6ONLY); if (optval) - in6p->inp_vflag &= ~INP_IPV4; + inp->inp_vflag &= ~INP_IPV4; else - in6p->inp_vflag |= INP_IPV4; + inp->inp_vflag |= INP_IPV4; break; case IPV6_RECVTCLASS: /* cannot mix with RFC2292 XXX */ @@ -1757,10 +1757,10 @@ do { \ case IPV6_RSS_LISTEN_BUCKET: if ((optval >= 0) && (optval < rss_getnumbuckets())) { - INP_WLOCK(in6p); - in6p->inp_rss_listen_bucket = optval; + INP_WLOCK(inp); + inp->inp_rss_listen_bucket = optval; OPTSET2_N(INP_RSS_BUCKET_SET, 1); - INP_WUNLOCK(in6p); + INP_WUNLOCK(inp); } else { error = EINVAL; } @@ -1783,17 +1783,17 @@ do { \ break; { struct ip6_pktopts **optp; - INP_WLOCK(in6p); - if (in6p->inp_flags & (INP_TIMEWAIT | INP_DROPPED)) { - INP_WUNLOCK(in6p); + INP_WLOCK(inp); + if (inp->inp_flags & (INP_TIMEWAIT | INP_DROPPED)) { + INP_WUNLOCK(inp); return (ECONNRESET); } - optp = &in6p->in6p_outputopts; + optp = &inp->in6p_outputopts; error = ip6_pcbopt(optname, (u_char *)&optval, sizeof(optval), optp, (td != NULL) ? td->td_ucred : NULL, uproto); - INP_WUNLOCK(in6p); + INP_WUNLOCK(inp); break; } @@ -1875,16 +1875,16 @@ do { \ break; optlen = sopt->sopt_valsize; optbuf = optbuf_storage; - INP_WLOCK(in6p); - if (in6p->inp_flags & (INP_TIMEWAIT | INP_DROPPED)) { - INP_WUNLOCK(in6p); + INP_WLOCK(inp); + if (inp->inp_flags & (INP_TIMEWAIT | INP_DROPPED)) { + INP_WUNLOCK(inp); return (ECONNRESET); } - optp = &in6p->in6p_outputopts; + optp = &inp->in6p_outputopts; error = ip6_pcbopt(optname, optbuf, optlen, optp, (td != NULL) ? td->td_ucred : NULL, uproto); - INP_WUNLOCK(in6p); + INP_WUNLOCK(inp); break; } #undef OPTSET @@ -1901,7 +1901,7 @@ do { \ case MCAST_LEAVE_GROUP: case MCAST_JOIN_SOURCE_GROUP: case MCAST_LEAVE_SOURCE_GROUP: - error = ip6_setmoptions(in6p, sopt); + error = ip6_setmoptions(inp, sopt); break; case IPV6_PORTRANGE: @@ -1910,34 +1910,34 @@ do { \ if (error) break; - INP_WLOCK(in6p); + INP_WLOCK(inp); switch (optval) { case IPV6_PORTRANGE_DEFAULT: - in6p->inp_flags &= ~(INP_LOWPORT); - in6p->inp_flags &= ~(INP_HIGHPORT); + inp->inp_flags &= ~(INP_LOWPORT); + inp->inp_flags &= ~(INP_HIGHPORT); break; case IPV6_PORTRANGE_HIGH: - in6p->inp_flags &= ~(INP_LOWPORT); - in6p->inp_flags |= INP_HIGHPORT; + inp->inp_flags &= ~(INP_LOWPORT); + inp->inp_flags |= INP_HIGHPORT; break; case IPV6_PORTRANGE_LOW: - in6p->inp_flags &= ~(INP_HIGHPORT); - in6p->inp_flags |= INP_LOWPORT; + inp->inp_flags &= ~(INP_HIGHPORT); + inp->inp_flags |= INP_LOWPORT; break; default: error = EINVAL; break; } - INP_WUNLOCK(in6p); + INP_WUNLOCK(inp); break; #if defined(IPSEC) || defined(IPSEC_SUPPORT) case IPV6_IPSEC_POLICY: if (IPSEC_ENABLED(ipv6)) { - error = IPSEC_PCBCTL(ipv6, in6p, sopt); + error = IPSEC_PCBCTL(ipv6, inp, sopt); break; } /* FALLTHROUGH */ @@ -2005,7 +2005,7 @@ do { \ break; case IPV6_UNICAST_HOPS: - optval = in6p->in6p_hops; + optval = inp->in6p_hops; break; case IPV6_RECVPKTINFO: @@ -2031,7 +2031,7 @@ do { \ case IPV6_PORTRANGE: { int flags; - flags = in6p->inp_flags; + flags = inp->inp_flags; if (flags & INP_HIGHPORT) optval = IPV6_PORTRANGE_HIGH; else if (flags & INP_LOWPORT) @@ -2057,11 +2057,11 @@ do { \ break; case IPV6_FLOWID: - optval = in6p->inp_flowid; + optval = inp->inp_flowid; break; case IPV6_FLOWTYPE: - optval = in6p->inp_flowtype; + optval = inp->inp_flowtype; break; case IPV6_RECVFLOWID: @@ -2070,8 +2070,8 @@ do { \ #ifdef RSS case IPV6_RSSBUCKETID: retval = - rss_hash2bucket(in6p->inp_flowid, - in6p->inp_flowtype, + rss_hash2bucket(inp->inp_flowid, + inp->inp_flowtype, &rss_bucket); if (retval == 0) optval = rss_bucket; @@ -2107,12 +2107,12 @@ do { \ * XXX: we dot not consider the case of source * routing, or optional information to specify * the outgoing interface. - * Copy faddr out of in6p to avoid holding lock + * Copy faddr out of inp to avoid holding lock * on inp during route lookup. */ - INP_RLOCK(in6p); - bcopy(&in6p->in6p_faddr, &addr, sizeof(addr)); - INP_RUNLOCK(in6p); + INP_RLOCK(inp); + bcopy(&inp->in6p_faddr, &addr, sizeof(addr)); + INP_RUNLOCK(inp); error = ip6_getpmtu_ctl(so->so_fibnum, &addr, &pmtu); if (error) @@ -2164,20 +2164,20 @@ do { \ case IPV6_DONTFRAG: case IPV6_USE_MIN_MTU: case IPV6_PREFER_TEMPADDR: - error = ip6_getpcbopt(in6p, optname, sopt); + error = ip6_getpcbopt(inp, optname, sopt); break; case IPV6_MULTICAST_IF: case IPV6_MULTICAST_HOPS: case IPV6_MULTICAST_LOOP: case IPV6_MSFILTER: - error = ip6_getmoptions(in6p, sopt); + error = ip6_getmoptions(inp, sopt); break; #if defined(IPSEC) || defined(IPSEC_SUPPORT) case IPV6_IPSEC_POLICY: if (IPSEC_ENABLED(ipv6)) { - error = IPSEC_PCBCTL(ipv6, in6p, sopt); + error = IPSEC_PCBCTL(ipv6, inp, sopt); break; } /* FALLTHROUGH */ @@ -2197,7 +2197,7 @@ ip6_raw_ctloutput(struct socket *so, struct sockopt *s { int error = 0, optval, optlen; const int icmp6off = offsetof(struct icmp6_hdr, icmp6_cksum); - struct inpcb *in6p = sotoinpcb(so); + struct inpcb *inp = sotoinpcb(so); int level, op, optname; level = sopt->sopt_level; @@ -2240,14 +2240,14 @@ ip6_raw_ctloutput(struct socket *so, struct sockopt *s if (optval != icmp6off) error = EINVAL; } else - in6p->in6p_cksum = optval; + inp->in6p_cksum = optval; break; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-12@freebsd.org Wed Dec 18 08:08:52 2019 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5C45D1D8193; Wed, 18 Dec 2019 08:08:52 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 47d71w1kq4z4Jbw; Wed, 18 Dec 2019 08:08:52 +0000 (UTC) (envelope-from delphij@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 329C6232B8; Wed, 18 Dec 2019 08:08:52 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xBI88pPi020025; Wed, 18 Dec 2019 08:08:51 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBI88pDs020024; Wed, 18 Dec 2019 08:08:51 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201912180808.xBI88pDs020024@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 18 Dec 2019 08:08:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r355877 - stable/12/sbin/newfs_msdos X-SVN-Group: stable-12 X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: stable/12/sbin/newfs_msdos X-SVN-Commit-Revision: 355877 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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Dec 2019 08:08:52 -0000 Author: delphij Date: Wed Dec 18 08:08:51 2019 New Revision: 355877 URL: https://svnweb.freebsd.org/changeset/base/355877 Log: MFC r355317: newfs_msdos: -A is incompatible with -r, not -o. PR: 242314 Submitted by: Guy Yur Modified: stable/12/sbin/newfs_msdos/newfs_msdos.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/newfs_msdos/newfs_msdos.c ============================================================================== --- stable/12/sbin/newfs_msdos/newfs_msdos.c Wed Dec 18 06:22:28 2019 (r355876) +++ stable/12/sbin/newfs_msdos/newfs_msdos.c Wed Dec 18 08:08:51 2019 (r355877) @@ -179,7 +179,7 @@ main(int argc, char *argv[]) if (argc < 1 || argc > 2) usage(); if (o.align) { - if (o.hidden_sectors_set) + if (o.reserved_sectors) errx(1, "align (-A) is incompatible with -r"); } fname = *argv++; From owner-svn-src-stable-12@freebsd.org Wed Dec 18 11:48:50 2019 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A3C8A1DC9CE; Wed, 18 Dec 2019 11:48: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 47dCvk4fH1z4VPC; Wed, 18 Dec 2019 11:48: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 961AB25B08; Wed, 18 Dec 2019 11:48: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 xBIBmoxO049973; Wed, 18 Dec 2019 11:48:50 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBIBmo7O049971; Wed, 18 Dec 2019 11:48:50 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201912181148.xBIBmo7O049971@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Wed, 18 Dec 2019 11:48:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r355880 - stable/12/sys/netinet6 X-SVN-Group: stable-12 X-SVN-Commit-Author: bz X-SVN-Commit-Paths: stable/12/sys/netinet6 X-SVN-Commit-Revision: 355880 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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Dec 2019 11:48:50 -0000 Author: bz Date: Wed Dec 18 11:48:50 2019 New Revision: 355880 URL: https://svnweb.freebsd.org/changeset/base/355880 Log: MFC r350532-350536,350559,350584-350585,350746-350747: Merge the first part of frag6.c changes from HEAD. Apart from moving the sysctls into the local file these are mostly non-functional changes. frag6.c: sort includes frag6.c: move variables and sysctls into local file frag6.c: remove dead code frag6.c: rename malloc type frag6.c: make compile with gcc frag6.c: fix includes frag6.c: re-order functions within file frag6.c: rename ip6q[] to ipq6b[] and consistently use "bucket" frag6.c: initial comment and whitespace cleanup. frag6.c: cleanup varaibles and return statements. Sponsored by: Netflix Modified: stable/12/sys/netinet6/frag6.c stable/12/sys/netinet6/in6_proto.c stable/12/sys/netinet6/ip6_var.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet6/frag6.c ============================================================================== --- stable/12/sys/netinet6/frag6.c Wed Dec 18 09:30:32 2019 (r355879) +++ stable/12/sys/netinet6/frag6.c Wed Dec 18 11:48:50 2019 (r355880) @@ -38,20 +38,17 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include #include +#include #include #include -#include -#include #include #include -#include -#include -#include +#include #include -#include - #include #include #include @@ -63,14 +60,14 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include /* for ECN definitions */ -#include /* for ECN definitions */ +#include /* For ECN definitions. */ +#include /* For ECN definitions. */ +#ifdef MAC #include +#endif -/* - * Reassembly headers are stored in hash buckets. - */ +/* Reassembly headers are stored in hash buckets. */ #define IP6REASS_NHASH_LOG2 10 #define IP6REASS_NHASH (1 << IP6REASS_NHASH_LOG2) #define IP6REASS_HMASK (IP6REASS_NHASH - 1) @@ -89,23 +86,36 @@ struct ip6qbucket { int count; }; -VNET_DEFINE_STATIC(volatile u_int, frag6_nfragpackets); -volatile u_int frag6_nfrags = 0; -VNET_DEFINE_STATIC(struct ip6qbucket, ip6q[IP6REASS_NHASH]); -VNET_DEFINE_STATIC(uint32_t, ip6q_hashseed); +static MALLOC_DEFINE(M_FRAG6, "frag6", "IPv6 fragment reassembly header"); +/* System wide (global) maximum and count of packets in reassembly queues. */ +static int ip6_maxfrags; +static volatile u_int frag6_nfrags = 0; + +/* Maximum and current packets in per-VNET reassembly queue. */ +VNET_DEFINE_STATIC(int, ip6_maxfragpackets); +VNET_DEFINE_STATIC(volatile u_int, frag6_nfragpackets); +#define V_ip6_maxfragpackets VNET(ip6_maxfragpackets) #define V_frag6_nfragpackets VNET(frag6_nfragpackets) -#define V_ip6q VNET(ip6q) -#define V_ip6q_hashseed VNET(ip6q_hashseed) -#define IP6Q_LOCK(i) mtx_lock(&V_ip6q[(i)].lock) -#define IP6Q_TRYLOCK(i) mtx_trylock(&V_ip6q[(i)].lock) -#define IP6Q_LOCK_ASSERT(i) mtx_assert(&V_ip6q[(i)].lock, MA_OWNED) -#define IP6Q_UNLOCK(i) mtx_unlock(&V_ip6q[(i)].lock) -#define IP6Q_HEAD(i) (&V_ip6q[(i)].ip6q) +/* Maximum per-VNET reassembly queues per bucket and fragments per packet. */ +VNET_DEFINE_STATIC(int, ip6_maxfragbucketsize); +VNET_DEFINE_STATIC(int, ip6_maxfragsperpacket); +#define V_ip6_maxfragbucketsize VNET(ip6_maxfragbucketsize) +#define V_ip6_maxfragsperpacket VNET(ip6_maxfragsperpacket) -static MALLOC_DEFINE(M_FTABLE, "fragment", "fragment reassembly header"); +/* Per-VNET reassembly queue buckets. */ +VNET_DEFINE_STATIC(struct ip6qbucket, ip6qb[IP6REASS_NHASH]); +VNET_DEFINE_STATIC(uint32_t, ip6qb_hashseed); +#define V_ip6qb VNET(ip6qb) +#define V_ip6qb_hashseed VNET(ip6qb_hashseed) +#define IP6QB_LOCK(_b) mtx_lock(&V_ip6qb[(_b)].lock) +#define IP6QB_TRYLOCK(_b) mtx_trylock(&V_ip6qb[(_b)].lock) +#define IP6QB_LOCK_ASSERT(_b) mtx_assert(&V_ip6qb[(_b)].lock, MA_OWNED) +#define IP6QB_UNLOCK(_b) mtx_unlock(&V_ip6qb[(_b)].lock) +#define IP6QB_HEAD(_b) (&V_ip6qb[(_b)].ip6q) + /* * By default, limit the number of IP6 fragments across all reassembly * queues to 1/32 of the total number of mbuf clusters. @@ -122,11 +132,14 @@ static MALLOC_DEFINE(M_FTABLE, "fragment", "fragment r #define IP6_MAXFRAGS (nmbclusters / 32) #define IP6_MAXFRAGPACKETS (imin(IP6_MAXFRAGS, IP6REASS_NHASH * 50)) + /* - * Initialise reassembly queue and fragment identifier. + * Sysctls and helper function. */ -void -frag6_set_bucketsize() +SYSCTL_DECL(_net_inet6_ip6); + +static void +frag6_set_bucketsize(void) { int i; @@ -134,68 +147,140 @@ frag6_set_bucketsize() V_ip6_maxfragbucketsize = imax(i / (IP6REASS_NHASH / 2), 1); } -static void -frag6_change(void *tag) +SYSCTL_INT(_net_inet6_ip6, IPV6CTL_MAXFRAGS, maxfrags, + CTLFLAG_RW, &ip6_maxfrags, 0, + "Maximum allowed number of outstanding IPv6 packet fragments. " + "A value of 0 means no fragmented packets will be accepted, while a " + "a value of -1 means no limit"); + +static int +sysctl_ip6_maxfragpackets(SYSCTL_HANDLER_ARGS) { - VNET_ITERATOR_DECL(vnet_iter); + int error, val; - ip6_maxfrags = IP6_MAXFRAGS; - VNET_LIST_RLOCK_NOSLEEP(); - VNET_FOREACH(vnet_iter) { - CURVNET_SET(vnet_iter); - V_ip6_maxfragpackets = IP6_MAXFRAGPACKETS; - frag6_set_bucketsize(); - CURVNET_RESTORE(); - } - VNET_LIST_RUNLOCK_NOSLEEP(); + val = V_ip6_maxfragpackets; + error = sysctl_handle_int(oidp, &val, 0, req); + if (error != 0 || !req->newptr) + return (error); + V_ip6_maxfragpackets = val; + frag6_set_bucketsize(); + return (0); } +SYSCTL_PROC(_net_inet6_ip6, IPV6CTL_MAXFRAGPACKETS, maxfragpackets, + CTLFLAG_VNET | CTLTYPE_INT | CTLFLAG_RW, NULL, 0, + sysctl_ip6_maxfragpackets, "I", + "Default maximum number of outstanding fragmented IPv6 packets. " + "A value of 0 means no fragmented packets will be accepted, while a " + "a value of -1 means no limit"); +SYSCTL_INT(_net_inet6_ip6, IPV6CTL_MAXFRAGSPERPACKET, maxfragsperpacket, + CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_maxfragsperpacket), 0, + "Maximum allowed number of fragments per packet"); +SYSCTL_INT(_net_inet6_ip6, IPV6CTL_MAXFRAGBUCKETSIZE, maxfragbucketsize, + CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_maxfragbucketsize), 0, + "Maximum number of reassembly queues per hash bucket"); -void -frag6_init(void) + +/* + * Remove the IPv6 fragmentation header from the mbuf. + */ +int +ip6_deletefraghdr(struct mbuf *m, int offset, int wait) { - struct ip6q *q6; - int i; + struct ip6_hdr *ip6; + struct mbuf *t; - V_ip6_maxfragpackets = IP6_MAXFRAGPACKETS; - frag6_set_bucketsize(); - for (i = 0; i < IP6REASS_NHASH; i++) { - q6 = IP6Q_HEAD(i); - q6->ip6q_next = q6->ip6q_prev = q6; - mtx_init(&V_ip6q[i].lock, "ip6qlock", NULL, MTX_DEF); - V_ip6q[i].count = 0; + /* Delete frag6 header. */ + if (m->m_len >= offset + sizeof(struct ip6_frag)) { + + /* This is the only possible case with !PULLDOWN_TEST. */ + ip6 = mtod(m, struct ip6_hdr *); + bcopy(ip6, (char *)ip6 + sizeof(struct ip6_frag), + offset); + m->m_data += sizeof(struct ip6_frag); + m->m_len -= sizeof(struct ip6_frag); + } else { + + /* This comes with no copy if the boundary is on cluster. */ + if ((t = m_split(m, offset, wait)) == NULL) + return (ENOMEM); + m_adj(t, sizeof(struct ip6_frag)); + m_cat(m, t); } - V_ip6q_hashseed = arc4random(); - V_ip6_maxfragsperpacket = 64; - if (!IS_DEFAULT_VNET(curvnet)) - return; - ip6_maxfrags = IP6_MAXFRAGS; - EVENTHANDLER_REGISTER(nmbclusters_change, - frag6_change, NULL, EVENTHANDLER_PRI_ANY); + m->m_flags |= M_FRAGMENTED; + return (0); } /* - * In RFC2460, fragment and reassembly rule do not agree with each other, - * in terms of next header field handling in fragment header. + * Free a fragment reassembly header and all associated datagrams. + */ +static void +frag6_freef(struct ip6q *q6, uint32_t bucket) +{ + struct ip6_hdr *ip6; + struct ip6asfrag *af6, *down6; + struct mbuf *m; + + IP6QB_LOCK_ASSERT(bucket); + + for (af6 = q6->ip6q_down; af6 != (struct ip6asfrag *)q6; + af6 = down6) { + + m = IP6_REASS_MBUF(af6); + down6 = af6->ip6af_down; + frag6_deq(af6, bucket); + + /* + * Return ICMP time exceeded error for the 1st fragment. + * Just free other fragments. + */ + if (af6->ip6af_off == 0) { + + /* Adjust pointer. */ + ip6 = mtod(m, struct ip6_hdr *); + + /* Restore source and destination addresses. */ + ip6->ip6_src = q6->ip6q_src; + ip6->ip6_dst = q6->ip6q_dst; + + icmp6_error(m, ICMP6_TIME_EXCEEDED, + ICMP6_TIME_EXCEED_REASSEMBLY, 0); + } else + m_freem(m); + + free(af6, M_FRAG6); + } + frag6_remque(q6, bucket); + atomic_subtract_int(&frag6_nfrags, q6->ip6q_nfrag); +#ifdef MAC + mac_ip6q_destroy(q6); +#endif + free(q6, M_FRAG6); + atomic_subtract_int(&V_frag6_nfragpackets, 1); +} + +/* + * Like in RFC2460, in RFC8200, fragment and reassembly rules do not agree with + * each other, in terms of next header field handling in fragment header. * While the sender will use the same value for all of the fragmented packets, - * receiver is suggested not to check the consistency. + * receiver is suggested not to check for consistency. * - * fragment rule (p20): - * (2) A Fragment header containing: - * The Next Header value that identifies the first header of - * the Fragmentable Part of the original packet. + * Fragment rules (p18,p19): + * (2) A Fragment header containing: + * The Next Header value that identifies the first header + * after the Per-Fragment headers of the original packet. * -> next header field is same for all fragments * - * reassembly rule (p21): - * The Next Header field of the last header of the Unfragmentable - * Part is obtained from the Next Header field of the first + * Reassembly rule (p20): + * The Next Header field of the last header of the Per-Fragment + * headers is obtained from the Next Header field of the first * fragment's Fragment header. * -> should grab it from the first fragment only * * The following note also contradicts with fragment rule - no one is going to * send different fragment with different next header field. * - * additional note (p22): + * Additional note (p22) [not an error]: * The Next Header values in the Fragment headers of different * fragments of the same original packet may differ. Only the value * from the Offset zero fragment packet is used for reassembly. @@ -204,33 +289,32 @@ frag6_init(void) * There is no explicit reason given in the RFC. Historical reason maybe? */ /* - * Fragment input + * Fragment input. */ int frag6_input(struct mbuf **mp, int *offp, int proto) { - struct mbuf *m = *mp, *t; + struct ifnet *dstifp; + struct in6_ifaddr *ia6; struct ip6_hdr *ip6; struct ip6_frag *ip6f; struct ip6q *head, *q6; - struct ip6asfrag *af6, *ip6af, *af6dwn; - struct in6_ifaddr *ia; - int offset = *offp, nxt, i, next; - int first_frag = 0; - int fragoff, frgpartlen; /* must be larger than u_int16_t */ + struct ip6asfrag *af6, *af6dwn, *ip6af; + struct mbuf *m, *t; uint32_t hashkey[(sizeof(struct in6_addr) * 2 + sizeof(ip6f->ip6f_ident)) / sizeof(uint32_t)]; - uint32_t hash, *hashkeyp; - struct ifnet *dstifp; - u_int8_t ecn, ecn0; + uint32_t bucket, *hashkeyp; + int fragoff, frgpartlen; /* Must be larger than uint16_t. */ + int nxt, offset, plen; + uint8_t ecn, ecn0; + bool only_frag; #ifdef RSS - struct m_tag *mtag; struct ip6_direct_ctx *ip6dc; + struct m_tag *mtag; #endif -#if 0 - char ip6buf[INET6_ADDRSTRLEN]; -#endif + m = *mp; + offset = *offp; ip6 = mtod(m, struct ip6_hdr *); #ifndef PULLDOWN_TEST @@ -243,22 +327,23 @@ frag6_input(struct mbuf **mp, int *offp, int proto) #endif dstifp = NULL; - /* find the destination interface of the packet. */ - ia = in6ifa_ifwithaddr(&ip6->ip6_dst, 0 /* XXX */); - if (ia != NULL) { - dstifp = ia->ia_ifp; - ifa_free(&ia->ia_ifa); + /* Find the destination interface of the packet. */ + ia6 = in6ifa_ifwithaddr(&ip6->ip6_dst, 0 /* XXX */); + if (ia6 != NULL) { + dstifp = ia6->ia_ifp; + ifa_free(&ia6->ia_ifa); } - /* jumbo payload can't contain a fragment header */ + + /* Jumbo payload cannot contain a fragment header. */ if (ip6->ip6_plen == 0) { icmp6_error(m, ICMP6_PARAM_PROB, ICMP6_PARAMPROB_HEADER, offset); in6_ifstat_inc(dstifp, ifs6_reass_fail); - return IPPROTO_DONE; + return (IPPROTO_DONE); } /* - * check whether fragment packet's fragment length is - * multiple of 8 octets. + * Check whether fragment packet's fragment length is a + * multiple of 8 octets (unless it is the last one). * sizeof(struct ip6_frag) == 8 * sizeof(struct ip6_hdr) = 40 */ @@ -267,22 +352,24 @@ frag6_input(struct mbuf **mp, int *offp, int proto) icmp6_error(m, ICMP6_PARAM_PROB, ICMP6_PARAMPROB_HEADER, offsetof(struct ip6_hdr, ip6_plen)); in6_ifstat_inc(dstifp, ifs6_reass_fail); - return IPPROTO_DONE; + return (IPPROTO_DONE); } IP6STAT_INC(ip6s_fragments); in6_ifstat_inc(dstifp, ifs6_reass_reqd); - /* offset now points to data portion */ + /* Offset now points to data portion. */ offset += sizeof(struct ip6_frag); /* - * RFC 6946: Handle "atomic" fragments (offset and m bit set to 0) - * upfront, unrelated to any reassembly. Just skip the fragment header. + * Handle "atomic" fragments (offset and m bit set to 0) upfront, + * unrelated to any reassembly. Still need to remove the frag hdr. + * See RFC 6946 and section 4.5 of RFC 8200. */ if ((ip6f->ip6f_offlg & ~IP6F_RESERVED_MASK) == 0) { /* XXX-BZ we want dedicated counters for this. */ IP6STAT_INC(ip6s_reassembled); + /* XXX-BZ handle correctly. */ in6_ifstat_inc(dstifp, ifs6_reass_ok); *offp = offset; m->m_flags |= M_FRAGMENTED; @@ -296,22 +383,23 @@ frag6_input(struct mbuf **mp, int *offp, int proto) offsetof(struct ip6_hdr, ip6_plen)); in6_ifstat_inc(dstifp, ifs6_reass_fail); IP6STAT_INC(ip6s_fragdropped); - return IPPROTO_DONE; + return (IPPROTO_DONE); } + /* Generate a hash value for fragment bucket selection. */ hashkeyp = hashkey; memcpy(hashkeyp, &ip6->ip6_src, sizeof(struct in6_addr)); hashkeyp += sizeof(struct in6_addr) / sizeof(*hashkeyp); memcpy(hashkeyp, &ip6->ip6_dst, sizeof(struct in6_addr)); hashkeyp += sizeof(struct in6_addr) / sizeof(*hashkeyp); *hashkeyp = ip6f->ip6f_ident; - hash = jenkins_hash32(hashkey, nitems(hashkey), V_ip6q_hashseed); - hash &= IP6REASS_HMASK; - head = IP6Q_HEAD(hash); - IP6Q_LOCK(hash); + bucket = jenkins_hash32(hashkey, nitems(hashkey), V_ip6qb_hashseed); + bucket &= IP6REASS_HMASK; + head = IP6QB_HEAD(bucket); + IP6QB_LOCK(bucket); /* - * Enforce upper bound on number of fragments. + * Enforce upper bound on number of fragments for the entire system. * If maxfrag is 0, never accept fragments. * If maxfrag is -1, accept all fragments without limitation. */ @@ -330,12 +418,12 @@ frag6_input(struct mbuf **mp, int *offp, int proto) ) break; + only_frag = false; if (q6 == head) { - /* - * the first fragment to arrive, create a reassembly queue. - */ - first_frag = 1; + /* A first fragment to arrive creates a reassembly queue. */ + only_frag = true; + /* * Enforce upper bound on number of fragmented packets * for which we attempt reassembly; @@ -345,26 +433,27 @@ frag6_input(struct mbuf **mp, int *offp, int proto) */ if (V_ip6_maxfragpackets < 0) ; - else if (V_ip6q[hash].count >= V_ip6_maxfragbucketsize || + else if (V_ip6qb[bucket].count >= V_ip6_maxfragbucketsize || atomic_load_int(&V_frag6_nfragpackets) >= (u_int)V_ip6_maxfragpackets) goto dropfrag; atomic_add_int(&V_frag6_nfragpackets, 1); - q6 = (struct ip6q *)malloc(sizeof(struct ip6q), M_FTABLE, - M_NOWAIT); + + /* Allocate IPv6 fragement packet queue entry. */ + q6 = (struct ip6q *)malloc(sizeof(struct ip6q), M_FRAG6, + M_NOWAIT | M_ZERO); if (q6 == NULL) goto dropfrag; - bzero(q6, sizeof(*q6)); #ifdef MAC if (mac_ip6q_init(q6, M_NOWAIT) != 0) { - free(q6, M_FTABLE); + free(q6, M_FRAG6); goto dropfrag; } mac_ip6q_create(m, q6); #endif - frag6_insque_head(q6, head, hash); + frag6_insque_head(q6, head, bucket); - /* ip6q_nxt will be filled afterwards, from 1st fragment */ + /* ip6q_nxt will be filled afterwards, from 1st fragment. */ q6->ip6q_down = q6->ip6q_up = (struct ip6asfrag *)q6; #ifdef notyet q6->ip6q_nxtp = (u_char *)nxtp; @@ -381,7 +470,7 @@ frag6_input(struct mbuf **mp, int *offp, int proto) } /* - * If it's the 1st fragment, record the length of the + * If it is the 1st fragment, record the length of the * unfragmentable part and the next header of the fragment header. */ fragoff = ntohs(ip6f->ip6f_offlg & IP6F_OFF_MASK); @@ -402,18 +491,18 @@ frag6_input(struct mbuf **mp, int *offp, int proto) icmp6_error(m, ICMP6_PARAM_PROB, ICMP6_PARAMPROB_HEADER, offset - sizeof(struct ip6_frag) + offsetof(struct ip6_frag, ip6f_offlg)); - IP6Q_UNLOCK(hash); + IP6QB_UNLOCK(bucket); return (IPPROTO_DONE); } } else if (fragoff + frgpartlen > IPV6_MAXPACKET) { icmp6_error(m, ICMP6_PARAM_PROB, ICMP6_PARAMPROB_HEADER, offset - sizeof(struct ip6_frag) + offsetof(struct ip6_frag, ip6f_offlg)); - IP6Q_UNLOCK(hash); + IP6QB_UNLOCK(bucket); return (IPPROTO_DONE); } /* - * If it's the first fragment, do the above check for each + * If it is the first fragment, do the above check for each * fragment already stored in the reassembly queue. */ if (fragoff == 0) { @@ -423,15 +512,18 @@ frag6_input(struct mbuf **mp, int *offp, int proto) if (q6->ip6q_unfrglen + af6->ip6af_off + af6->ip6af_frglen > IPV6_MAXPACKET) { - struct mbuf *merr = IP6_REASS_MBUF(af6); struct ip6_hdr *ip6err; - int erroff = af6->ip6af_offset; + struct mbuf *merr; + int erroff; - /* dequeue the fragment. */ - frag6_deq(af6, hash); - free(af6, M_FTABLE); + merr = IP6_REASS_MBUF(af6); + erroff = af6->ip6af_offset; - /* adjust pointer. */ + /* Dequeue the fragment. */ + frag6_deq(af6, bucket); + free(af6, M_FRAG6); + + /* Adjust pointer. */ ip6err = mtod(merr, struct ip6_hdr *); /* @@ -449,174 +541,113 @@ frag6_input(struct mbuf **mp, int *offp, int proto) } } - ip6af = (struct ip6asfrag *)malloc(sizeof(struct ip6asfrag), M_FTABLE, - M_NOWAIT); + /* Allocate an IPv6 fragement queue entry for this fragmented part. */ + ip6af = (struct ip6asfrag *)malloc(sizeof(struct ip6asfrag), M_FRAG6, + M_NOWAIT | M_ZERO); if (ip6af == NULL) goto dropfrag; - bzero(ip6af, sizeof(*ip6af)); ip6af->ip6af_mff = ip6f->ip6f_offlg & IP6F_MORE_FRAG; ip6af->ip6af_off = fragoff; ip6af->ip6af_frglen = frgpartlen; ip6af->ip6af_offset = offset; IP6_REASS_MBUF(ip6af) = m; - if (first_frag) { + if (only_frag) { af6 = (struct ip6asfrag *)q6; goto insert; } + /* Do duplicate, condition, and boundry checks. */ /* * Handle ECN by comparing this segment with the first one; * if CE is set, do not lose CE. - * drop if CE and not-ECT are mixed for the same packet. + * Drop if CE and not-ECT are mixed for the same packet. */ ecn = (ntohl(ip6->ip6_flow) >> 20) & IPTOS_ECN_MASK; ecn0 = q6->ip6q_ecn; if (ecn == IPTOS_ECN_CE) { if (ecn0 == IPTOS_ECN_NOTECT) { - free(ip6af, M_FTABLE); + free(ip6af, M_FRAG6); goto dropfrag; } if (ecn0 != IPTOS_ECN_CE) q6->ip6q_ecn = IPTOS_ECN_CE; } if (ecn == IPTOS_ECN_NOTECT && ecn0 != IPTOS_ECN_NOTECT) { - free(ip6af, M_FTABLE); + free(ip6af, M_FRAG6); goto dropfrag; } - /* - * Find a segment which begins after this one does. - */ + /* Find a fragmented part which begins after this one does. */ for (af6 = q6->ip6q_down; af6 != (struct ip6asfrag *)q6; af6 = af6->ip6af_down) if (af6->ip6af_off > ip6af->ip6af_off) break; -#if 0 /* - * If there is a preceding segment, it may provide some of - * our data already. If so, drop the data from the incoming - * segment. If it provides all of our data, drop us. - */ - if (af6->ip6af_up != (struct ip6asfrag *)q6) { - i = af6->ip6af_up->ip6af_off + af6->ip6af_up->ip6af_frglen - - ip6af->ip6af_off; - if (i > 0) { - if (i >= ip6af->ip6af_frglen) - goto dropfrag; - m_adj(IP6_REASS_MBUF(ip6af), i); - ip6af->ip6af_off += i; - ip6af->ip6af_frglen -= i; - } - } - - /* - * While we overlap succeeding segments trim them or, - * if they are completely covered, dequeue them. - */ - while (af6 != (struct ip6asfrag *)q6 && - ip6af->ip6af_off + ip6af->ip6af_frglen > af6->ip6af_off) { - i = (ip6af->ip6af_off + ip6af->ip6af_frglen) - af6->ip6af_off; - if (i < af6->ip6af_frglen) { - af6->ip6af_frglen -= i; - af6->ip6af_off += i; - m_adj(IP6_REASS_MBUF(af6), i); - break; - } - af6 = af6->ip6af_down; - m_freem(IP6_REASS_MBUF(af6->ip6af_up)); - frag6_deq(af6->ip6af_up, hash); - } -#else - /* * If the incoming framgent overlaps some existing fragments in - * the reassembly queue, drop it, since it is dangerous to override - * existing fragments from a security point of view. - * We don't know which fragment is the bad guy - here we trust - * fragment that came in earlier, with no real reason. - * - * Note: due to changes after disabling this part, mbuf passed to - * m_adj() below now does not meet the requirement. + * the reassembly queue, drop both the new fragment and the + * entire reassembly queue. However, if the new fragment + * is an exact duplicate of an existing fragment, only silently + * drop the existing fragment and leave the fragmentation queue + * unchanged, as allowed by the RFC. (RFC 8200, 4.5) */ if (af6->ip6af_up != (struct ip6asfrag *)q6) { - i = af6->ip6af_up->ip6af_off + af6->ip6af_up->ip6af_frglen - - ip6af->ip6af_off; - if (i > 0) { -#if 0 /* suppress the noisy log */ - log(LOG_ERR, "%d bytes of a fragment from %s " - "overlaps the previous fragment\n", - i, ip6_sprintf(ip6buf, &q6->ip6q_src)); -#endif - free(ip6af, M_FTABLE); + if (af6->ip6af_up->ip6af_off + af6->ip6af_up->ip6af_frglen - + ip6af->ip6af_off > 0) { + free(ip6af, M_FRAG6); goto dropfrag; } } if (af6 != (struct ip6asfrag *)q6) { - i = (ip6af->ip6af_off + ip6af->ip6af_frglen) - af6->ip6af_off; - if (i > 0) { -#if 0 /* suppress the noisy log */ - log(LOG_ERR, "%d bytes of a fragment from %s " - "overlaps the succeeding fragment", - i, ip6_sprintf(ip6buf, &q6->ip6q_src)); -#endif - free(ip6af, M_FTABLE); + if (ip6af->ip6af_off + ip6af->ip6af_frglen - + af6->ip6af_off > 0) { + free(ip6af, M_FRAG6); goto dropfrag; } } -#endif insert: #ifdef MAC - if (!first_frag) + if (!only_frag) mac_ip6q_update(m, q6); #endif /* - * Stick new segment in its place; - * check for complete reassembly. - * If not complete, check fragment limit. - * Move to front of packet queue, as we are - * the most recently active fragmented packet. + * Stick new segment in its place; check for complete reassembly. + * If not complete, check fragment limit. Move to front of packet + * queue, as we are the most recently active fragmented packet. */ - frag6_enq(ip6af, af6->ip6af_up, hash); + frag6_enq(ip6af, af6->ip6af_up, bucket); atomic_add_int(&frag6_nfrags, 1); q6->ip6q_nfrag++; -#if 0 /* xxx */ - if (q6 != head->ip6q_next) { - frag6_remque(q6, hash); - frag6_insque_head(q6, head, hash); - } -#endif - next = 0; + plen = 0; for (af6 = q6->ip6q_down; af6 != (struct ip6asfrag *)q6; af6 = af6->ip6af_down) { - if (af6->ip6af_off != next) { + if (af6->ip6af_off != plen) { if (q6->ip6q_nfrag > V_ip6_maxfragsperpacket) { IP6STAT_INC(ip6s_fragdropped); - frag6_freef(q6, hash); + frag6_freef(q6, bucket); } - IP6Q_UNLOCK(hash); - return IPPROTO_DONE; + IP6QB_UNLOCK(bucket); + return (IPPROTO_DONE); } - next += af6->ip6af_frglen; + plen += af6->ip6af_frglen; } if (af6->ip6af_up->ip6af_mff) { if (q6->ip6q_nfrag > V_ip6_maxfragsperpacket) { IP6STAT_INC(ip6s_fragdropped); - frag6_freef(q6, hash); + frag6_freef(q6, bucket); } - IP6Q_UNLOCK(hash); - return IPPROTO_DONE; + IP6QB_UNLOCK(bucket); + return (IPPROTO_DONE); } - /* - * Reassembly is complete; concatenate fragments. - */ + /* Reassembly is complete; concatenate fragments. */ ip6af = q6->ip6q_down; t = m = IP6_REASS_MBUF(ip6af); af6 = ip6af->ip6af_down; - frag6_deq(ip6af, hash); + frag6_deq(ip6af, bucket); while (af6 != (struct ip6asfrag *)q6) { m->m_pkthdr.csum_flags &= IP6_REASS_MBUF(af6)->m_pkthdr.csum_flags; @@ -624,13 +655,13 @@ insert: IP6_REASS_MBUF(af6)->m_pkthdr.csum_data; af6dwn = af6->ip6af_down; - frag6_deq(af6, hash); + frag6_deq(af6, bucket); while (t->m_next) t = t->m_next; m_adj(IP6_REASS_MBUF(af6), af6->ip6af_offset); m_demote_pkthdr(IP6_REASS_MBUF(af6)); m_cat(t, IP6_REASS_MBUF(af6)); - free(af6, M_FTABLE); + free(af6, M_FRAG6); af6 = af6dwn; } @@ -638,47 +669,43 @@ insert: m->m_pkthdr.csum_data = (m->m_pkthdr.csum_data & 0xffff) + (m->m_pkthdr.csum_data >> 16); - /* adjust offset to point where the original next header starts */ + /* Adjust offset to point where the original next header starts. */ offset = ip6af->ip6af_offset - sizeof(struct ip6_frag); - free(ip6af, M_FTABLE); + free(ip6af, M_FRAG6); ip6 = mtod(m, struct ip6_hdr *); - ip6->ip6_plen = htons((u_short)next + offset - sizeof(struct ip6_hdr)); + ip6->ip6_plen = htons((u_short)plen + offset - sizeof(struct ip6_hdr)); if (q6->ip6q_ecn == IPTOS_ECN_CE) ip6->ip6_flow |= htonl(IPTOS_ECN_CE << 20); nxt = q6->ip6q_nxt; -#ifdef notyet - *q6->ip6q_nxtp = (u_char)(nxt & 0xff); -#endif if (ip6_deletefraghdr(m, offset, M_NOWAIT) != 0) { - frag6_remque(q6, hash); + frag6_remque(q6, bucket); atomic_subtract_int(&frag6_nfrags, q6->ip6q_nfrag); #ifdef MAC mac_ip6q_destroy(q6); #endif - free(q6, M_FTABLE); + free(q6, M_FRAG6); atomic_subtract_int(&V_frag6_nfragpackets, 1); goto dropfrag; } - /* - * Store NXT to the original. - */ + /* Set nxt(-hdr field value) to the original value. */ m_copyback(m, ip6_get_prevhdr(m, offset), sizeof(uint8_t), (caddr_t)&nxt); - frag6_remque(q6, hash); + frag6_remque(q6, bucket); atomic_subtract_int(&frag6_nfrags, q6->ip6q_nfrag); #ifdef MAC mac_ip6q_reassemble(q6, m); mac_ip6q_destroy(q6); #endif - free(q6, M_FTABLE); + free(q6, M_FRAG6); atomic_subtract_int(&V_frag6_nfragpackets, 1); if (m->m_flags & M_PKTHDR) { /* Isn't it always true? */ - int plen = 0; + + plen = 0; for (t = m; t; t = t->m_next) plen += t->m_len; m->m_pkthdr.len = plen; @@ -697,164 +724,54 @@ insert: m_tag_prepend(m, mtag); #endif - IP6Q_UNLOCK(hash); + IP6QB_UNLOCK(bucket); IP6STAT_INC(ip6s_reassembled); in6_ifstat_inc(dstifp, ifs6_reass_ok); #ifdef RSS - /* - * Queue/dispatch for reprocessing. - */ + /* Queue/dispatch for reprocessing. */ netisr_dispatch(NETISR_IPV6_DIRECT, m); - return IPPROTO_DONE; + return (IPPROTO_DONE); #endif - /* - * Tell launch routine the next header - */ - + /* Tell launch routine the next header. */ *mp = m; *offp = offset; - return nxt; + return (nxt); - dropfrag: - IP6Q_UNLOCK(hash); +dropfrag: + IP6QB_UNLOCK(bucket); in6_ifstat_inc(dstifp, ifs6_reass_fail); IP6STAT_INC(ip6s_fragdropped); m_freem(m); - return IPPROTO_DONE; + return (IPPROTO_DONE); } /* - * Free a fragment reassembly header and all - * associated datagrams. - */ -static void -frag6_freef(struct ip6q *q6, uint32_t bucket) -{ - struct ip6asfrag *af6, *down6; - - IP6Q_LOCK_ASSERT(bucket); - - for (af6 = q6->ip6q_down; af6 != (struct ip6asfrag *)q6; - af6 = down6) { - struct mbuf *m = IP6_REASS_MBUF(af6); - - down6 = af6->ip6af_down; - frag6_deq(af6, bucket); - - /* - * Return ICMP time exceeded error for the 1st fragment. - * Just free other fragments. - */ - if (af6->ip6af_off == 0) { - struct ip6_hdr *ip6; - - /* adjust pointer */ - ip6 = mtod(m, struct ip6_hdr *); - - /* restore source and destination addresses */ - ip6->ip6_src = q6->ip6q_src; - ip6->ip6_dst = q6->ip6q_dst; - - icmp6_error(m, ICMP6_TIME_EXCEEDED, - ICMP6_TIME_EXCEED_REASSEMBLY, 0); - } else - m_freem(m); - free(af6, M_FTABLE); - } - frag6_remque(q6, bucket); - atomic_subtract_int(&frag6_nfrags, q6->ip6q_nfrag); -#ifdef MAC - mac_ip6q_destroy(q6); -#endif - free(q6, M_FTABLE); - atomic_subtract_int(&V_frag6_nfragpackets, 1); -} - -/* - * Put an ip fragment on a reassembly chain. - * Like insque, but pointers in middle of structure. - */ -static void -frag6_enq(struct ip6asfrag *af6, struct ip6asfrag *up6, - uint32_t bucket __unused) -{ - - IP6Q_LOCK_ASSERT(bucket); - - af6->ip6af_up = up6; - af6->ip6af_down = up6->ip6af_down; - up6->ip6af_down->ip6af_up = af6; - up6->ip6af_down = af6; -} - -/* - * To frag6_enq as remque is to insque. - */ -static void -frag6_deq(struct ip6asfrag *af6, uint32_t bucket __unused) -{ - - IP6Q_LOCK_ASSERT(bucket); - - af6->ip6af_up->ip6af_down = af6->ip6af_down; - af6->ip6af_down->ip6af_up = af6->ip6af_up; -} - -static void -frag6_insque_head(struct ip6q *new, struct ip6q *old, uint32_t bucket) -{ - - IP6Q_LOCK_ASSERT(bucket); - KASSERT(IP6Q_HEAD(bucket) == old, - ("%s: attempt to insert at head of wrong bucket" - " (bucket=%u, old=%p)", __func__, bucket, old)); - - new->ip6q_prev = old; - new->ip6q_next = old->ip6q_next; - old->ip6q_next->ip6q_prev= new; - old->ip6q_next = new; - V_ip6q[bucket].count++; -} - -static void -frag6_remque(struct ip6q *p6, uint32_t bucket) -{ - - IP6Q_LOCK_ASSERT(bucket); - - p6->ip6q_prev->ip6q_next = p6->ip6q_next; - p6->ip6q_next->ip6q_prev = p6->ip6q_prev; - V_ip6q[bucket].count--; -} - -/* * IPv6 reassembling timer processing; - * if a timer expires on a reassembly - * queue, discard it. + * if a timer expires on a reassembly queue, discard it. */ void frag6_slowtimo(void) { VNET_ITERATOR_DECL(vnet_iter); struct ip6q *head, *q6; - int i; + uint32_t bucket; VNET_LIST_RLOCK_NOSLEEP(); VNET_FOREACH(vnet_iter) { CURVNET_SET(vnet_iter); - for (i = 0; i < IP6REASS_NHASH; i++) { - IP6Q_LOCK(i); - head = IP6Q_HEAD(i); + for (bucket = 0; bucket < IP6REASS_NHASH; bucket++) { + IP6QB_LOCK(bucket); + head = IP6QB_HEAD(bucket); q6 = head->ip6q_next; if (q6 == NULL) { /* * XXXJTL: This should never happen. This *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-12@freebsd.org Thu Dec 19 01:25:44 2019 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E15441CD48F; Thu, 19 Dec 2019 01:25:44 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 47dZ2J5lD1z41RM; Thu, 19 Dec 2019 01:25:44 +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 C05CF7051; Thu, 19 Dec 2019 01:25:44 +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 xBJ1PiwG037145; Thu, 19 Dec 2019 01:25:44 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBJ1PiRT037144; Thu, 19 Dec 2019 01:25:44 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201912190125.xBJ1PiRT037144@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 19 Dec 2019 01:25:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r355891 - stable/12/sys/geom X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/geom X-SVN-Commit-Revision: 355891 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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Dec 2019 01:25:44 -0000 Author: mav Date: Thu Dec 19 01:25:44 2019 New Revision: 355891 URL: https://svnweb.freebsd.org/changeset/base/355891 Log: MFC r355410: Switch GEOM_DEV from make_dev_p() to make_dev_s(). It closes the race condition and so allows to remove few NULL checks. Also while there, use dev->si_drv1 in addition to cp->private to store softc pointer. For calls coming from the dev side it gives reliable cache hit instead of often miss before. Modified: stable/12/sys/geom/geom_dev.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/geom/geom_dev.c ============================================================================== --- stable/12/sys/geom/geom_dev.c Thu Dec 19 00:11:18 2019 (r355890) +++ stable/12/sys/geom/geom_dev.c Thu Dec 19 01:25:44 2019 (r355891) @@ -326,6 +326,7 @@ g_dev_taste(struct g_class *mp, struct g_provider *pp, int error; struct cdev *dev, *adev; char buf[SPECNAMELEN + 6]; + struct make_dev_args args; g_trace(G_T_TOPOLOGY, "dev_taste(%s,%s)", mp->name, pp->name); g_topology_assert(); @@ -338,8 +339,17 @@ g_dev_taste(struct g_class *mp, struct g_provider *pp, error = g_attach(cp, pp); KASSERT(error == 0, ("g_dev_taste(%s) failed to g_attach, err=%d", pp->name, error)); - error = make_dev_p(MAKEDEV_CHECKNAME | MAKEDEV_WAITOK, &dev, - &g_dev_cdevsw, NULL, UID_ROOT, GID_OPERATOR, 0640, "%s", gp->name); + + make_dev_args_init(&args); + args.mda_flags = MAKEDEV_CHECKNAME | MAKEDEV_WAITOK; + args.mda_devsw = &g_dev_cdevsw; + args.mda_cr = NULL; + args.mda_uid = UID_ROOT; + args.mda_gid = GID_OPERATOR; + args.mda_mode = 0640; + args.mda_si_drv1 = sc; + args.mda_si_drv2 = cp; + error = make_dev_s(&args, &sc->sc_dev, "%s", gp->name); if (error != 0) { printf("%s: make_dev_p() failed (gp->name=%s, error=%d)\n", __func__, gp->name, error); @@ -350,11 +360,9 @@ g_dev_taste(struct g_class *mp, struct g_provider *pp, g_free(sc); return (NULL); } + dev = sc->sc_dev; dev->si_flags |= SI_UNMAPPED; - sc->sc_dev = dev; - dev->si_iosize_max = MAXPHYS; - dev->si_drv2 = cp; error = init_dumpdev(dev); if (error != 0) printf("%s: init_dumpdev() failed (gp->name=%s, error=%d)\n", @@ -389,8 +397,6 @@ g_dev_open(struct cdev *dev, int flags, int fmt, struc int error, r, w, e; cp = dev->si_drv2; - if (cp == NULL) - return (ENXIO); /* g_dev_taste() not done yet */ g_trace(G_T_ACCESS, "g_dev_open(%s, %d, %d, %p)", cp->geom->name, flags, fmt, td); @@ -421,7 +427,7 @@ g_dev_open(struct cdev *dev, int flags, int fmt, struc error = g_access(cp, r, w, e); g_topology_unlock(); if (error == 0) { - sc = cp->private; + sc = dev->si_drv1; mtx_lock(&sc->sc_mtx); if (sc->sc_open == 0 && (sc->sc_active & SC_A_ACTIVE) != 0) wakeup(&sc->sc_active); @@ -443,8 +449,6 @@ g_dev_close(struct cdev *dev, int flags, int fmt, stru int error, r, w, e; cp = dev->si_drv2; - if (cp == NULL) - return (ENXIO); g_trace(G_T_ACCESS, "g_dev_close(%s, %d, %d, %p)", cp->geom->name, flags, fmt, td); @@ -469,7 +473,7 @@ g_dev_close(struct cdev *dev, int flags, int fmt, stru if (r + w + e == 0) return (EINVAL); - sc = cp->private; + sc = dev->si_drv1; mtx_lock(&sc->sc_mtx); sc->sc_open += r + w + e; if (sc->sc_open == 0) @@ -748,7 +752,6 @@ g_dev_strategy(struct bio *bp) ("Wrong bio_cmd bio=%p cmd=%d", bp, bp->bio_cmd)); dev = bp->bio_dev; cp = dev->si_drv2; - sc = cp->private; KASSERT(cp->acr || cp->acw, ("Consumer with zero access count in g_dev_strategy")); biotrack(bp, __func__); @@ -760,6 +763,7 @@ g_dev_strategy(struct bio *bp) return; } #endif + sc = dev->si_drv1; KASSERT(sc->sc_open > 0, ("Closed device in g_dev_strategy")); atomic_add_int(&sc->sc_active, 1); From owner-svn-src-stable-12@freebsd.org Thu Dec 19 01:28:08 2019 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1040E1CD778; Thu, 19 Dec 2019 01:28:08 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 47dZ536lgRz41fB; Thu, 19 Dec 2019 01:28:07 +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 E2EE17065; Thu, 19 Dec 2019 01:28:07 +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 xBJ1S7so037303; Thu, 19 Dec 2019 01:28:07 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBJ1S6cR037296; Thu, 19 Dec 2019 01:28:06 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201912190128.xBJ1S6cR037296@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 19 Dec 2019 01:28:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r355892 - in stable/12/sys/geom: . mirror part X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: in stable/12/sys/geom: . mirror part X-SVN-Commit-Revision: 355892 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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Dec 2019 01:28:08 -0000 Author: mav Date: Thu Dec 19 01:28:05 2019 New Revision: 355892 URL: https://svnweb.freebsd.org/changeset/base/355892 Log: MFC r355412, r355420: Wrap g_trace() into a macro to avoid unneeded calls. In most cases with debug disabled this function does nothing, but argument passing and the call still cost measurable time due to cache misses, etc. While there, define G_F_FOOTSHOOTING instead of numeric constants. Modified: stable/12/sys/geom/geom.h stable/12/sys/geom/geom_dump.c stable/12/sys/geom/geom_int.h stable/12/sys/geom/geom_subr.c stable/12/sys/geom/mirror/g_mirror_ctl.c stable/12/sys/geom/part/g_part.c stable/12/sys/geom/part/g_part_mbr.c stable/12/sys/geom/part/g_part_vtoc8.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/geom/geom.h ============================================================================== --- stable/12/sys/geom/geom.h Thu Dec 19 01:25:44 2019 (r355891) +++ stable/12/sys/geom/geom.h Thu Dec 19 01:28:05 2019 (r355892) @@ -255,11 +255,18 @@ void g_dev_physpath_changed(void); struct g_provider *g_dev_getprovider(struct cdev *dev); /* geom_dump.c */ -void g_trace(int level, const char *, ...); -# define G_T_TOPOLOGY 1 -# define G_T_BIO 2 -# define G_T_ACCESS 4 - +void (g_trace)(int level, const char *, ...) __printflike(2, 3); +#define G_T_TOPOLOGY 0x01 +#define G_T_BIO 0x02 +#define G_T_ACCESS 0x04 +extern int g_debugflags; +#define G_F_FOOTSHOOTING 0x10 +#define G_F_DISKIOCTL 0x40 +#define G_F_CTLDUMP 0x80 +#define g_trace(level, fmt, ...) do { \ + if (__predict_false(g_debugflags & (level))) \ + (g_trace)(level, fmt, ## __VA_ARGS__); \ +} while (0) /* geom_event.c */ typedef void g_event_t(void *, int flag); Modified: stable/12/sys/geom/geom_dump.c ============================================================================== --- stable/12/sys/geom/geom_dump.c Thu Dec 19 01:25:44 2019 (r355891) +++ stable/12/sys/geom/geom_dump.c Thu Dec 19 01:28:05 2019 (r355892) @@ -319,7 +319,7 @@ g_confxml(void *p, int flag) } void -g_trace(int level, const char *fmt, ...) +(g_trace)(int level, const char *fmt, ...) { va_list ap; Modified: stable/12/sys/geom/geom_int.h ============================================================================== --- stable/12/sys/geom/geom_int.h Thu Dec 19 01:25:44 2019 (r355891) +++ stable/12/sys/geom/geom_int.h Thu Dec 19 01:28:05 2019 (r355892) @@ -44,18 +44,6 @@ extern int g_collectstats; #define G_STATS_PROVIDERS 1 /* Collect I/O stats for providers */ #define G_STATS_CONSUMERS 2 /* Collect I/O stats for consumers */ -extern int g_debugflags; -/* - * 1 G_T_TOPOLOGY - * 2 G_T_BIO - * 4 G_T_ACCESS - * 8 (unused) - * 16 Allow footshooting on rank#1 providers - * 32 G_T_DETAILS - */ -#define G_F_DISKIOCTL 64 -#define G_F_CTLDUMP 128 - /* geom_dump.c */ void g_confxml(void *, int flag); void g_conf_specific(struct sbuf *sb, struct g_class *mp, struct g_geom *gp, struct g_provider *pp, struct g_consumer *cp); Modified: stable/12/sys/geom/geom_subr.c ============================================================================== --- stable/12/sys/geom/geom_subr.c Thu Dec 19 01:25:44 2019 (r355891) +++ stable/12/sys/geom/geom_subr.c Thu Dec 19 01:28:05 2019 (r355892) @@ -944,7 +944,7 @@ g_access(struct g_consumer *cp, int dcr, int dcw, int pp, pp->name); /* If foot-shooting is enabled, any open on rank#1 is OK */ - if ((g_debugflags & 16) && gp->rank == 1) + if ((g_debugflags & G_F_FOOTSHOOTING) && gp->rank == 1) ; /* If we try exclusive but already write: fail */ else if (dce > 0 && pw > 0) Modified: stable/12/sys/geom/mirror/g_mirror_ctl.c ============================================================================== --- stable/12/sys/geom/mirror/g_mirror_ctl.c Thu Dec 19 01:25:44 2019 (r355891) +++ stable/12/sys/geom/mirror/g_mirror_ctl.c Thu Dec 19 01:28:05 2019 (r355892) @@ -852,7 +852,7 @@ g_mirror_ctl_resize(struct gctl_req *req, struct g_cla return; } /* Deny shrinking of an opened provider */ - if ((g_debugflags & 16) == 0 && sc->sc_provider_open > 0) { + if ((g_debugflags & G_F_FOOTSHOOTING) == 0 && sc->sc_provider_open > 0) { if (sc->sc_mediasize > mediasize) { gctl_error(req, "Device %s is busy.", sc->sc_provider->name); Modified: stable/12/sys/geom/part/g_part.c ============================================================================== --- stable/12/sys/geom/part/g_part.c Thu Dec 19 01:25:44 2019 (r355891) +++ stable/12/sys/geom/part/g_part.c Thu Dec 19 01:28:05 2019 (r355892) @@ -1383,7 +1383,7 @@ g_part_ctl_resize(struct gctl_req *req, struct g_part_ } pp = entry->gpe_pp; - if ((g_debugflags & 16) == 0 && + if ((g_debugflags & G_F_FOOTSHOOTING) == 0 && (pp->acr > 0 || pp->acw > 0 || pp->ace > 0)) { if (entry->gpe_end - entry->gpe_start + 1 > gpp->gpp_size) { /* Deny shrinking of an opened partition. */ Modified: stable/12/sys/geom/part/g_part_mbr.c ============================================================================== --- stable/12/sys/geom/part/g_part_mbr.c Thu Dec 19 01:25:44 2019 (r355891) +++ stable/12/sys/geom/part/g_part_mbr.c Thu Dec 19 01:28:05 2019 (r355892) @@ -381,7 +381,7 @@ g_part_mbr_resize(struct g_part_table *basetable, return (EINVAL); /* XXX: prevent unexpected shrinking. */ pp = baseentry->gpe_pp; - if ((g_debugflags & 0x10) == 0 && size < gpp->gpp_size && + if ((g_debugflags & G_F_FOOTSHOOTING) == 0 && size < gpp->gpp_size && pp->mediasize / pp->sectorsize > size) return (EBUSY); entry = (struct g_part_mbr_entry *)baseentry; Modified: stable/12/sys/geom/part/g_part_vtoc8.c ============================================================================== --- stable/12/sys/geom/part/g_part_vtoc8.c Thu Dec 19 01:25:44 2019 (r355891) +++ stable/12/sys/geom/part/g_part_vtoc8.c Thu Dec 19 01:28:05 2019 (r355892) @@ -373,7 +373,7 @@ g_part_vtoc8_resize(struct g_part_table *basetable, return (EINVAL); /* XXX: prevent unexpected shrinking. */ pp = entry->gpe_pp; - if ((g_debugflags & 0x10) == 0 && size < gpp->gpp_size && + if ((g_debugflags & G_F_FOOTSHOOTING) == 0 && size < gpp->gpp_size && pp->mediasize / pp->sectorsize > size) return (EBUSY); entry->gpe_end = entry->gpe_start + size - 1; From owner-svn-src-stable-12@freebsd.org Thu Dec 19 01:30:30 2019 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7384B1CDA91; Thu, 19 Dec 2019 01:30:30 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 47dZ7p2WYBz41sL; Thu, 19 Dec 2019 01:30:30 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 380F0707E; Thu, 19 Dec 2019 01:30:30 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xBJ1UUNg037491; Thu, 19 Dec 2019 01:30:30 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBJ1UUaq037490; Thu, 19 Dec 2019 01:30:30 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201912190130.xBJ1UUaq037490@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 19 Dec 2019 01:30:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r355893 - stable/12/sys/geom X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/geom X-SVN-Commit-Revision: 355893 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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Dec 2019 01:30:30 -0000 Author: mav Date: Thu Dec 19 01:30:29 2019 New Revision: 355893 URL: https://svnweb.freebsd.org/changeset/base/355893 Log: MFC r355437: Make GEOM_DEV code slightly more compact. Should be no functional change. Modified: stable/12/sys/geom/geom_dev.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/geom/geom_dev.c ============================================================================== --- stable/12/sys/geom/geom_dev.c Thu Dec 19 01:28:05 2019 (r355892) +++ stable/12/sys/geom/geom_dev.c Thu Dec 19 01:30:29 2019 (r355893) @@ -513,12 +513,12 @@ g_dev_ioctl(struct cdev *dev, u_long cmd, caddr_t data i = IOCPARM_LEN(cmd); switch (cmd) { case DIOCGSECTORSIZE: - *(u_int *)data = cp->provider->sectorsize; + *(u_int *)data = pp->sectorsize; if (*(u_int *)data == 0) error = ENOENT; break; case DIOCGMEDIASIZE: - *(off_t *)data = cp->provider->mediasize; + *(off_t *)data = pp->mediasize; if (*(off_t *)data == 0) error = ENOENT; break; @@ -591,8 +591,8 @@ g_dev_ioctl(struct cdev *dev, u_long cmd, caddr_t data case DIOCGDELETE: offset = ((off_t *)data)[0]; length = ((off_t *)data)[1]; - if ((offset % cp->provider->sectorsize) != 0 || - (length % cp->provider->sectorsize) != 0 || length <= 0) { + if ((offset % pp->sectorsize) != 0 || + (length % pp->sectorsize) != 0 || length <= 0) { printf("%s: offset=%jd length=%jd\n", __func__, offset, length); error = EINVAL; @@ -600,14 +600,12 @@ g_dev_ioctl(struct cdev *dev, u_long cmd, caddr_t data } while (length > 0) { chunk = length; - if (g_dev_del_max_sectors != 0 && chunk > - g_dev_del_max_sectors * cp->provider->sectorsize) { - chunk = g_dev_del_max_sectors * - cp->provider->sectorsize; - if (cp->provider->stripesize > 0) { + if (g_dev_del_max_sectors != 0 && + chunk > g_dev_del_max_sectors * pp->sectorsize) { + chunk = g_dev_del_max_sectors * pp->sectorsize; + if (pp->stripesize > 0) { odd = (offset + chunk + - cp->provider->stripeoffset) % - cp->provider->stripesize; + pp->stripeoffset) % pp->stripesize; if (chunk > odd) chunk -= odd; } @@ -635,10 +633,10 @@ g_dev_ioctl(struct cdev *dev, u_long cmd, caddr_t data strlcpy(data, pp->name, i); break; case DIOCGSTRIPESIZE: - *(off_t *)data = cp->provider->stripesize; + *(off_t *)data = pp->stripesize; break; case DIOCGSTRIPEOFFSET: - *(off_t *)data = cp->provider->stripeoffset; + *(off_t *)data = pp->stripeoffset; break; case DIOCGPHYSPATH: error = g_io_getattr("GEOM::physpath", cp, &i, data); @@ -690,8 +688,8 @@ g_dev_ioctl(struct cdev *dev, u_long cmd, caddr_t data break; } default: - if (cp->provider->geom->ioctl != NULL) { - error = cp->provider->geom->ioctl(cp->provider, cmd, data, fflag, td); + if (pp->geom->ioctl != NULL) { + error = pp->geom->ioctl(pp, cmd, data, fflag, td); } else { error = ENOIOCTL; } From owner-svn-src-stable-12@freebsd.org Thu Dec 19 01:32:16 2019 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 22A211CE135; Thu, 19 Dec 2019 01:32:16 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 47dZ9r06CRz42GZ; Thu, 19 Dec 2019 01:32:16 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F32A87225; Thu, 19 Dec 2019 01:32:15 +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 xBJ1WFZx042832; Thu, 19 Dec 2019 01:32:15 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBJ1WFLW042831; Thu, 19 Dec 2019 01:32:15 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201912190132.xBJ1WFLW042831@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 19 Dec 2019 01:32:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r355894 - stable/12/sys/geom X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/geom X-SVN-Commit-Revision: 355894 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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Dec 2019 01:32:16 -0000 Author: mav Date: Thu Dec 19 01:32:15 2019 New Revision: 355894 URL: https://svnweb.freebsd.org/changeset/base/355894 Log: MFC r355438: Block ioctls for dying GEOM_DEV instances. For normal I/Os consumer and provider statuses are checked by g_io_check(). But ioctl calls often do not go through it, being dispatched directly. This change makes their semantics more alike, protecting lower levels. Modified: stable/12/sys/geom/geom_dev.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/geom/geom_dev.c ============================================================================== --- stable/12/sys/geom/geom_dev.c Thu Dec 19 01:30:29 2019 (r355893) +++ stable/12/sys/geom/geom_dev.c Thu Dec 19 01:32:15 2019 (r355894) @@ -489,12 +489,6 @@ g_dev_close(struct cdev *dev, int flags, int fmt, stru return (error); } -/* - * XXX: Until we have unmessed the ioctl situation, there is a race against - * XXX: a concurrent orphanization. We cannot close it by holding topology - * XXX: since that would prevent us from doing our job, and stalling events - * XXX: will break (actually: stall) the BSD disklabel hacks. - */ static int g_dev_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, struct thread *td) { @@ -506,6 +500,12 @@ g_dev_ioctl(struct cdev *dev, u_long cmd, caddr_t data cp = dev->si_drv2; pp = cp->provider; + /* If consumer or provider is dying, don't disturb. */ + if (cp->flags & G_CF_ORPHAN) + return (ENXIO); + if (pp->error) + return (pp->error); + error = 0; KASSERT(cp->acr || cp->acw, ("Consumer with zero access count in g_dev_ioctl")); @@ -628,8 +628,6 @@ g_dev_ioctl(struct cdev *dev, u_long cmd, caddr_t data error = g_io_getattr("GEOM::ident", cp, &i, data); break; case DIOCGPROVIDERNAME: - if (pp == NULL) - return (ENOENT); strlcpy(data, pp->name, i); break; case DIOCGSTRIPESIZE: From owner-svn-src-stable-12@freebsd.org Thu Dec 19 01:34:35 2019 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 839F91CE4D0; Thu, 19 Dec 2019 01:34:35 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 47dZDW2wXLz42cP; Thu, 19 Dec 2019 01:34:35 +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 5F8A77255; Thu, 19 Dec 2019 01:34:35 +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 xBJ1YZFV043003; Thu, 19 Dec 2019 01:34:35 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBJ1YZi2043002; Thu, 19 Dec 2019 01:34:35 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201912190134.xBJ1YZi2043002@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 19 Dec 2019 01:34:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r355895 - stable/12/sys/geom X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/geom X-SVN-Commit-Revision: 355895 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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Dec 2019 01:34:35 -0000 Author: mav Date: Thu Dec 19 01:34:34 2019 New Revision: 355895 URL: https://svnweb.freebsd.org/changeset/base/355895 Log: MFC r355451: Remove some branching from GEOM_DISK hot path. pp->private just can not be NULL in those places. In g_disk_start() and g_disk_ioctl() both dp != NULL and !dp->d_destroyed should always be true if disk_gone() and disk_destroy() are used properly, since GEOM does not send requests to errored providers. If the protocol is not followed, then no amount of additional checks here give real safety. In g_disk_access() though the checks are useful, since GEOM blocks only new opens for errored providers, but allows closes. It should not happen if disk_gone() and disk_destroy() are used properly, but may otherwise. To improve cases when disk_gone() is not used, call it from disk_destroy(). It does not give full guaranties, but it errors the provider and makes GEOM block unwanted requests at least after some race. Modified: stable/12/sys/geom/geom_disk.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/geom/geom_disk.c ============================================================================== --- stable/12/sys/geom/geom_disk.c Thu Dec 19 01:32:15 2019 (r355894) +++ stable/12/sys/geom/geom_disk.c Thu Dec 19 01:34:34 2019 (r355895) @@ -108,7 +108,7 @@ g_disk_access(struct g_provider *pp, int r, int w, int pp->name, r, w, e); g_topology_assert(); sc = pp->private; - if (sc == NULL || (dp = sc->dp) == NULL || dp->d_destroyed) { + if ((dp = sc->dp) == NULL || dp->d_destroyed) { /* * Allow decreasing access count even if disk is not * available anymore. @@ -274,6 +274,8 @@ g_disk_ioctl(struct g_provider *pp, u_long cmd, void * sc = pp->private; dp = sc->dp; + KASSERT(dp != NULL && !dp->d_destroyed, + ("g_disk_ioctl(%lx) on destroyed disk %s", cmd, pp->name)); if (dp->d_ioctl == NULL) return (ENOIOCTL); @@ -432,10 +434,9 @@ g_disk_start(struct bio *bp) biotrack(bp, __func__); sc = bp->bio_to->private; - if (sc == NULL || (dp = sc->dp) == NULL || dp->d_destroyed) { - g_io_deliver(bp, ENXIO); - return; - } + dp = sc->dp; + KASSERT(dp != NULL && !dp->d_destroyed, + ("g_disk_start(%p) on destroyed disk %s", bp, bp->bio_to->name)); error = EJUSTRETURN; switch(bp->bio_cmd) { case BIO_DELETE: @@ -893,8 +894,9 @@ void disk_destroy(struct disk *dp) { - g_cancel_event(dp); + disk_gone(dp); dp->d_destroyed = 1; + g_cancel_event(dp); if (dp->d_devstat != NULL) devstat_remove_entry(dp->d_devstat); g_post_event(g_disk_destroy, dp, M_WAITOK, NULL); @@ -919,6 +921,16 @@ disk_gone(struct disk *dp) struct g_provider *pp; mtx_pool_lock(mtxpool_sleep, dp); + + /* + * Second wither call makes no sense, plus we can not access the list + * of providers without topology lock after calling wither once. + */ + if (dp->d_goneflag != 0) { + mtx_pool_unlock(mtxpool_sleep, dp); + return; + } + dp->d_goneflag = 1; /* @@ -943,13 +955,11 @@ disk_gone(struct disk *dp) mtx_pool_unlock(mtxpool_sleep, dp); gp = dp->d_geom; - if (gp != NULL) { - pp = LIST_FIRST(&gp->provider); - if (pp != NULL) { - KASSERT(LIST_NEXT(pp, provider) == NULL, - ("geom %p has more than one provider", gp)); - g_wither_provider(pp, ENXIO); - } + pp = LIST_FIRST(&gp->provider); + if (pp != NULL) { + KASSERT(LIST_NEXT(pp, provider) == NULL, + ("geom %p has more than one provider", gp)); + g_wither_provider(pp, ENXIO); } } From owner-svn-src-stable-12@freebsd.org Thu Dec 19 02:04:41 2019 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AB2F21D024E; 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 47dZvF43jQz44NH; 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 8696E783D; 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 xBJ24fJN060731; Thu, 19 Dec 2019 02:04:41 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBJ24fMn060729; Thu, 19 Dec 2019 02:04:41 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201912190204.xBJ24fMn060729@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:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: 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-12 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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-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/12/usr.sbin/ntp/Makefile.inc stable/12/usr.sbin/ntp/scripts/mkver Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/usr.sbin/ntp/Makefile.inc stable/11/usr.sbin/ntp/scripts/mkver Directory Properties: stable/11/ (props changed) Modified: stable/12/usr.sbin/ntp/Makefile.inc ============================================================================== --- stable/12/usr.sbin/ntp/Makefile.inc Thu Dec 19 01:34:34 2019 (r355895) +++ stable/12/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/12/usr.sbin/ntp/scripts/mkver ============================================================================== --- stable/12/usr.sbin/ntp/scripts/mkver Thu Dec 19 01:34:34 2019 (r355895) +++ stable/12/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-12@freebsd.org Thu Dec 19 02:05:49 2019 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9E4B11D03D6; 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 47dZwY2c2Bz44dL; 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 5469B7847; 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 xBJ25nBV060866; Thu, 19 Dec 2019 02:05:49 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBJ25nWE060865; Thu, 19 Dec 2019 02:05:49 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201912190205.xBJ25nWE060865@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:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r355897 - in stable: 11/stand/liblua 12/stand/liblua X-SVN-Group: stable-12 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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-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/12/stand/liblua/luaconf.h Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/stand/liblua/luaconf.h Directory Properties: stable/11/ (props changed) Modified: stable/12/stand/liblua/luaconf.h ============================================================================== --- stable/12/stand/liblua/luaconf.h Thu Dec 19 02:04:40 2019 (r355896) +++ stable/12/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-12@freebsd.org Thu Dec 19 02:09:19 2019 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E5DDC1D0792; Thu, 19 Dec 2019 02:09:19 +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 47db0b6Yblz452p; Thu, 19 Dec 2019 02:09:19 +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 C0019785D; Thu, 19 Dec 2019 02:09:19 +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 xBJ29JIf061097; Thu, 19 Dec 2019 02:09:19 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBJ29IBa061091; Thu, 19 Dec 2019 02:09:18 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201912190209.xBJ29IBa061091@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:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: 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-12 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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Dec 2019 02:09:20 -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/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) Changes in other areas also in this revision: 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) Modified: stable/12/include/signal.h ============================================================================== --- stable/12/include/signal.h Thu Dec 19 02:05:48 2019 (r355897) +++ stable/12/include/signal.h Thu Dec 19 02:09:16 2019 (r355898) @@ -122,7 +122,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/12/lib/libc/gen/Makefile.inc ============================================================================== --- stable/12/lib/libc/gen/Makefile.inc Thu Dec 19 02:05:48 2019 (r355897) +++ stable/12/lib/libc/gen/Makefile.inc Thu Dec 19 02:09:16 2019 (r355898) @@ -494,10 +494,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/12/lib/libc/gen/Symbol.map ============================================================================== --- stable/12/lib/libc/gen/Symbol.map Thu Dec 19 02:05:48 2019 (r355897) +++ stable/12/lib/libc/gen/Symbol.map Thu Dec 19 02:09:16 2019 (r355898) @@ -422,6 +422,12 @@ FBSD_1.5 { timespec_get; }; +FBSD_1.6 { + sigandset; + sigisemptyset; + sigorset; +}; + FBSDprivate_1.0 { /* needed by thread libraries */ __thr_jtable; Modified: stable/12/lib/libc/gen/sigsetops.3 ============================================================================== --- stable/12/lib/libc/gen/sigsetops.3 Thu Dec 19 02:05:48 2019 (r355897) +++ stable/12/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/12/lib/libc/gen/sigsetops.c ============================================================================== --- stable/12/lib/libc/gen/sigsetops.c Thu Dec 19 02:05:48 2019 (r355897) +++ stable/12/lib/libc/gen/sigsetops.c Thu Dec 19 02:09:16 2019 (r355898) @@ -81,6 +81,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/12/lib/libc/tests/gen/Makefile ============================================================================== --- stable/12/lib/libc/tests/gen/Makefile Thu Dec 19 02:05:48 2019 (r355897) +++ stable/12/lib/libc/tests/gen/Makefile Thu Dec 19 02:09:16 2019 (r355898) @@ -17,6 +17,7 @@ ATF_TESTS_C+= makecontext_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/12/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/12/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-12@freebsd.org Thu Dec 19 02:14:50 2019 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5EE721D0D02; 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 47db6y1xwTz45Zw; 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 3DEA77A3C; 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 xBJ2EovU066554; Thu, 19 Dec 2019 02:14:50 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBJ2Eo3i066553; Thu, 19 Dec 2019 02:14:50 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201912190214.xBJ2Eo3i066553@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:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r355899 - in stable: 11/sys/sys 12/sys/sys X-SVN-Group: stable-12 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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-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/12/sys/sys/param.h Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/sys/param.h Directory Properties: stable/11/ (props changed) Modified: stable/12/sys/sys/param.h ============================================================================== --- stable/12/sys/sys/param.h Thu Dec 19 02:09:16 2019 (r355898) +++ stable/12/sys/sys/param.h Thu Dec 19 02:14:49 2019 (r355899) @@ -60,7 +60,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1201504 /* Master, propagated to newvers */ +#define __FreeBSD_version 1201505 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-stable-12@freebsd.org Thu Dec 19 02:19:05 2019 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7E3EB1D0F78; 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 47dbCs2pwJz45tJ; Thu, 19 Dec 2019 02:19:05 +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 5B9567A4D; Thu, 19 Dec 2019 02:19:05 +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 xBJ2J5n6066810; Thu, 19 Dec 2019 02:19:05 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBJ2J5Fr066809; Thu, 19 Dec 2019 02:19:05 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201912190219.xBJ2J5Fr066809@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:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r355900 - in stable: 11/include 12/include X-SVN-Group: stable-12 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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-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/12/include/unistd.h Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/include/unistd.h Directory Properties: stable/11/ (props changed) Modified: stable/12/include/unistd.h ============================================================================== --- stable/12/include/unistd.h Thu Dec 19 02:14:49 2019 (r355899) +++ stable/12/include/unistd.h Thu Dec 19 02:19:04 2019 (r355900) @@ -556,11 +556,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-12@freebsd.org Thu Dec 19 02:29:16 2019 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B642F1D15C6; Thu, 19 Dec 2019 02:29: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.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 47dbRc4KLKz46t0; Thu, 19 Dec 2019 02:29:16 +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 757EA7C37; Thu, 19 Dec 2019 02:29:16 +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 xBJ2TGCh072991; Thu, 19 Dec 2019 02:29:16 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBJ2TFoQ072988; Thu, 19 Dec 2019 02:29:15 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201912190229.xBJ2TFoQ072988@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:29:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r355902 - in stable/12/usr.bin/sed: . tests tests/regress.multitest.out X-SVN-Group: stable-12 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable/12/usr.bin/sed: . tests tests/regress.multitest.out X-SVN-Commit-Revision: 355902 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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Dec 2019 02:29:16 -0000 Author: kevans Date: Thu Dec 19 02:29:15 2019 New Revision: 355902 URL: https://svnweb.freebsd.org/changeset/base/355902 Log: MFC r339955, r355590: sed test fix + \r, \n, \t r339955: usr.bin/sed/tests: fix one of the regression test cases by adding its results file to the build. r355590: sed: process \r, \n, and \t This is both reasonable and a common GNUism that a lot of ported software expects. Universally process \r, \n, and \t into carriage return, newline, and tab respectively. Newline still doesn't function in contexts where it can't (e.g. BRE), but we process it anyways rather than passing UB \n (escaped ordinary) through to the underlying regex engine. Adding a --posix flag to disable these was considered, but sed.1 already declares this version of sed a super-set of POSIX specification and this behavior is the most likely expected when one attempts to use one of these escape sequences in pattern space. This differs from pre-r197362 behavior in that we now honor the three arguably most common escape sequences used with sed(1) and we do so outside of character classes, too. Other escape sequences, like \s and \S, will come later when GNU extensions are added to libregex; sed will likely link against libregex by default, since the GNU extensions tend to be fairly un-intrusive. Modified: stable/12/usr.bin/sed/compile.c stable/12/usr.bin/sed/tests/regress.multitest.out/8.22 stable/12/usr.bin/sed/tests/regress.multitest.out/Makefile stable/12/usr.bin/sed/tests/sed2_test.sh Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.bin/sed/compile.c ============================================================================== --- stable/12/usr.bin/sed/compile.c Thu Dec 19 02:24:25 2019 (r355901) +++ stable/12/usr.bin/sed/compile.c Thu Dec 19 02:29:15 2019 (r355902) @@ -395,10 +395,21 @@ compile_delimited(char *p, char *d, int is_tr) continue; } else if (*p == '\\' && p[1] == '[') { *d++ = *p++; - } else if (*p == '\\' && p[1] == c) + } else if (*p == '\\' && p[1] == c) { p++; - else if (*p == '\\' && p[1] == 'n') { - *d++ = '\n'; + } else if (*p == '\\' && + (p[1] == 'n' || p[1] == 'r' || p[1] == 't')) { + switch (p[1]) { + case 'n': + *d++ = '\n'; + break; + case 'r': + *d++ = '\r'; + break; + case 't': + *d++ = '\t'; + break; + } p += 2; continue; } else if (*p == '\\' && p[1] == '\\') { @@ -428,13 +439,29 @@ compile_ccl(char **sp, char *t) *t++ = *s++; if (*s == ']') *t++ = *s++; - for (; *s && (*t = *s) != ']'; s++, t++) + for (; *s && (*t = *s) != ']'; s++, t++) { if (*s == '[' && ((d = *(s+1)) == '.' || d == ':' || d == '=')) { *++t = *++s, t++, s++; for (c = *s; (*t = *s) != ']' || c != d; s++, t++) if ((c = *s) == '\0') return NULL; + } else if (*s == '\\') { + switch (s[1]) { + case 'n': + *t = '\n'; + s++; + break; + case 'r': + *t = '\r'; + s++; + break; + case 't': + *t = '\t'; + s++; + break; + } } + } return (*s == ']') ? *sp = ++s, ++t : NULL; } @@ -521,8 +548,23 @@ compile_subst(char *p, struct s_subst *s) linenum, fname, *p); if (s->maxbref < ref) s->maxbref = ref; - } else if (*p == '&' || *p == '\\') - *sp++ = '\\'; + } else { + switch (*p) { + case '&': + case '\\': + *sp++ = '\\'; + break; + case 'n': + *p = '\n'; + break; + case 'r': + *p = '\r'; + break; + case 't': + *p = '\t'; + break; + } + } } else if (*p == c) { if (*++p == '\0' && more) { if (cu_fgets(lbuf, sizeof(lbuf), &more)) Modified: stable/12/usr.bin/sed/tests/regress.multitest.out/8.22 ============================================================================== --- stable/12/usr.bin/sed/tests/regress.multitest.out/8.22 Thu Dec 19 02:24:25 2019 (r355901) +++ stable/12/usr.bin/sed/tests/regress.multitest.out/8.22 Thu Dec 19 02:29:15 2019 (r355902) @@ -1,2 +1 @@ -1 -2 +1X2 Modified: stable/12/usr.bin/sed/tests/regress.multitest.out/Makefile ============================================================================== --- stable/12/usr.bin/sed/tests/regress.multitest.out/Makefile Thu Dec 19 02:24:25 2019 (r355901) +++ stable/12/usr.bin/sed/tests/regress.multitest.out/Makefile Thu Dec 19 02:29:15 2019 (r355902) @@ -38,6 +38,7 @@ ${PACKAGE}FILES+= 2.2 ${PACKAGE}FILES+= 2.20 ${PACKAGE}FILES+= 2.21 ${PACKAGE}FILES+= 2.22 +${PACKAGE}FILES+= 2.23 ${PACKAGE}FILES+= 2.3 ${PACKAGE}FILES+= 2.4 ${PACKAGE}FILES+= 2.5 Modified: stable/12/usr.bin/sed/tests/sed2_test.sh ============================================================================== --- stable/12/usr.bin/sed/tests/sed2_test.sh Thu Dec 19 02:24:25 2019 (r355901) +++ stable/12/usr.bin/sed/tests/sed2_test.sh Thu Dec 19 02:29:15 2019 (r355902) @@ -69,9 +69,29 @@ inplace_command_q_body() atf_check -s not-exit:0 stat -q '.!'* } +atf_test_case escape_subst +escape_subst_head() +{ + atf_set "descr" "Verify functional escaping of \\n, \\r, and \\t" +} +escape_subst_body() +{ + printf "a\nt\\\t\n\tb\n\t\tc\r\n" > a + tr -d '\r' < a > b + printf "a\tb c\rx\n" > c + + atf_check -o 'inline:a\nt\\t\n' sed '/\t/d' a + atf_check -o 'inline:a\nt\\t\n b\n c\r\n' sed 's/\t/ /g' a + atf_check -o 'inline:a\nt\\t\n\t\tb\n\t\t\t\tc\r\n' sed 's/\t/\t\t/g' a + atf_check -o 'inline:a\nt\n\tb\n\t\tc\r\n' sed 's/\\t//g' a + atf_check -o file:b sed 's/\r//' a + atf_check -o 'inline:abcx\n' sed 's/[ \r\t]//g' c +} + atf_init_test_cases() { atf_add_test_case inplace_command_q atf_add_test_case inplace_hardlink_src atf_add_test_case inplace_symlink_src + atf_add_test_case escape_subst } From owner-svn-src-stable-12@freebsd.org Thu Dec 19 02:32:37 2019 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D60E51D1804; Thu, 19 Dec 2019 02:32:37 +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 47dbWT5HvBz47Dw; Thu, 19 Dec 2019 02:32:37 +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 96C027DF3; Thu, 19 Dec 2019 02:32:37 +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 xBJ2Wbm4078607; Thu, 19 Dec 2019 02:32:37 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBJ2WbQm078606; Thu, 19 Dec 2019 02:32:37 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201912190232.xBJ2WbQm078606@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:32:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r355903 - stable/12 X-SVN-Group: stable-12 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/12 X-SVN-Commit-Revision: 355903 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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Dec 2019 02:32:37 -0000 Author: kevans Date: Thu Dec 19 02:32:37 2019 New Revision: 355903 URL: https://svnweb.freebsd.org/changeset/base/355903 Log: Record-only MFC of r354578 This reverted part of r354577, which has already been MFC'd along with the follow-up that ultimately re-added the part reverted here. Modified: Directory Properties: stable/12/ (props changed) From owner-svn-src-stable-12@freebsd.org Thu Dec 19 04:49:37 2019 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9D3B11D4B4C; Thu, 19 Dec 2019 04:49:37 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 47dfYY4QS6z4FgK; Thu, 19 Dec 2019 04:49:37 +0000 (UTC) (envelope-from sjg@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 8E5EB9668; Thu, 19 Dec 2019 04:49:37 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xBJ4nb7K056550; Thu, 19 Dec 2019 04:49:37 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBJ4nYbF056536; Thu, 19 Dec 2019 04:49:34 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <201912190449.xBJ4nYbF056536@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Thu, 19 Dec 2019 04:49:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r355905 - in stable/12: lib/libbsnmp/libbsnmp lib/libgcc_eh lib/libmagic lib/libpmc share/mk targets X-SVN-Group: stable-12 X-SVN-Commit-Author: sjg X-SVN-Commit-Paths: in stable/12: lib/libbsnmp/libbsnmp lib/libgcc_eh lib/libmagic lib/libpmc share/mk targets X-SVN-Commit-Revision: 355905 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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Dec 2019 04:49:37 -0000 Author: sjg Date: Thu Dec 19 04:49:34 2019 New Revision: 355905 URL: https://svnweb.freebsd.org/changeset/base/355905 Log: Update dirdeps.mk and gendirdeps.mk The env space consumed by exporting all libc's .meta files left little room for command line, so unexport when done. Update dirdeps.mk to latest and add dirdeps-targets.mk to simplify/update targets/Makefile Makefile changes to go with Makefile.depend changes in D22494 MFC of r355618 Reviewed by: bdrewery Sponsored by: Juniper Networks Differential Revision: https://reviews.freebsd.org/D22495 Added: stable/12/share/mk/dirdeps-targets.mk - copied unchanged from r355618, head/share/mk/dirdeps-targets.mk stable/12/share/mk/local.dirdeps-options.mk - copied unchanged from r355618, head/share/mk/local.dirdeps-options.mk Modified: stable/12/lib/libbsnmp/libbsnmp/Makefile stable/12/lib/libgcc_eh/Makefile stable/12/lib/libmagic/Makefile stable/12/lib/libpmc/Makefile stable/12/share/mk/dirdeps.mk stable/12/share/mk/gendirdeps.mk stable/12/share/mk/local.dirdeps.mk stable/12/share/mk/local.gendirdeps.mk stable/12/share/mk/local.meta.sys.mk stable/12/share/mk/meta.sys.mk stable/12/targets/Makefile stable/12/targets/Makefile.inc Modified: stable/12/lib/libbsnmp/libbsnmp/Makefile ============================================================================== --- stable/12/lib/libbsnmp/libbsnmp/Makefile Thu Dec 19 02:40:04 2019 (r355904) +++ stable/12/lib/libbsnmp/libbsnmp/Makefile Thu Dec 19 04:49:34 2019 (r355905) @@ -24,12 +24,17 @@ SRCS+= snmptc.h INCS= asn1.h snmp.h snmpagent.h snmpclient.h MAN= asn1.3 bsnmpagent.3 bsnmpclient.3 bsnmplib.3 +.if ${MK_DIRDEPS_BUILD} == "yes" +GENSNMPTREE?= ${HOST_OBJTOP}/usr.sbin/bsnmpd/gensnmptree/gensnmptree +.endif +GENSNMPTREE?= gensnmptree + snmptc.h : tc.def (\ echo "/* autogenerated from tc.def */";\ echo "#ifndef snmptc_h_1529923773";\ echo "#define snmptc_h_1529923773";\ - gensnmptree -E -f <${.ALLSRC};\ + ${GENSNMPTREE} -E -f <${.ALLSRC};\ echo "#endif" ; \ ) >${.TARGET} Modified: stable/12/lib/libgcc_eh/Makefile ============================================================================== --- stable/12/lib/libgcc_eh/Makefile Thu Dec 19 02:40:04 2019 (r355904) +++ stable/12/lib/libgcc_eh/Makefile Thu Dec 19 04:49:34 2019 (r355905) @@ -10,4 +10,10 @@ WARNS?= 2 .include "Makefile.inc" +.if ${.MAKE.LEVEL} > 0 +# avoid circular dependencies +GENDIRDEPS_FILTER+= Nlib/msun +CFLAGS+= -I${SRCTOP}/lib/msun/src +.endif + .include Modified: stable/12/lib/libmagic/Makefile ============================================================================== --- stable/12/lib/libmagic/Makefile Thu Dec 19 02:40:04 2019 (r355904) +++ stable/12/lib/libmagic/Makefile Thu Dec 19 04:49:34 2019 (r355905) @@ -37,14 +37,22 @@ MAGFILES= ${CONTRDIR}/magic/Header \ magic: ${MAGFILES} cat ${.ALLSRC:O} > ${.TARGET} -magic.mgc: mkmagic magic +magic.mgc: magic ${BTOOLSPATH:U.}/mkmagic magic +.if ${MACHINE} == "host" || ${MK_DIRDEPS_BUILD} == "no" CLEANFILES+= mkmagic build-tools: mkmagic mkmagic: apprentice.c cdf_time.c encoding.c funcs.c magic.c print.c ${INCS} ${BUILD_TOOLS_META} ${CC:N${CCACHE_BIN}} ${CFLAGS} -DCOMPILE_ONLY ${LDFLAGS} -o ${.TARGET} ${.ALLSRC:N*.h} \ ${LDADD} + +.endif +.if ${MK_DIRDEPS_BUILD} == "yes" +BTOOLSPATH= ${HOST_OBJTOP}/${RELDIR} +.else +magic.mgc: mkmagic +.endif FILEVER!= awk '$$1 == "\#define" && $$2 == "VERSION" { print $$3; exit }' \ ${.CURDIR}/config.h Modified: stable/12/lib/libpmc/Makefile ============================================================================== --- stable/12/lib/libpmc/Makefile Thu Dec 19 02:40:04 2019 (r355904) +++ stable/12/lib/libpmc/Makefile Thu Dec 19 04:49:34 2019 (r355905) @@ -19,11 +19,19 @@ EVENT_ARCH="x86" EVENT_ARCH="powerpc" .endif +.if ${MK_DIRDEPS_BUILD} == "yes" +# avoid circular dependency +CFLAGS+= -I${SRCTOP}/${RELDIR:H}/libpmcstat +GENDIRDEPS_FILTER+= N${RELDIR:H}/libpmcstat +JEVENTS?= ${HOST_OBJTOP}/${RELDIR}/pmu-events/jevents +.else JEVENTS= ${BTOOLSPATH:U.}/pmu-events/jevents + # This file is built in a subdirectory so never try to rebuild it here. ${JEVENTS}: .PHONY .if make(*clean*) SUBDIR+= pmu-events +.endif .endif libpmc_events.c: ${JEVENTS} Copied: stable/12/share/mk/dirdeps-targets.mk (from r355618, head/share/mk/dirdeps-targets.mk) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/share/mk/dirdeps-targets.mk Thu Dec 19 04:49:34 2019 (r355905, copy of r355618, head/share/mk/dirdeps-targets.mk) @@ -0,0 +1,134 @@ +# $FreeBSD$ +# RCSid: +# $Id: dirdeps-targets.mk,v 1.9 2019/10/06 20:07:50 sjg Exp $ +# +# @(#) Copyright (c) 2019 Simon J. Gerraty +# +# This file is provided in the hope that it will +# be of use. There is absolutely NO WARRANTY. +# Permission to copy, redistribute or otherwise +# use this file is hereby granted provided that +# the above copyright notice and this notice are +# left intact. +# +# Please send copies of changes and bug-fixes to: +# sjg@crufty.net +# + +## +# This makefile is used to set initial DIRDEPS for top-level build +# targets. +# +# The basic idea is that we have a list of directories in +# DIRDEPS_TARGETS_DIRS which are relative to SRCTOP. +# When asked to make 'foo' we look for any directory named 'foo' +# under DIRDEPS_TARGETS_DIRS. +# We then search those dirs for any Makefile.depend* +# Finally we select any that match conditions like REQUESTED_MACHINE +# or TARGET_SPEC and initialize DIRDEPS accordingly. +# + +.if ${.MAKE.LEVEL} == 0 +# pickup customizations +.-include + +# for DIRDEPS_BUILD this is how we prime the pump +DIRDEPS_TARGETS_DIRS ?= targets targets/pseudo +# these prefixes can modify how we behave +# they need to be stripped when looking for target dirs +DIRDEPS_TARGETS_PREFIX_LIST ?= pkg- build- + +# matching target dirs if any +tdirs := ${.TARGETS:Nall:${DIRDEPS_TARGETS_PREFIX_LIST:@p@S,^$p,,@:ts:}:@t@${DIRDEPS_TARGETS_DIRS:@d@$d/$t@}@:@d@${exists(${SRCTOP}/$d):?$d:}@} + +.if !empty(DEBUG_DIRDEPS_TARGETS) +.info tdirs=${tdirs} +.endif + +.if !empty(tdirs) +# some things we know we want to ignore +DIRDEPS_TARGETS_SKIP_LIST += \ + *~ \ + *.bak \ + *.inc \ + *.old \ + *.options \ + *.orig \ + *.rej \ + +# the list of MACHINEs we consider +DIRDEPS_TARGETS_MACHINE_LIST += \ + ${ALL_MACHINE_LIST:U} \ + ${PSEUDO_MACHINE_LIST:Ucommon host host32} \ + ${TARGET_MACHINE_LIST} + +DIRDEPS_TARGETS_MACHINE_LIST := ${DIRDEPS_TARGETS_MACHINE_LIST:O:u} + +# raw Makefile.depend* list +tdeps != 'cd' ${SRCTOP} && 'ls' -1 ${tdirs:O:u:@d@$d/${.MAKE.DEPENDFILE_PREFIX}*@} 2> /dev/null; echo +.if ${DEBUG_DIRDEPS_TARGETS:U:Mdep*} != "" +.info tdeps=${tdeps} +.endif +# remove things we know we don't want +tdeps := ${tdeps:${DIRDEPS_TARGETS_SKIP_LIST:${M_ListToSkip}}} +.if ${DEBUG_DIRDEPS_TARGETS:U:Mdep*} != "" +.info tdeps=${tdeps} +.endif + +# plain entries (no qualifiers) these apply to any TARGET_SPEC +ptdeps := ${tdeps:M*${.MAKE.DEPENDFILE_PREFIX}:S,/${.MAKE.DEPENDFILE_PREFIX},,} + +# MACHINE qualified entries +mqtdeps := ${DIRDEPS_TARGETS_MACHINE_LIST:@m@${tdeps:M*.$m}@:S,/${.MAKE.DEPENDFILE_PREFIX},,} + +tqtdeps = +.if ${TARGET_SPEC_VARS:[#]} > 1 +# TARGET_SPEC qualified entries +.if !empty(TARGET_SPEC_LIST) +# we have a list of valid TARGET_SPECS; use it +tqtdeps := ${TARGET_SPEC_LIST:U:O:u:@t@${tdeps:M*.$t}@:S,/${.MAKE.DEPENDFILE_PREFIX},,} +.else +# do we have a list of valid tuple members for at least +# the last tupple element? if so match on that +TARGET_SPEC_LAST_LIST ?= ${${TARGET_SPEC_VARS:[-1]}_LIST} +.if !empty(TARGET_SPEC_LAST_LIST) +tqtdeps := ${TARGET_SPEC_LAST_LIST:U:O:u:@t@${tdeps:M*,$t}@:S,/${.MAKE.DEPENDFILE_PREFIX},,} +.else +# this is sub-optimal match MACHINE, +tqtdeps := ${DIRDEPS_TARGETS_MACHINE_LIST:@m@${tdeps:M*.$m,*}@:S,/${.MAKE.DEPENDFILE_PREFIX},,} +.endif +.endif +.endif + +# now work out what we want in DIRDEPS +.if empty(REQUESTED_MACHINE) +# we want them all just as found +DIRDEPS = ${ptdeps} ${mqtdeps} ${tqtdeps} +.else +# we only want those that match REQUESTED_MACHINE/REQUESTED_TARGET_SPEC +# or REQUESTED_TARGET_SPEC (TARGET_SPEC) +DIRDEPS = \ + ${ptdeps:@d@$d.${REQUESTED_TARGET_SPEC:U${TARGET_SPEC:U${REQUESTED_MACHINE}}}@} \ + ${mqtdeps:M*.${REQUESTED_MACHINE}} \ + ${tqtdeps:M*.${REQUESTED_TARGET_SPEC:U${TARGET_SPEC}}} +.endif +# clean up +DIRDEPS := ${DIRDEPS:O:u} + +.if !empty(DEBUG_DIRDEPS_TARGETS) +.for x in tdeps ptdeps mqtdeps tqtdeps DIRDEPS +.info $x=${$x} +.endfor +.endif +.endif +# if we got DIRDEPS get to work +.if !empty(DIRDEPS) +.include + +DIRDEPS_TARGETS_SKIP += all clean* destroy* + +.for t in ${.TARGETS:${DIRDEPS_TARGETS_SKIP:${M_ListToSkip}}} +$t: dirdeps +.endfor +.endif +.endif Modified: stable/12/share/mk/dirdeps.mk ============================================================================== --- stable/12/share/mk/dirdeps.mk Thu Dec 19 02:40:04 2019 (r355904) +++ stable/12/share/mk/dirdeps.mk Thu Dec 19 04:49:34 2019 (r355905) @@ -1,5 +1,5 @@ # $FreeBSD$ -# $Id: dirdeps.mk,v 1.96 2018/06/20 22:26:39 sjg Exp $ +# $Id: dirdeps.mk,v 1.100 2019/11/12 06:47:58 sjg Exp $ # Copyright (c) 2010-2013, Juniper Networks, Inc. # All rights reserved. @@ -379,7 +379,8 @@ DIRDEPS_FILTER += M${_DEP_RELDIR} .endif # this is what we run below -DIRDEP_MAKE?= ${.MAKE} +DIRDEP_MAKE ?= ${.MAKE} +DIRDEP_DIR ?= ${.TARGET:R} # we suppress SUBDIR when visiting the leaves # we assume sys.mk will set MACHINE_ARCH @@ -389,10 +390,11 @@ _DIRDEP_USE: .USE .MAKE @for m in ${.MAKE.MAKEFILE_PREFERENCE}; do \ test -s ${.TARGET:R}/$$m || continue; \ echo "${TRACER}Checking ${.TARGET:R} for ${.TARGET:E} ..."; \ + ${DIRDEP_USE_PRELUDE} \ MACHINE_ARCH= NO_SUBDIR=1 ${DIRDEP_USE_ENV} \ TARGET_SPEC=${.TARGET:E} \ MACHINE=${.TARGET:E} \ - ${DIRDEP_MAKE} -C ${.TARGET:R} || exit 1; \ + ${DIRDEP_MAKE} -C ${DIRDEP_DIR} || exit 1; \ break; \ done @@ -476,7 +478,7 @@ BUILD_DIRDEPS_TARGETS ?= ${.TARGETS} ${DIRDEPS_CACHE}: .META .NOMETA_CMP +@{ echo '# Autogenerated - do NOT edit!'; echo; \ echo 'BUILD_DIRDEPS=no'; echo; \ - echo '.include '; \ + echo '.include '; echo; \ } > ${.TARGET}.new +@MAKELEVEL=${.MAKE.LEVEL} DIRDEPS_CACHE=${DIRDEPS_CACHE} \ DIRDEPS="${DIRDEPS}" \ @@ -640,9 +642,15 @@ _build_all_dirs := ${_build_all_dirs:O:u} .if ${.MAKEFLAGS:M-V${_V_READ_DIRDEPS}} == "" .if !empty(_build_all_dirs) .if ${BUILD_DIRDEPS_CACHE} == "yes" -x!= { echo; echo '\# ${DEP_RELDIR}.${DEP_TARGET_SPEC}'; \ - echo 'dirdeps: ${_build_all_dirs:${M_oneperline}}'; echo; } >&3; echo -x!= { ${_build_all_dirs:@x@${target($x):?:echo '$x: _DIRDEP_USE';}@} echo; } >&3; echo +# guard against _build_all_dirs being too big for a single command line +# first get list of dirs that need _DIRDEP_USE +# then export that and _build_all_dirs +_new_dirdeps := ${_build_all_dirs:@x@${target($x):?:$x}@} +.export _new_dirdeps _build_all_dirs +x!= echo; { echo '\# ${DEP_RELDIR}.${DEP_TARGET_SPEC}'; \ + echo "dirdeps: \\"; \ + for x in $$_build_all_dirs; do echo " $$x \\"; done; echo; \ + for x in $$_new_dirdeps; do echo "$$x: _DIRDEP_USE"; done; echo; } >&3 .if !empty(DEP_EXPORT_VARS) # Discouraged, but there are always exceptions. # Handle it here rather than explain how. @@ -672,7 +680,10 @@ DEP_EXPORT_VARS= .info ${DEP_RELDIR}.$m: graph: ${_build_dirs:M*.$q} .endif .if ${BUILD_DIRDEPS_CACHE} == "yes" -x!= { echo; echo '${_this_dir}.$m: ${_build_dirs:M*.$q:${M_oneperline}}'; echo; } >&3; echo +_cache_deps := ${_build_dirs:M*.$q} +.export _cache_deps +x!= echo; { echo "${_this_dir}.$m: \\"; \ + for x in $$_cache_deps; do echo " $$x \\"; done; echo; } >&3 .else ${_this_dir}.$m: ${_build_dirs:M*.$q} .endif @@ -682,7 +693,10 @@ ${_this_dir}.$m: ${_build_dirs:M*.$q} .info ${DEP_RELDIR}.$m: graph: ${_build_dirs:M*.$m:N${_this_dir}.$m} .endif .if ${BUILD_DIRDEPS_CACHE} == "yes" -x!= { echo; echo '${_this_dir}.$m: ${_build_dirs:M*.$m:N${_this_dir}.$m:${M_oneperline}}'; echo; } >&3; echo +_cache_deps := ${_build_dirs:M*.$m:N${_this_dir}.$m} +.export _cache_deps +x!= echo; { echo "${_this_dir}.$m: \\"; \ + for x in $$_cache_deps; do echo " $$x \\"; done; echo; } >&3 .else ${_this_dir}.$m: ${_build_dirs:M*.$m:N${_this_dir}.$m} .endif Modified: stable/12/share/mk/gendirdeps.mk ============================================================================== --- stable/12/share/mk/gendirdeps.mk Thu Dec 19 02:40:04 2019 (r355904) +++ stable/12/share/mk/gendirdeps.mk Thu Dec 19 04:49:34 2019 (r355905) @@ -1,5 +1,5 @@ # $FreeBSD$ -# $Id: gendirdeps.mk,v 1.39 2018/06/08 01:25:31 sjg Exp $ +# $Id: gendirdeps.mk,v 1.41 2019/11/21 23:50:40 sjg Exp $ # Copyright (c) 2010-2013, Juniper Networks, Inc. # All rights reserved. @@ -80,7 +80,6 @@ _DIRDEPS := ${DIRDEPS:U:O:u} .endif META_FILES := ${META_FILES:T:O:u} -.export META_FILES # pickup customizations .-include @@ -184,6 +183,11 @@ x != cd ${_OBJDIR} && find . -name '*.meta' -print -o .elif ${_meta_files:[#]} > 500 .export _meta_files x != echo; for m in $$_meta_files; do echo $$m; done > meta.list +# _meta_files is consuming a lot of env space +# that can impact command line length, +# and we do not need it any more +.undef _meta_files +.unexport _meta_files .else _meta_files_arg:= ${_meta_files} .endif @@ -374,3 +378,6 @@ all ${_DEPENDFILE}: .endif ${_DEPENDFILE}: .PRECIOUS + +# don't waste time looking for ways to make .meta files +.SUFFIXES: Copied: stable/12/share/mk/local.dirdeps-options.mk (from r355618, head/share/mk/local.dirdeps-options.mk) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/share/mk/local.dirdeps-options.mk Thu Dec 19 04:49:34 2019 (r355905, copy of r355618, head/share/mk/local.dirdeps-options.mk) @@ -0,0 +1,29 @@ +# $FreeBSD$ + +# avoid duplication +DIRDEPS.AUDIT.yes= lib/libbsm +DIRDEPS.BLACKLIST_SUPPORT.yes+= lib/libblacklist +DIRDEPS.BSD_CRTBEGIN.no+= gnu/lib/csu +DIRDEPS.CASPER.yes+= lib/libcasper/libcasper +DIRDEPS.GSSAPI.yes+= lib/libgssapi +DIRDEPS.JAIL.yes+= lib/libjail +DIRDEPS.KERBEROS_SUPPORT.yes+= \ + kerberos5/lib/libasn1 \ + kerberos5/lib/libheimbase \ + kerberos5/lib/libheimipcc \ + kerberos5/lib/libhx509 \ + kerberos5/lib/libkrb5 \ + kerberos5/lib/libroken \ + kerberos5/lib/libwind \ + +DIRDEPS.NIS.yes+= \ + include/rpc \ + include/rpcsvc \ + lib/librpcsvc + +DIRDEPS.OPENSSL.yes+= secure/lib/libcrypto +DIRDEPS.OPENSSL.no+= lib/libmd +DIRDEPS.PAM_SUPPORT.yes+= lib/libpam/libpam +DIRDEPS.TCP_WRAPPERS.yes+= lib/libwrap + + Modified: stable/12/share/mk/local.dirdeps.mk ============================================================================== --- stable/12/share/mk/local.dirdeps.mk Thu Dec 19 02:40:04 2019 (r355904) +++ stable/12/share/mk/local.dirdeps.mk Thu Dec 19 04:49:34 2019 (r355905) @@ -148,7 +148,6 @@ _SRCS= ${SRCS} ${_PROGS_SRCS} # Has C files. The C_DIRDEPS are shared with C++ files as well. C_DIRDEPS= \ - gnu/lib/csu \ include \ include/arpa \ include/protocols \ @@ -220,6 +219,11 @@ DIRDEPS+= ${_lib${_lib}reldir} .if ${DEP_RELDIR} != "targets/pseudo/stage" DIRDEPS += targets/pseudo/stage .endif +.endif + +# this one is too pervasive +.if ${MK_BSD_CRTBEGIN} == "no" && ${DEP_RELDIR:N.:Ngnu/lib/csu:Ninclude*:Ntargets/*} != "" +DIRDEPS+= gnu/lib/csu .endif DEP_MACHINE_ARCH = ${MACHINE_ARCH.${DEP_MACHINE}} Modified: stable/12/share/mk/local.gendirdeps.mk ============================================================================== --- stable/12/share/mk/local.gendirdeps.mk Thu Dec 19 02:40:04 2019 (r355904) +++ stable/12/share/mk/local.gendirdeps.mk Thu Dec 19 04:49:34 2019 (r355905) @@ -10,6 +10,7 @@ GENDIRDEPS_FILTER+= \ Ngnu/lib/libssp/libssp_nonshared \ Ncddl/usr.bin/ctf* \ Nlib/libc_nonshared \ + Ngnu/lib/csu \ Ngnu/lib/libgcc \ Nlib/libgcc_eh \ Nlib/libgcc_s \ Modified: stable/12/share/mk/local.meta.sys.mk ============================================================================== --- stable/12/share/mk/local.meta.sys.mk Thu Dec 19 02:40:04 2019 (r355904) +++ stable/12/share/mk/local.meta.sys.mk Thu Dec 19 04:49:34 2019 (r355905) @@ -96,7 +96,7 @@ TARGET_MACHINE= host OBJTOP := ${HOST_OBJTOP} .endif -.if ${.MAKE.LEVEL} == 0 +.if ${.MAKE.LEVEL} == 0 || empty(PYTHON) PYTHON ?= /usr/local/bin/python .export PYTHON # this works best if share/mk is ready for it. @@ -133,7 +133,9 @@ STAGE_TARGET_OBJTOP:= ${STAGE_ROOT}/${TARGET_OBJ_SPEC} STAGE_HOST_OBJTOP:= ${STAGE_ROOT}/${HOST_TARGET} # These are exported for hooking in out-of-tree builds. They will always # be overridden in sub-makes above when building in-tree. +.if ${.MAKE.LEVEL} > 0 .export STAGE_OBJTOP STAGE_TARGET_OBJTOP STAGE_HOST_OBJTOP +.endif # Use tools/install.sh which can avoid the need for xinstall for simple cases. INSTALL?= sh ${SRCTOP}/tools/install.sh Modified: stable/12/share/mk/meta.sys.mk ============================================================================== --- stable/12/share/mk/meta.sys.mk Thu Dec 19 02:40:04 2019 (r355904) +++ stable/12/share/mk/meta.sys.mk Thu Dec 19 04:49:34 2019 (r355905) @@ -1,5 +1,5 @@ # $FreeBSD$ -# $Id: meta.sys.mk,v 1.32 2017/06/11 03:24:04 sjg Exp $ +# $Id: meta.sys.mk,v 1.34 2019/01/24 19:36:25 sjg Exp $ # # @(#) Copyright (c) 2010, Simon J. Gerraty @@ -62,13 +62,15 @@ META_MODE += silent=yes MACHINE = host .endif -.if ${.MAKE.LEVEL} == 0 +.if !defined(MACHINE0) # it can be handy to know which MACHINE kicked off the build # for example, if using Makefild.depend for multiple machines, # allowing only MACHINE0 to update can keep things simple. MACHINE0 := ${MACHINE} .export MACHINE0 +.endif +.if !defined(META2DEPS) .if defined(PYTHON) && exists(${PYTHON}) # we prefer the python version of this - it is much faster META2DEPS ?= ${.PARSEDIR}/meta2deps.py Modified: stable/12/targets/Makefile ============================================================================== --- stable/12/targets/Makefile Thu Dec 19 02:40:04 2019 (r355904) +++ stable/12/targets/Makefile Thu Dec 19 04:49:34 2019 (r355905) @@ -38,75 +38,7 @@ DIRDEPS_FILTER = Mtargets/* .endif -# in theory, this is what we want -target_dirs = targets targets/pseudo -# these tweak how we do it -target_prefix = pkg- build- -DIRDEPS := ${.TARGETS:Nall:${target_prefix:@p@S,^$p,,@:ts:}:@t@${target_dirs:@d@$d/$t@}@:@d@${exists(${SRCTOP}/$d):?$d:}@} -all_machine_list = ${ALL_MACHINE_LIST} host common - -.if ${DIRDEPS:Mtargets/pseudo/*} != "" -# all bets are off -PKG_MACHINE_LIST = ${all_machine_list} -.endif - -.if make(check-commit) -# a special case -DIRDEPS = targets/pseudo/check-commit -.if defined(ALL_MACHINES) -CHECK_MACHINE_LIST = all -.undef ALL_MACHINES -.endif -SHIPDIR = no - -.else - -.if defined(ALL_MACHINES) -DIRDEPS := ${DIRDEPS:O:u:@d@${all_machine_list:O:u:@m@${exists(${SRCTOP}/$d/${.MAKE.DEPENDFILE_PREFIX:T}.$m):?$d.$m:}@}@} -.undef ALL_MACHINES -PKG_MACHINE_LIST ?= ${DIRDEPS:E:O:u} -.elif empty(REQUESTED_MACHINE) -# the above may be insufficient. -# some packages only support one machine which may not be ${MACHINE} -# some support multiple, in which case unless ALL_MACHINES is defined -# we only want ${MACHINE} -plain := ${DIRDEPS:@d@${exists(${SRCTOP}/$d/${.MAKE.DEPENDFILE_PREFIX:T}):?$d:}@} -.if ${plain} != ${DIRDEPS} -qual := ${DIRDEPS:${plain:${M_ListToSkip}}:@d@${all_machine_list:O:u:@m@${exists(${SRCTOP}/$d/${.MAKE.DEPENDFILE_PREFIX:T}.$m):?$d.$m:}@}@} -DIRDEPS := ${plain} ${qual} -PKG_MACHINE_LIST ?= ${MACHINE} ${qual:E:O:u} -.endif -.else -# check that a .MAKE.DEPENDFILE exists -DIRDEPS := ${.MAKE.DEPENDFILE_PREFERENCE:T:@m@${DIRDEPS:@d@${exists(${SRCTOP}/$d/$m):?$d:}@}@:O:u} -.endif -.if !empty(PKG_MACHINE_LIST) -.if ${PKG_MACHINE_LIST:Mdepend} != "" -PKG_MACHINE_LIST = ${ALL_MACHINE_LIST} -.endif -PKG_MACHINE_LIST := ${PKG_MACHINE_LIST} -.endif -.endif - -# we don't use DIRDEPS_FILTER, since we only want it to -# apply to this initial list -.if !empty(REQUESTED_MACHINE) && !empty(DIRDEPS) -# this is a variant of the logic above, we want plain -# but need to filter the qualified DIRDEPS to REQUESTED_MACHINE -plain := ${DIRDEPS:@d@${exists(${SRCTOP}/$d/${.MAKE.DEPENDFILE_PREFIX:T}):?$d:}@} -.if !empty(plain) && ${plain} != ${DIRDEPS} -qual := ${DIRDEPS:${plain:${M_ListToSkip}}:M*.${REQUESTED_MACHINE}} -.if empty(qual) -qual := ${DIRDEPS:@d@${exists(${SRCTOP}/$d/${.MAKE.DEPENDFILE:T}):?$d.${.MAKE.DEPENDFILE:E}:}@} -.endif -DIRDEPS := ${plain} ${qual} -.endif -.if empty(DIRDEPS) -.error ${REQUESTED_MACHINE} is not appropriate for ${.TARGETS} -.endif -.endif - .if !empty(build_options) build_options := ${build_options:O:u} .for v in ${build_options} @@ -114,6 +46,9 @@ $v = yes .endfor .export ${build_options} .endif + +# this does the work +.include .if !empty(DIRDEPS) # This is printed as we read the makefile Modified: stable/12/targets/Makefile.inc ============================================================================== --- stable/12/targets/Makefile.inc Thu Dec 19 02:40:04 2019 (r355904) +++ stable/12/targets/Makefile.inc Thu Dec 19 04:49:34 2019 (r355905) @@ -20,11 +20,12 @@ PKG_METHOD = no .endif .endif +.MAIN: all + # The makefile in subdirs should set this to something useful # the default should do nothing. PKG_METHOD ?= none - -.MAIN: all +none: .if ${build-*:${M_L_TARGETS}} != "" # just build the bits, skip packaging From owner-svn-src-stable-12@freebsd.org Thu Dec 19 04:58:30 2019 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E8AF71D5088; Thu, 19 Dec 2019 04:58:30 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 47dflp6d3Hz4GGX; Thu, 19 Dec 2019 04:58:30 +0000 (UTC) (envelope-from sjg@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 D9CB4982A; Thu, 19 Dec 2019 04:58:30 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xBJ4wUHA062293; Thu, 19 Dec 2019 04:58:30 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBJ4wBOB062199; Thu, 19 Dec 2019 04:58:11 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <201912190458.xBJ4wBOB062199@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Thu, 19 Dec 2019 04:58:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r355906 - in stable/12: bin/ls cddl/lib/libavl cddl/lib/libctf cddl/lib/libnvpair cddl/lib/libumem cddl/lib/libuutil cddl/lib/libzfs cddl/lib/libzfs_core gnu/lib/libdialog gnu/lib/libgo... X-SVN-Group: stable-12 X-SVN-Commit-Author: sjg X-SVN-Commit-Paths: in stable/12: bin/ls cddl/lib/libavl cddl/lib/libctf cddl/lib/libnvpair cddl/lib/libumem cddl/lib/libuutil cddl/lib/libzfs cddl/lib/libzfs_core gnu/lib/libdialog gnu/lib/libgomp gnu/lib/libregex gnu/l... X-SVN-Commit-Revision: 355906 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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Dec 2019 04:58:31 -0000 Author: sjg Date: Thu Dec 19 04:58:11 2019 New Revision: 355906 URL: https://svnweb.freebsd.org/changeset/base/355906 Log: Add Makefile.depend.options Leaf directories that have dependencies impacted by options need a Makefile.depend.options file to avoid churn in Makefile.depend DIRDEPS for cases such as OPENSSL, TCP_WRAPPERS etc can be set in local.dirdeps-options.mk which can add to those set in Makefile.depend.options See share/mk/dirdeps-options.mk Also update affected Makefile.depend files. MFC of r355616 and r355617 Reviewed by: bdrewery Sponsored by: Juniper Networks Differential Revision: https://reviews.freebsd.org/D22469 Added: stable/12/bin/ls/Makefile.depend.options - copied unchanged from r355616, head/bin/ls/Makefile.depend.options stable/12/lib/libarchive/Makefile.depend.options - copied unchanged from r355616, head/lib/libarchive/Makefile.depend.options stable/12/lib/libbe/Makefile.depend - copied unchanged from r355617, head/lib/libbe/Makefile.depend stable/12/lib/libbsnmp/libbsnmp/Makefile.depend.options - copied unchanged from r355616, head/lib/libbsnmp/libbsnmp/Makefile.depend.options stable/12/lib/libc/Makefile.depend.options - copied unchanged from r355616, head/lib/libc/Makefile.depend.options stable/12/lib/libcasper/services/cap_syslog/Makefile.depend - copied unchanged from r355617, head/lib/libcasper/services/cap_syslog/Makefile.depend stable/12/lib/libfetch/Makefile.depend.options - copied unchanged from r355616, head/lib/libfetch/Makefile.depend.options stable/12/lib/libmagic/Makefile.depend.inc - copied unchanged from r355617, head/lib/libmagic/Makefile.depend.inc stable/12/lib/libomp/Makefile.depend - copied unchanged from r355617, head/lib/libomp/Makefile.depend stable/12/lib/libopencsd/Makefile.depend - copied unchanged from r355617, head/lib/libopencsd/Makefile.depend stable/12/lib/libpam/modules/pam_unix/Makefile.depend.options - copied unchanged from r355616, head/lib/libpam/modules/pam_unix/Makefile.depend.options stable/12/lib/libpcap/Makefile.depend.options - copied unchanged from r355616, head/lib/libpcap/Makefile.depend.options stable/12/lib/libproc/Makefile.depend.options - copied unchanged from r355616, head/lib/libproc/Makefile.depend.options stable/12/lib/libradius/Makefile.depend.options - copied unchanged from r355616, head/lib/libradius/Makefile.depend.options stable/12/lib/libsecureboot/Makefile.depend.amd64 - copied unchanged from r355617, head/lib/libsecureboot/Makefile.depend.amd64 stable/12/lib/libveriexec/Makefile.depend - copied unchanged from r355617, head/lib/libveriexec/Makefile.depend stable/12/lib/ofed/complib/Makefile.depend - copied unchanged from r355617, head/lib/ofed/complib/Makefile.depend stable/12/lib/ofed/include/Makefile.depend - copied unchanged from r355617, head/lib/ofed/include/Makefile.depend stable/12/lib/ofed/libcxgb4/Makefile.depend - copied unchanged from r355617, head/lib/ofed/libcxgb4/Makefile.depend stable/12/lib/ofed/libibcm/Makefile.depend - copied unchanged from r355617, head/lib/ofed/libibcm/Makefile.depend stable/12/lib/ofed/libibmad/Makefile.depend - copied unchanged from r355617, head/lib/ofed/libibmad/Makefile.depend stable/12/lib/ofed/libibnetdisc/Makefile.depend - copied unchanged from r355617, head/lib/ofed/libibnetdisc/Makefile.depend stable/12/lib/ofed/libibverbs/Makefile.depend - copied unchanged from r355617, head/lib/ofed/libibverbs/Makefile.depend stable/12/lib/ofed/libmlx4/Makefile.depend - copied unchanged from r355617, head/lib/ofed/libmlx4/Makefile.depend stable/12/lib/ofed/libmlx5/Makefile.depend - copied unchanged from r355617, head/lib/ofed/libmlx5/Makefile.depend stable/12/lib/ofed/libopensm/Makefile.depend - copied unchanged from r355617, head/lib/ofed/libopensm/Makefile.depend stable/12/lib/ofed/librdmacm/Makefile.depend - copied unchanged from r355617, head/lib/ofed/librdmacm/Makefile.depend stable/12/lib/ofed/libvendor/Makefile.depend - copied unchanged from r355617, head/lib/ofed/libvendor/Makefile.depend stable/12/libexec/fingerd/Makefile.depend.options - copied unchanged from r355616, head/libexec/fingerd/Makefile.depend.options stable/12/libexec/ftpd/Makefile.depend.options - copied unchanged from r355616, head/libexec/ftpd/Makefile.depend.options stable/12/libexec/telnetd/Makefile.depend.options - copied unchanged from r355616, head/libexec/telnetd/Makefile.depend.options stable/12/libexec/tftpd/Makefile.depend.options - copied unchanged from r355616, head/libexec/tftpd/Makefile.depend.options stable/12/sbin/bectl/Makefile.depend - copied unchanged from r355617, head/sbin/bectl/Makefile.depend stable/12/sbin/devmatch/Makefile.depend - copied unchanged from r355617, head/sbin/devmatch/Makefile.depend stable/12/sbin/dhclient/Makefile.depend.options - copied unchanged from r355616, head/sbin/dhclient/Makefile.depend.options stable/12/sbin/dumpon/Makefile.depend.options - copied unchanged from r355616, head/sbin/dumpon/Makefile.depend.options stable/12/sbin/geom/Makefile.depend - copied unchanged from r355617, head/sbin/geom/Makefile.depend stable/12/sbin/ifconfig/Makefile.depend.options - copied unchanged from r355616, head/sbin/ifconfig/Makefile.depend.options stable/12/sbin/ping/Makefile.depend.options - copied unchanged from r355616, head/sbin/ping/Makefile.depend.options stable/12/sbin/ping6/Makefile.depend.options - copied unchanged from r355616, head/sbin/ping6/Makefile.depend.options stable/12/sbin/rtsol/Makefile.depend.options - copied unchanged from r355616, head/sbin/rtsol/Makefile.depend.options stable/12/sbin/savecore/Makefile.depend.options - copied unchanged from r355616, head/sbin/savecore/Makefile.depend.options stable/12/secure/usr.bin/ssh/Makefile.depend.options - copied unchanged from r355616, head/secure/usr.bin/ssh/Makefile.depend.options stable/12/secure/usr.sbin/sshd/Makefile.depend.options - copied unchanged from r355616, head/secure/usr.sbin/sshd/Makefile.depend.options stable/12/stand/i386/loader_4th/Makefile.depend - copied unchanged from r355617, head/stand/i386/loader_4th/Makefile.depend stable/12/usr.bin/brandelf/Makefile.depend.options - copied unchanged from r355616, head/usr.bin/brandelf/Makefile.depend.options stable/12/usr.bin/chkey/Makefile.depend.options - copied unchanged from r355616, head/usr.bin/chkey/Makefile.depend.options stable/12/usr.bin/chpass/Makefile.depend.options - copied unchanged from r355616, head/usr.bin/chpass/Makefile.depend.options stable/12/usr.bin/factor/Makefile.depend.options - copied unchanged from r355616, head/usr.bin/factor/Makefile.depend.options stable/12/usr.bin/grep/Makefile.depend.options - copied unchanged from r355616, head/usr.bin/grep/Makefile.depend.options stable/12/usr.bin/gzip/Makefile.depend.options - copied unchanged from r355616, head/usr.bin/gzip/Makefile.depend.options stable/12/usr.bin/head/Makefile.depend.options - copied unchanged from r355616, head/usr.bin/head/Makefile.depend.options stable/12/usr.bin/kdump/Makefile.depend.options - copied unchanged from r355616, head/usr.bin/kdump/Makefile.depend.options stable/12/usr.bin/login/Makefile.depend.options - copied unchanged from r355616, head/usr.bin/login/Makefile.depend.options stable/12/usr.bin/netstat/Makefile.depend.options - copied unchanged from r355616, head/usr.bin/netstat/Makefile.depend.options stable/12/usr.bin/nm/Makefile.depend.options - copied unchanged from r355616, head/usr.bin/nm/Makefile.depend.options stable/12/usr.bin/readelf/Makefile.depend.options - copied unchanged from r355616, head/usr.bin/readelf/Makefile.depend.options stable/12/usr.bin/size/Makefile.depend.options - copied unchanged from r355616, head/usr.bin/size/Makefile.depend.options stable/12/usr.bin/sort/Makefile.depend.options - copied unchanged from r355616, head/usr.bin/sort/Makefile.depend.options stable/12/usr.bin/strings/Makefile.depend.options - copied unchanged from r355616, head/usr.bin/strings/Makefile.depend.options stable/12/usr.bin/su/Makefile.depend.options - copied unchanged from r355616, head/usr.bin/su/Makefile.depend.options stable/12/usr.bin/tail/Makefile.depend.options - copied unchanged from r355616, head/usr.bin/tail/Makefile.depend.options stable/12/usr.bin/telnet/Makefile.depend.options - copied unchanged from r355616, head/usr.bin/telnet/Makefile.depend.options stable/12/usr.bin/wc/Makefile.depend.options - copied unchanged from r355616, head/usr.bin/wc/Makefile.depend.options stable/12/usr.sbin/amd/amd/Makefile.depend.options - copied unchanged from r355616, head/usr.sbin/amd/amd/Makefile.depend.options stable/12/usr.sbin/bhyve/Makefile.depend.options - copied unchanged from r355616, head/usr.sbin/bhyve/Makefile.depend.options stable/12/usr.sbin/bsnmpd/bsnmpd/Makefile.depend.options - copied unchanged from r355616, head/usr.sbin/bsnmpd/bsnmpd/Makefile.depend.options stable/12/usr.sbin/fstyp/Makefile.depend.options - copied unchanged from r355616, head/usr.sbin/fstyp/Makefile.depend.options stable/12/usr.sbin/gssd/Makefile.depend.options - copied unchanged from r355616, head/usr.sbin/gssd/Makefile.depend.options stable/12/usr.sbin/inetd/Makefile.depend.options - copied unchanged from r355616, head/usr.sbin/inetd/Makefile.depend.options stable/12/usr.sbin/ngctl/Makefile.depend.options - copied unchanged from r355616, head/usr.sbin/ngctl/Makefile.depend.options stable/12/usr.sbin/ntp/ntp-keygen/Makefile.depend.options - copied unchanged from r355616, head/usr.sbin/ntp/ntp-keygen/Makefile.depend.options stable/12/usr.sbin/ntp/ntpd/Makefile.depend.options - copied unchanged from r355616, head/usr.sbin/ntp/ntpd/Makefile.depend.options stable/12/usr.sbin/ntp/ntpdate/Makefile.depend.options - copied unchanged from r355616, head/usr.sbin/ntp/ntpdate/Makefile.depend.options stable/12/usr.sbin/ntp/ntpdc/Makefile.depend.options - copied unchanged from r355616, head/usr.sbin/ntp/ntpdc/Makefile.depend.options stable/12/usr.sbin/ntp/ntpq/Makefile.depend.options - copied unchanged from r355616, head/usr.sbin/ntp/ntpq/Makefile.depend.options stable/12/usr.sbin/ntp/sntp/Makefile.depend.options - copied unchanged from r355616, head/usr.sbin/ntp/sntp/Makefile.depend.options stable/12/usr.sbin/rpcbind/Makefile.depend.options - copied unchanged from r355616, head/usr.sbin/rpcbind/Makefile.depend.options stable/12/usr.sbin/rtsold/Makefile.depend.options - copied unchanged from r355616, head/usr.sbin/rtsold/Makefile.depend.options stable/12/usr.sbin/sendmail/Makefile.depend.options - copied unchanged from r355616, head/usr.sbin/sendmail/Makefile.depend.options stable/12/usr.sbin/tcpdump/tcpdump/Makefile.depend.options - copied unchanged from r355616, head/usr.sbin/tcpdump/tcpdump/Makefile.depend.options stable/12/usr.sbin/traceroute/Makefile.depend.options - copied unchanged from r355616, head/usr.sbin/traceroute/Makefile.depend.options stable/12/usr.sbin/tzsetup/Makefile.depend.options - copied unchanged from r355616, head/usr.sbin/tzsetup/Makefile.depend.options stable/12/usr.sbin/wpa/Makefile.depend.options - copied unchanged from r355616, head/usr.sbin/wpa/Makefile.depend.options stable/12/usr.sbin/ypserv/Makefile.depend.options - copied unchanged from r355616, head/usr.sbin/ypserv/Makefile.depend.options Modified: stable/12/bin/ls/Makefile.depend stable/12/cddl/lib/libavl/Makefile.depend stable/12/cddl/lib/libctf/Makefile.depend stable/12/cddl/lib/libnvpair/Makefile.depend stable/12/cddl/lib/libumem/Makefile.depend stable/12/cddl/lib/libuutil/Makefile.depend stable/12/cddl/lib/libzfs/Makefile.depend stable/12/cddl/lib/libzfs_core/Makefile.depend stable/12/gnu/lib/libdialog/Makefile.depend stable/12/gnu/lib/libgomp/Makefile.depend stable/12/gnu/lib/libregex/Makefile.depend stable/12/gnu/lib/libssp/Makefile.depend stable/12/gnu/lib/libstdc++/Makefile.depend stable/12/gnu/lib/libsupc++/Makefile.depend stable/12/kerberos5/lib/libasn1/Makefile.depend stable/12/kerberos5/lib/libgssapi_krb5/Makefile.depend stable/12/kerberos5/lib/libhdb/Makefile.depend stable/12/kerberos5/lib/libheimbase/Makefile.depend stable/12/kerberos5/lib/libheimipcc/Makefile.depend stable/12/kerberos5/lib/libheimntlm/Makefile.depend stable/12/kerberos5/lib/libhx509/Makefile.depend stable/12/kerberos5/lib/libkadm5clnt/Makefile.depend stable/12/kerberos5/lib/libkafs5/Makefile.depend stable/12/kerberos5/lib/libkdc/Makefile.depend stable/12/kerberos5/lib/libkrb5/Makefile.depend stable/12/kerberos5/lib/libroken/Makefile.depend stable/12/kerberos5/lib/libwind/Makefile.depend stable/12/lib/atf/libatf-c/Makefile.depend stable/12/lib/lib80211/Makefile.depend stable/12/lib/libalias/libalias/Makefile.depend stable/12/lib/libarchive/Makefile.depend stable/12/lib/libbegemot/Makefile.depend stable/12/lib/libblacklist/Makefile.depend stable/12/lib/libblocksruntime/Makefile.depend stable/12/lib/libbluetooth/Makefile.depend stable/12/lib/libbsdstat/Makefile.depend stable/12/lib/libbsm/Makefile.depend stable/12/lib/libbsnmp/libbsnmp/Makefile.depend stable/12/lib/libbz2/Makefile.depend stable/12/lib/libc++/Makefile.depend stable/12/lib/libc/Makefile.depend stable/12/lib/libc/tests/tls_dso/Makefile.depend stable/12/lib/libcalendar/Makefile.depend stable/12/lib/libcam/Makefile.depend stable/12/lib/libcasper/libcasper/Makefile.depend stable/12/lib/libcasper/services/cap_dns/Makefile.depend stable/12/lib/libcasper/services/cap_grp/Makefile.depend stable/12/lib/libcasper/services/cap_pwd/Makefile.depend stable/12/lib/libcasper/services/cap_sysctl/Makefile.depend stable/12/lib/libcom_err/Makefile.depend stable/12/lib/libcrypt/Makefile.depend stable/12/lib/libcuse/Makefile.depend stable/12/lib/libcxxrt/Makefile.depend stable/12/lib/libdevctl/Makefile.depend stable/12/lib/libdevdctl/Makefile.depend stable/12/lib/libdevinfo/Makefile.depend stable/12/lib/libdevstat/Makefile.depend stable/12/lib/libdpv/Makefile.depend stable/12/lib/libdwarf/Makefile.depend stable/12/lib/libedit/Makefile.depend stable/12/lib/libefivar/Makefile.depend stable/12/lib/libelf/Makefile.depend stable/12/lib/libevent/Makefile.depend stable/12/lib/libexecinfo/Makefile.depend stable/12/lib/libexpat/Makefile.depend stable/12/lib/libfetch/Makefile.depend stable/12/lib/libfigpar/Makefile.depend stable/12/lib/libgcc_s/Makefile.depend stable/12/lib/libgeom/Makefile.depend stable/12/lib/libgpio/Makefile.depend stable/12/lib/libgssapi/Makefile.depend stable/12/lib/libipsec/Makefile.depend stable/12/lib/libjail/Makefile.depend stable/12/lib/libkvm/Makefile.depend stable/12/lib/libldns/Makefile.depend stable/12/lib/liblzma/Makefile.depend stable/12/lib/libmagic/Makefile.depend stable/12/lib/libmd/Makefile.depend stable/12/lib/libmemstat/Makefile.depend stable/12/lib/libmilter/Makefile.depend stable/12/lib/libmp/Makefile.depend stable/12/lib/libmt/Makefile.depend stable/12/lib/libnetgraph/Makefile.depend stable/12/lib/libngatm/Makefile.depend stable/12/lib/libnv/Makefile.depend stable/12/lib/libopie/Makefile.depend stable/12/lib/libpam/libpam/Makefile.depend stable/12/lib/libpam/modules/pam_unix/Makefile.depend stable/12/lib/libpcap/Makefile.depend stable/12/lib/libpmc/Makefile.depend stable/12/lib/libproc/Makefile.depend stable/12/lib/libprocstat/Makefile.depend stable/12/lib/libradius/Makefile.depend stable/12/lib/librpcsvc/Makefile.depend stable/12/lib/librss/Makefile.depend stable/12/lib/librtld_db/Makefile.depend stable/12/lib/libsbuf/Makefile.depend stable/12/lib/libsdp/Makefile.depend stable/12/lib/libsecureboot/Makefile.depend stable/12/lib/libsqlite3/Makefile.depend stable/12/lib/libstdthreads/Makefile.depend stable/12/lib/libsysdecode/Makefile.depend stable/12/lib/libtacplus/Makefile.depend stable/12/lib/libthr/Makefile.depend stable/12/lib/libthread_db/Makefile.depend stable/12/lib/libucl/Makefile.depend stable/12/lib/libufs/Makefile.depend stable/12/lib/libugidfw/Makefile.depend stable/12/lib/libulog/Makefile.depend stable/12/lib/libusb/Makefile.depend stable/12/lib/libusbhid/Makefile.depend stable/12/lib/libutil/Makefile.depend stable/12/lib/libvgl/Makefile.depend stable/12/lib/libvmmapi/Makefile.depend stable/12/lib/libwrap/Makefile.depend stable/12/lib/libxo/Makefile.depend stable/12/lib/libypclnt/Makefile.depend stable/12/lib/libz/Makefile.depend stable/12/lib/libzstd/Makefile.depend stable/12/lib/msun/Makefile.depend stable/12/lib/ncurses/formw/Makefile.depend stable/12/lib/ncurses/menuw/Makefile.depend stable/12/lib/ncurses/ncursesw/Makefile.depend stable/12/lib/ncurses/panelw/Makefile.depend stable/12/libexec/fingerd/Makefile.depend stable/12/libexec/ftpd/Makefile.depend stable/12/libexec/telnetd/Makefile.depend stable/12/libexec/tftpd/Makefile.depend stable/12/sbin/dhclient/Makefile.depend stable/12/sbin/dumpon/Makefile.depend stable/12/sbin/ifconfig/Makefile.depend stable/12/sbin/ping/Makefile.depend stable/12/sbin/ping6/Makefile.depend stable/12/sbin/rtsol/Makefile.depend stable/12/sbin/savecore/Makefile.depend stable/12/secure/lib/libcrypto/Makefile.depend stable/12/secure/lib/libssh/Makefile.depend stable/12/secure/lib/libssl/Makefile.depend stable/12/secure/usr.bin/ssh/Makefile.depend stable/12/secure/usr.sbin/sshd/Makefile.depend stable/12/stand/efi/libefi/Makefile.depend stable/12/stand/efi/loader/Makefile.depend stable/12/usr.bin/brandelf/Makefile.depend stable/12/usr.bin/chkey/Makefile.depend stable/12/usr.bin/chpass/Makefile.depend stable/12/usr.bin/factor/Makefile.depend stable/12/usr.bin/grep/Makefile.depend stable/12/usr.bin/gzip/Makefile.depend stable/12/usr.bin/head/Makefile.depend stable/12/usr.bin/kdump/Makefile.depend stable/12/usr.bin/lex/Makefile.depend stable/12/usr.bin/login/Makefile.depend stable/12/usr.bin/netstat/Makefile.depend stable/12/usr.bin/nm/Makefile.depend stable/12/usr.bin/readelf/Makefile.depend stable/12/usr.bin/size/Makefile.depend stable/12/usr.bin/sort/Makefile.depend stable/12/usr.bin/strings/Makefile.depend stable/12/usr.bin/su/Makefile.depend stable/12/usr.bin/tail/Makefile.depend stable/12/usr.bin/telnet/Makefile.depend stable/12/usr.bin/wc/Makefile.depend stable/12/usr.sbin/amd/amd/Makefile.depend stable/12/usr.sbin/bhyve/Makefile.depend stable/12/usr.sbin/bsnmpd/bsnmpd/Makefile.depend stable/12/usr.sbin/bsnmpd/modules/snmp_bridge/Makefile.depend stable/12/usr.sbin/bsnmpd/modules/snmp_mibII/Makefile.depend stable/12/usr.sbin/bsnmpd/modules/snmp_netgraph/Makefile.depend stable/12/usr.sbin/fstyp/Makefile.depend stable/12/usr.sbin/gssd/Makefile.depend stable/12/usr.sbin/inetd/Makefile.depend stable/12/usr.sbin/makefs/Makefile.depend stable/12/usr.sbin/ngctl/Makefile.depend stable/12/usr.sbin/ntp/libntpevent/Makefile.depend stable/12/usr.sbin/ntp/ntp-keygen/Makefile.depend stable/12/usr.sbin/ntp/ntpd/Makefile.depend stable/12/usr.sbin/ntp/ntpdate/Makefile.depend stable/12/usr.sbin/ntp/ntpdc/Makefile.depend stable/12/usr.sbin/ntp/ntpq/Makefile.depend stable/12/usr.sbin/ntp/sntp/Makefile.depend stable/12/usr.sbin/rpcbind/Makefile.depend stable/12/usr.sbin/rtsold/Makefile.depend stable/12/usr.sbin/sendmail/Makefile.depend stable/12/usr.sbin/tcpdump/tcpdump/Makefile.depend stable/12/usr.sbin/traceroute/Makefile.depend stable/12/usr.sbin/tzsetup/Makefile.depend stable/12/usr.sbin/ypserv/Makefile.depend Directory Properties: stable/12/ (props changed) Modified: stable/12/bin/ls/Makefile.depend ============================================================================== --- stable/12/bin/ls/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/bin/ls/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,14 +2,12 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ lib/libutil \ - lib/ncurses/ncursesw \ .include Copied: stable/12/bin/ls/Makefile.depend.options (from r355616, head/bin/ls/Makefile.depend.options) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/bin/ls/Makefile.depend.options Thu Dec 19 04:58:11 2019 (r355906, copy of r355616, head/bin/ls/Makefile.depend.options) @@ -0,0 +1,8 @@ +# $FreeBSD$ +# This file is not autogenerated - take care! + +DIRDEPS_OPTIONS= LS_COLORS + +DIRDEPS.LS_COLORS.yes= lib/ncurses/ncursesw + +.include Modified: stable/12/cddl/lib/libavl/Makefile.depend ============================================================================== --- stable/12/cddl/lib/libavl/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/cddl/lib/libavl/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ lib/${CSU_DIR} \ lib/libc \ Modified: stable/12/cddl/lib/libctf/Makefile.depend ============================================================================== --- stable/12/cddl/lib/libctf/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/cddl/lib/libctf/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ Modified: stable/12/cddl/lib/libnvpair/Makefile.depend ============================================================================== --- stable/12/cddl/lib/libnvpair/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/cddl/lib/libnvpair/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ Modified: stable/12/cddl/lib/libumem/Makefile.depend ============================================================================== --- stable/12/cddl/lib/libumem/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/cddl/lib/libumem/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ lib/${CSU_DIR} \ lib/libc \ Modified: stable/12/cddl/lib/libuutil/Makefile.depend ============================================================================== --- stable/12/cddl/lib/libuutil/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/cddl/lib/libuutil/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ Modified: stable/12/cddl/lib/libzfs/Makefile.depend ============================================================================== --- stable/12/cddl/lib/libzfs/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/cddl/lib/libzfs/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -7,7 +7,6 @@ DIRDEPS = \ cddl/lib/libumem \ cddl/lib/libuutil \ cddl/lib/libzfs_core \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ Modified: stable/12/cddl/lib/libzfs_core/Makefile.depend ============================================================================== --- stable/12/cddl/lib/libzfs_core/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/cddl/lib/libzfs_core/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -3,7 +3,6 @@ DIRDEPS = \ cddl/lib/libnvpair \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ Modified: stable/12/gnu/lib/libdialog/Makefile.depend ============================================================================== --- stable/12/gnu/lib/libdialog/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/gnu/lib/libdialog/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ Modified: stable/12/gnu/lib/libgomp/Makefile.depend ============================================================================== --- stable/12/gnu/lib/libgomp/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/gnu/lib/libgomp/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ Modified: stable/12/gnu/lib/libregex/Makefile.depend ============================================================================== --- stable/12/gnu/lib/libregex/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/gnu/lib/libregex/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ Modified: stable/12/gnu/lib/libssp/Makefile.depend ============================================================================== --- stable/12/gnu/lib/libssp/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/gnu/lib/libssp/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ Modified: stable/12/gnu/lib/libstdc++/Makefile.depend ============================================================================== --- stable/12/gnu/lib/libstdc++/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/gnu/lib/libstdc++/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ Modified: stable/12/gnu/lib/libsupc++/Makefile.depend ============================================================================== --- stable/12/gnu/lib/libsupc++/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/gnu/lib/libsupc++/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ gnu/lib/libstdc++ \ include \ include/xlocale \ Modified: stable/12/kerberos5/lib/libasn1/Makefile.depend ============================================================================== --- stable/12/kerberos5/lib/libasn1/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/kerberos5/lib/libasn1/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/arpa \ include/xlocale \ Modified: stable/12/kerberos5/lib/libgssapi_krb5/Makefile.depend ============================================================================== --- stable/12/kerberos5/lib/libgssapi_krb5/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/kerberos5/lib/libgssapi_krb5/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/arpa \ include/xlocale \ Modified: stable/12/kerberos5/lib/libhdb/Makefile.depend ============================================================================== --- stable/12/kerberos5/lib/libhdb/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/kerberos5/lib/libhdb/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/arpa \ include/xlocale \ Modified: stable/12/kerberos5/lib/libheimbase/Makefile.depend ============================================================================== --- stable/12/kerberos5/lib/libheimbase/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/kerberos5/lib/libheimbase/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ Modified: stable/12/kerberos5/lib/libheimipcc/Makefile.depend ============================================================================== --- stable/12/kerberos5/lib/libheimipcc/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/kerberos5/lib/libheimipcc/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/arpa \ include/xlocale \ Modified: stable/12/kerberos5/lib/libheimntlm/Makefile.depend ============================================================================== --- stable/12/kerberos5/lib/libheimntlm/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/kerberos5/lib/libheimntlm/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/arpa \ include/xlocale \ Modified: stable/12/kerberos5/lib/libhx509/Makefile.depend ============================================================================== --- stable/12/kerberos5/lib/libhx509/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/kerberos5/lib/libhx509/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/arpa \ include/xlocale \ Modified: stable/12/kerberos5/lib/libkadm5clnt/Makefile.depend ============================================================================== --- stable/12/kerberos5/lib/libkadm5clnt/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/kerberos5/lib/libkadm5clnt/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/arpa \ include/xlocale \ Modified: stable/12/kerberos5/lib/libkafs5/Makefile.depend ============================================================================== --- stable/12/kerberos5/lib/libkafs5/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/kerberos5/lib/libkafs5/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/arpa \ include/xlocale \ Modified: stable/12/kerberos5/lib/libkdc/Makefile.depend ============================================================================== --- stable/12/kerberos5/lib/libkdc/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/kerberos5/lib/libkdc/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/arpa \ include/xlocale \ @@ -16,7 +15,6 @@ DIRDEPS = \ kerberos5/lib/libwind \ lib/${CSU_DIR} \ lib/libc \ - lib/libcom_err \ lib/libcompiler_rt \ lib/libutil \ secure/lib/libcrypto \ Modified: stable/12/kerberos5/lib/libkrb5/Makefile.depend ============================================================================== --- stable/12/kerberos5/lib/libkrb5/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/kerberos5/lib/libkrb5/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/arpa \ include/xlocale \ Modified: stable/12/kerberos5/lib/libroken/Makefile.depend ============================================================================== --- stable/12/kerberos5/lib/libroken/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/kerberos5/lib/libroken/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/arpa \ include/xlocale \ Modified: stable/12/kerberos5/lib/libwind/Makefile.depend ============================================================================== --- stable/12/kerberos5/lib/libwind/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/kerberos5/lib/libwind/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/arpa \ include/xlocale \ Modified: stable/12/lib/atf/libatf-c/Makefile.depend ============================================================================== --- stable/12/lib/atf/libatf-c/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/lib/atf/libatf-c/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ Modified: stable/12/lib/lib80211/Makefile.depend ============================================================================== --- stable/12/lib/lib80211/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/lib/lib80211/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ Modified: stable/12/lib/libalias/libalias/Makefile.depend ============================================================================== --- stable/12/lib/libalias/libalias/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/lib/libalias/libalias/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/arpa \ include/xlocale \ Modified: stable/12/lib/libarchive/Makefile.depend ============================================================================== --- stable/12/lib/libarchive/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/lib/libarchive/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ @@ -12,7 +11,6 @@ DIRDEPS = \ lib/libexpat \ lib/liblzma \ lib/libz \ - secure/lib/libcrypto \ .include Copied: stable/12/lib/libarchive/Makefile.depend.options (from r355616, head/lib/libarchive/Makefile.depend.options) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/lib/libarchive/Makefile.depend.options Thu Dec 19 04:58:11 2019 (r355906, copy of r355616, head/lib/libarchive/Makefile.depend.options) @@ -0,0 +1,6 @@ +# $FreeBSD$ +# This file is not autogenerated - take care! + +DIRDEPS_OPTIONS= OPENSSL + +.include Copied: stable/12/lib/libbe/Makefile.depend (from r355617, head/lib/libbe/Makefile.depend) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/lib/libbe/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906, copy of r355617, head/lib/libbe/Makefile.depend) @@ -0,0 +1,20 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + cddl/lib/libnvpair \ + cddl/lib/libzfs \ + cddl/lib/libzfs_core \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + lib/msun \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Modified: stable/12/lib/libbegemot/Makefile.depend ============================================================================== --- stable/12/lib/libbegemot/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/lib/libbegemot/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ Modified: stable/12/lib/libblacklist/Makefile.depend ============================================================================== --- stable/12/lib/libblacklist/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/lib/libblacklist/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ Modified: stable/12/lib/libblocksruntime/Makefile.depend ============================================================================== --- stable/12/lib/libblocksruntime/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/lib/libblocksruntime/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ Modified: stable/12/lib/libbluetooth/Makefile.depend ============================================================================== --- stable/12/lib/libbluetooth/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/lib/libbluetooth/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ Modified: stable/12/lib/libbsdstat/Makefile.depend ============================================================================== --- stable/12/lib/libbsdstat/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/lib/libbsdstat/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ Modified: stable/12/lib/libbsm/Makefile.depend ============================================================================== --- stable/12/lib/libbsm/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/lib/libbsm/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/arpa \ include/xlocale \ Modified: stable/12/lib/libbsnmp/libbsnmp/Makefile.depend ============================================================================== --- stable/12/lib/libbsnmp/libbsnmp/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/lib/libbsnmp/libbsnmp/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,14 +2,13 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/arpa \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - secure/lib/libcrypto \ + usr.sbin/bsnmpd/gensnmptree.host \ .include Copied: stable/12/lib/libbsnmp/libbsnmp/Makefile.depend.options (from r355616, head/lib/libbsnmp/libbsnmp/Makefile.depend.options) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/lib/libbsnmp/libbsnmp/Makefile.depend.options Thu Dec 19 04:58:11 2019 (r355906, copy of r355616, head/lib/libbsnmp/libbsnmp/Makefile.depend.options) @@ -0,0 +1,6 @@ +# $FreeBSD$ +# This file is not autogenerated - take care! + +DIRDEPS_OPTIONS= OPENSSL + +.include Modified: stable/12/lib/libbz2/Makefile.depend ============================================================================== --- stable/12/lib/libbz2/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/lib/libbz2/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ Modified: stable/12/lib/libc++/Makefile.depend ============================================================================== --- stable/12/lib/libc++/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/lib/libc++/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ Modified: stable/12/lib/libc/Makefile.depend ============================================================================== --- stable/12/lib/libc/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/lib/libc/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/rpc \ include/rpcsvc \ Copied: stable/12/lib/libc/Makefile.depend.options (from r355616, head/lib/libc/Makefile.depend.options) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/lib/libc/Makefile.depend.options Thu Dec 19 04:58:11 2019 (r355906, copy of r355616, head/lib/libc/Makefile.depend.options) @@ -0,0 +1,8 @@ +# $FreeBSD$ +# This file is not autogenerated - take care! + +DIRDEPS_OPTIONS= SSP + +DIRDEPS.SSP.yes= gnu/lib/libssp/libssp_nonshared + +.include Modified: stable/12/lib/libc/tests/tls_dso/Makefile.depend ============================================================================== --- stable/12/lib/libc/tests/tls_dso/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/lib/libc/tests/tls_dso/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ lib/${CSU_DIR} \ lib/libc \ Modified: stable/12/lib/libcalendar/Makefile.depend ============================================================================== --- stable/12/lib/libcalendar/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/lib/libcalendar/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ lib/${CSU_DIR} \ lib/libc \ Modified: stable/12/lib/libcam/Makefile.depend ============================================================================== --- stable/12/lib/libcam/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/lib/libcam/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ Modified: stable/12/lib/libcasper/libcasper/Makefile.depend ============================================================================== --- stable/12/lib/libcasper/libcasper/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/lib/libcasper/libcasper/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ Modified: stable/12/lib/libcasper/services/cap_dns/Makefile.depend ============================================================================== --- stable/12/lib/libcasper/services/cap_dns/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/lib/libcasper/services/cap_dns/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ Modified: stable/12/lib/libcasper/services/cap_grp/Makefile.depend ============================================================================== --- stable/12/lib/libcasper/services/cap_grp/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/lib/libcasper/services/cap_grp/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ Modified: stable/12/lib/libcasper/services/cap_pwd/Makefile.depend ============================================================================== --- stable/12/lib/libcasper/services/cap_pwd/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/lib/libcasper/services/cap_pwd/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ Modified: stable/12/lib/libcasper/services/cap_sysctl/Makefile.depend ============================================================================== --- stable/12/lib/libcasper/services/cap_sysctl/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/lib/libcasper/services/cap_sysctl/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ Copied: stable/12/lib/libcasper/services/cap_syslog/Makefile.depend (from r355617, head/lib/libcasper/services/cap_syslog/Makefile.depend) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/lib/libcasper/services/cap_syslog/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906, copy of r355617, head/lib/libcasper/services/cap_syslog/Makefile.depend) @@ -0,0 +1,18 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcasper/libcasper \ + lib/libcompiler_rt \ + lib/libnv \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Modified: stable/12/lib/libcom_err/Makefile.depend ============================================================================== --- stable/12/lib/libcom_err/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/lib/libcom_err/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ Modified: stable/12/lib/libcrypt/Makefile.depend ============================================================================== --- stable/12/lib/libcrypt/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/lib/libcrypt/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/arpa \ include/xlocale \ Modified: stable/12/lib/libcuse/Makefile.depend ============================================================================== --- stable/12/lib/libcuse/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/lib/libcuse/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ Modified: stable/12/lib/libcxxrt/Makefile.depend ============================================================================== --- stable/12/lib/libcxxrt/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/lib/libcxxrt/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ Modified: stable/12/lib/libdevctl/Makefile.depend ============================================================================== --- stable/12/lib/libdevctl/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/lib/libdevctl/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ Modified: stable/12/lib/libdevdctl/Makefile.depend ============================================================================== --- stable/12/lib/libdevdctl/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/lib/libdevdctl/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ Modified: stable/12/lib/libdevinfo/Makefile.depend ============================================================================== --- stable/12/lib/libdevinfo/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/lib/libdevinfo/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ Modified: stable/12/lib/libdevstat/Makefile.depend ============================================================================== --- stable/12/lib/libdevstat/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/lib/libdevstat/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ Modified: stable/12/lib/libdpv/Makefile.depend ============================================================================== --- stable/12/lib/libdpv/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/lib/libdpv/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ gnu/lib/libdialog \ include \ include/xlocale \ Modified: stable/12/lib/libdwarf/Makefile.depend ============================================================================== --- stable/12/lib/libdwarf/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/lib/libdwarf/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ Modified: stable/12/lib/libedit/Makefile.depend ============================================================================== --- stable/12/lib/libedit/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/lib/libedit/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ Modified: stable/12/lib/libefivar/Makefile.depend ============================================================================== --- stable/12/lib/libefivar/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/lib/libefivar/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,12 +2,12 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ + lib/libgeom \ .include Modified: stable/12/lib/libelf/Makefile.depend ============================================================================== --- stable/12/lib/libelf/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/lib/libelf/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ Modified: stable/12/lib/libevent/Makefile.depend ============================================================================== --- stable/12/lib/libevent/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/lib/libevent/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ Modified: stable/12/lib/libexecinfo/Makefile.depend ============================================================================== --- stable/12/lib/libexecinfo/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/lib/libexecinfo/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ Modified: stable/12/lib/libexpat/Makefile.depend ============================================================================== --- stable/12/lib/libexpat/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/lib/libexpat/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ Modified: stable/12/lib/libfetch/Makefile.depend ============================================================================== --- stable/12/lib/libfetch/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/lib/libfetch/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,14 +2,11 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ - secure/lib/libcrypto \ - secure/lib/libssl \ .include Copied: stable/12/lib/libfetch/Makefile.depend.options (from r355616, head/lib/libfetch/Makefile.depend.options) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/lib/libfetch/Makefile.depend.options Thu Dec 19 04:58:11 2019 (r355906, copy of r355616, head/lib/libfetch/Makefile.depend.options) @@ -0,0 +1,9 @@ +# $FreeBSD$ +# This file is not autogenerated - take care! + +DIRDEPS_OPTIONS= OPENSSL + +DIRDEPS.OPENSSL.yes+= secure/lib/libssl +DIRDEPS.OPENSSL.no= lib/libmd + +.include Modified: stable/12/lib/libfigpar/Makefile.depend ============================================================================== --- stable/12/lib/libfigpar/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/lib/libfigpar/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ Modified: stable/12/lib/libgcc_s/Makefile.depend ============================================================================== --- stable/12/lib/libgcc_s/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/lib/libgcc_s/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ Modified: stable/12/lib/libgeom/Makefile.depend ============================================================================== --- stable/12/lib/libgeom/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/lib/libgeom/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ Modified: stable/12/lib/libgpio/Makefile.depend ============================================================================== --- stable/12/lib/libgpio/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/lib/libgpio/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ Modified: stable/12/lib/libgssapi/Makefile.depend ============================================================================== --- stable/12/lib/libgssapi/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/lib/libgssapi/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/gssapi \ include/xlocale \ Modified: stable/12/lib/libipsec/Makefile.depend ============================================================================== --- stable/12/lib/libipsec/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/lib/libipsec/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/arpa \ include/xlocale \ Modified: stable/12/lib/libjail/Makefile.depend ============================================================================== --- stable/12/lib/libjail/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/lib/libjail/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/arpa \ include/xlocale \ Modified: stable/12/lib/libkvm/Makefile.depend ============================================================================== --- stable/12/lib/libkvm/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/lib/libkvm/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ Modified: stable/12/lib/libldns/Makefile.depend ============================================================================== --- stable/12/lib/libldns/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/lib/libldns/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/arpa \ include/xlocale \ Modified: stable/12/lib/liblzma/Makefile.depend ============================================================================== --- stable/12/lib/liblzma/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/lib/liblzma/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ Modified: stable/12/lib/libmagic/Makefile.depend ============================================================================== --- stable/12/lib/libmagic/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/lib/libmagic/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,12 +2,12 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ + lib/libmagic.host \ lib/libz \ Copied: stable/12/lib/libmagic/Makefile.depend.inc (from r355617, head/lib/libmagic/Makefile.depend.inc) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/lib/libmagic/Makefile.depend.inc Thu Dec 19 04:58:11 2019 (r355906, copy of r355617, head/lib/libmagic/Makefile.depend.inc) @@ -0,0 +1,6 @@ +# $FreeBSD$ +# This file is not autogenerated - take care! + +.if ${DEP_MACHINE:U${MACHINE}} != "host" +DIRDEPS+= ${DEP_RELDIR:U${RELDIR}}.host +.endif Modified: stable/12/lib/libmd/Makefile.depend ============================================================================== --- stable/12/lib/libmd/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/lib/libmd/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ Modified: stable/12/lib/libmemstat/Makefile.depend ============================================================================== --- stable/12/lib/libmemstat/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/lib/libmemstat/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ Modified: stable/12/lib/libmilter/Makefile.depend ============================================================================== --- stable/12/lib/libmilter/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/lib/libmilter/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/arpa \ include/xlocale \ Modified: stable/12/lib/libmp/Makefile.depend ============================================================================== --- stable/12/lib/libmp/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/lib/libmp/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ Modified: stable/12/lib/libmt/Makefile.depend ============================================================================== --- stable/12/lib/libmt/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/lib/libmt/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ Modified: stable/12/lib/libnetgraph/Makefile.depend ============================================================================== --- stable/12/lib/libnetgraph/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/lib/libnetgraph/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ Modified: stable/12/lib/libngatm/Makefile.depend ============================================================================== --- stable/12/lib/libngatm/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/lib/libngatm/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/arpa \ include/xlocale \ Modified: stable/12/lib/libnv/Makefile.depend ============================================================================== --- stable/12/lib/libnv/Makefile.depend Thu Dec 19 04:49:34 2019 (r355905) +++ stable/12/lib/libnv/Makefile.depend Thu Dec 19 04:58:11 2019 (r355906) @@ -2,7 +2,6 @@ # Autogenerated - do NOT edit! *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-12@freebsd.org Fri Dec 20 00:25:56 2019 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B6CCC1EF065; Fri, 20 Dec 2019 00:25:56 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 47f8fr4PMbz4H0N; Fri, 20 Dec 2019 00:25:56 +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 8DD9F1EA83; Fri, 20 Dec 2019 00:25:56 +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 xBK0PuWS049714; Fri, 20 Dec 2019 00:25:56 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBK0PuI8049713; Fri, 20 Dec 2019 00:25:56 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201912200025.xBK0PuI8049713@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 20 Dec 2019 00:25:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r355918 - stable/12/sys/kern X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/kern X-SVN-Commit-Revision: 355918 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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Dec 2019 00:25:56 -0000 Author: mav Date: Fri Dec 20 00:25:56 2019 New Revision: 355918 URL: https://svnweb.freebsd.org/changeset/base/355918 Log: MFC r355457: Make devstat_end_transaction_bio() count BIO_ORDERED. Modified: stable/12/sys/kern/subr_devstat.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/subr_devstat.c ============================================================================== --- stable/12/sys/kern/subr_devstat.c Thu Dec 19 22:35:16 2019 (r355917) +++ stable/12/sys/kern/subr_devstat.c Fri Dec 20 00:25:56 2019 (r355918) @@ -349,11 +349,16 @@ devstat_end_transaction_bio_bt(struct devstat *ds, con const struct bintime *now) { devstat_trans_flags flg; + devstat_tag_type tag; /* sanity check */ if (ds == NULL) return; + if (bp->bio_flags & BIO_ORDERED) + tag = DEVSTAT_TAG_ORDERED; + else + tag = DEVSTAT_TAG_SIMPLE; if (bp->bio_cmd == BIO_DELETE) flg = DEVSTAT_FREE; else if ((bp->bio_cmd == BIO_READ) @@ -366,7 +371,7 @@ devstat_end_transaction_bio_bt(struct devstat *ds, con flg = DEVSTAT_NO_DATA; devstat_end_transaction(ds, bp->bio_bcount - bp->bio_resid, - DEVSTAT_TAG_SIMPLE, flg, now, &bp->bio_t0); + tag, flg, now, &bp->bio_t0); DTRACE_DEVSTAT_BIO_DONE(); } From owner-svn-src-stable-12@freebsd.org Fri Dec 20 01:00:18 2019 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D1D161EF80C; Fri, 20 Dec 2019 01:00:18 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) 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 47f9QV59vXz4Hyq; Fri, 20 Dec 2019 01:00:18 +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 ACDE91EFE1; Fri, 20 Dec 2019 01:00:18 +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 xBK10IWB067444; Fri, 20 Dec 2019 01:00:18 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBK10I4a067443; Fri, 20 Dec 2019 01:00:18 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201912200100.xBK10I4a067443@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 20 Dec 2019 01:00:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r355919 - stable/12/libexec/rtld-elf X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/libexec/rtld-elf X-SVN-Commit-Revision: 355919 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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Dec 2019 01:00:18 -0000 Author: kib Date: Fri Dec 20 01:00:18 2019 New Revision: 355919 URL: https://svnweb.freebsd.org/changeset/base/355919 Log: MFC r355676: rtld: make checks for mmap(2) failures compliant with documentation. Modified: stable/12/libexec/rtld-elf/map_object.c Directory Properties: stable/12/ (props changed) Modified: stable/12/libexec/rtld-elf/map_object.c ============================================================================== --- stable/12/libexec/rtld-elf/map_object.c Fri Dec 20 00:25:56 2019 (r355918) +++ stable/12/libexec/rtld-elf/map_object.c Fri Dec 20 01:00:18 2019 (r355919) @@ -203,7 +203,7 @@ map_object(int fd, const char *path, const struct stat base_flags |= MAP_FIXED | MAP_EXCL; mapbase = mmap(base_addr, mapsize, PROT_NONE, base_flags, -1, 0); - if (mapbase == (caddr_t) -1) { + if (mapbase == MAP_FAILED) { _rtld_error("%s: mmap of entire address space failed: %s", path, rtld_strerror(errno)); goto error; @@ -259,7 +259,7 @@ map_object(int fd, const char *path, const struct stat bss_addr = mapbase + (bss_vaddr - base_vaddr); if (bss_vlimit > bss_vaddr) { /* There is something to do */ if (mmap(bss_addr, bss_vlimit - bss_vaddr, data_prot, - data_flags | MAP_ANON, -1, 0) == (caddr_t)-1) { + data_flags | MAP_ANON, -1, 0) == MAP_FAILED) { _rtld_error("%s: mmap of bss failed: %s", path, rtld_strerror(errno)); goto error1; @@ -343,7 +343,7 @@ get_elf_header(int fd, const char *path, const struct hdr = mmap(NULL, PAGE_SIZE, PROT_READ, MAP_PRIVATE | MAP_PREFAULT_READ, fd, 0); - if (hdr == (Elf_Ehdr *)MAP_FAILED) { + if (hdr == MAP_FAILED) { _rtld_error("%s: read error: %s", path, rtld_strerror(errno)); return (NULL); } From owner-svn-src-stable-12@freebsd.org Fri Dec 20 07:40:29 2019 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 011DD1D061E; Fri, 20 Dec 2019 07:40:29 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 47fLJD6CfJz4cFF; Fri, 20 Dec 2019 07:40:28 +0000 (UTC) (envelope-from tsoome@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 D08B7237BB; Fri, 20 Dec 2019 07:40:28 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xBK7eScD006144; Fri, 20 Dec 2019 07:40:28 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBK7eSgT006141; Fri, 20 Dec 2019 07:40:28 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201912200740.xBK7eSgT006141@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Fri, 20 Dec 2019 07:40:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r355927 - stable/12/stand/libsa X-SVN-Group: stable-12 X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: stable/12/stand/libsa X-SVN-Commit-Revision: 355927 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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Dec 2019 07:40:29 -0000 Author: tsoome Date: Fri Dec 20 07:40:28 2019 New Revision: 355927 URL: https://svnweb.freebsd.org/changeset/base/355927 Log: MFC r355713: loader: cd9660_open() warn: is 'buf' large enough for 'struct iso_primary_descriptor'? We do allocate amount of memory (void * or char *), and then assign this buffer to struct iso_primary_descriptor *vd. Make sure we do allocate enough bytes. In fact we do allocate enough, but it is good idea to make sure this really is so. Modified: stable/12/stand/libsa/cd9660.c stable/12/stand/libsa/cd9660read.c Directory Properties: stable/12/ (props changed) Modified: stable/12/stand/libsa/cd9660.c ============================================================================== --- stable/12/stand/libsa/cd9660.c Fri Dec 20 05:15:03 2019 (r355926) +++ stable/12/stand/libsa/cd9660.c Fri Dec 20 07:40:28 2019 (r355927) @@ -286,7 +286,7 @@ cd9660_open(const char *path, struct open_file *f) struct file *fp = NULL; void *buf; struct iso_primary_descriptor *vd; - size_t buf_size, read, dsize, off; + size_t read, dsize, off; daddr_t bno, boff; struct iso_directory_record rec; struct iso_directory_record *dp = NULL; @@ -294,7 +294,8 @@ cd9660_open(const char *path, struct open_file *f) bool isdir = false; /* First find the volume descriptor */ - buf = malloc(buf_size = ISO_DEFAULT_BLOCK_SIZE); + buf = malloc(MAX(ISO_DEFAULT_BLOCK_SIZE, + sizeof(struct iso_primary_descriptor))); vd = buf; for (bno = 16;; bno++) { twiddle(1); @@ -438,8 +439,7 @@ cd9660_open(const char *path, struct open_file *f) return 0; out: - if (fp) - free(fp); + free(fp); free(buf); return rc; Modified: stable/12/stand/libsa/cd9660read.c ============================================================================== --- stable/12/stand/libsa/cd9660read.c Fri Dec 20 05:15:03 2019 (r355926) +++ stable/12/stand/libsa/cd9660read.c Fri Dec 20 07:40:28 2019 (r355927) @@ -35,6 +35,7 @@ #include __FBSDID("$FreeBSD$"); +#include #include #include @@ -220,7 +221,8 @@ dirmatch(const char *path, struct iso_directory_record static uint64_t cd9660_lookup(const char *path) { - static char blkbuf[ISO_DEFAULT_BLOCK_SIZE]; + static char blkbuf[MAX(ISO_DEFAULT_BLOCK_SIZE, + sizeof(struct iso_primary_descriptor))]; struct iso_primary_descriptor *vd; struct iso_directory_record rec; struct iso_directory_record *dp = NULL; From owner-svn-src-stable-12@freebsd.org Fri Dec 20 08:12:45 2019 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4087F1D2031; Fri, 20 Dec 2019 08:12:45 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 47fM1T102rz4f2h; Fri, 20 Dec 2019 08:12:45 +0000 (UTC) (envelope-from tsoome@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 1D2AB23EDA; Fri, 20 Dec 2019 08:12:45 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xBK8Ci6c029185; Fri, 20 Dec 2019 08:12:44 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBK8Cicd029184; Fri, 20 Dec 2019 08:12:44 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201912200812.xBK8Cicd029184@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Fri, 20 Dec 2019 08:12:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r355928 - stable/12/stand/common X-SVN-Group: stable-12 X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: stable/12/stand/common X-SVN-Commit-Revision: 355928 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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Dec 2019 08:12:45 -0000 Author: tsoome Date: Fri Dec 20 08:12:44 2019 New Revision: 355928 URL: https://svnweb.freebsd.org/changeset/base/355928 Log: MFC r355703: loader: clean up devopen and devclose a bit devopen should undo setup of f->f_dev in case of error. devclose can just call free(). Modified: stable/12/stand/common/devopen.c Directory Properties: stable/12/ (props changed) Modified: stable/12/stand/common/devopen.c ============================================================================== --- stable/12/stand/common/devopen.c Fri Dec 20 07:40:28 2019 (r355927) +++ stable/12/stand/common/devopen.c Fri Dec 20 08:12:44 2019 (r355928) @@ -52,6 +52,7 @@ devopen(struct open_file *f, const char *fname, const result = dev->d_dev->dv_open(f, dev); if (result != 0) { f->f_devdata = NULL; + f->f_dev = NULL; free(dev); return (result); } @@ -74,8 +75,6 @@ int devclose(struct open_file *f) { - if (f->f_devdata != NULL) { - free(f->f_devdata); - } + free(f->f_devdata); return (0); } From owner-svn-src-stable-12@freebsd.org Fri Dec 20 08:15:56 2019 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 66F831D221F; Fri, 20 Dec 2019 08:15:56 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 47fM5827F6z4fJ0; Fri, 20 Dec 2019 08:15:56 +0000 (UTC) (envelope-from tsoome@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 444A023EDE; Fri, 20 Dec 2019 08:15:56 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xBK8Fupj029379; Fri, 20 Dec 2019 08:15:56 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBK8FuRG029378; Fri, 20 Dec 2019 08:15:56 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <201912200815.xBK8FuRG029378@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Fri, 20 Dec 2019 08:15:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r355929 - stable/12/stand/common X-SVN-Group: stable-12 X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: stable/12/stand/common X-SVN-Commit-Revision: 355929 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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Dec 2019 08:15:56 -0000 Author: tsoome Date: Fri Dec 20 08:15:55 2019 New Revision: 355929 URL: https://svnweb.freebsd.org/changeset/base/355929 Log: MFC r355702: loader: vdisk dereference after free print out the information and then free the memory used. Modified: stable/12/stand/common/vdisk.c Directory Properties: stable/12/ (props changed) Modified: stable/12/stand/common/vdisk.c ============================================================================== --- stable/12/stand/common/vdisk.c Fri Dec 20 08:12:44 2019 (r355928) +++ stable/12/stand/common/vdisk.c Fri Dec 20 08:15:55 2019 (r355929) @@ -229,10 +229,10 @@ command_unmapvd(int argc, char *argv[]) } STAILQ_REMOVE(&vdisk_list, vd, vdisk_info, vdisk_link); - close(vd->vdisk_fd); + (void) close(vd->vdisk_fd); + printf("%s (%s) unmapped\n", argv[1], vd->vdisk_path); free(vd->vdisk_path); free(vd); - printf("%s (%s) unmapped\n", argv[1], vd->vdisk_path); return (CMD_OK); } From owner-svn-src-stable-12@freebsd.org Fri Dec 20 16:04:26 2019 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CADC81DCFAE; Fri, 20 Dec 2019 16:04:26 +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 47fYTk53mBz46W0; Fri, 20 Dec 2019 16:04:26 +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 A906412C1; Fri, 20 Dec 2019 16:04:26 +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 xBKG4Qmf007779; Fri, 20 Dec 2019 16:04:26 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBKG4Qng007778; Fri, 20 Dec 2019 16:04:26 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201912201604.xBKG4Qng007778@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:04:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r355933 - stable/12/sys/dev/an X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/dev/an X-SVN-Commit-Revision: 355933 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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Dec 2019 16:04:26 -0000 Author: markj Date: Fri Dec 20 16:04:26 2019 New Revision: 355933 URL: https://svnweb.freebsd.org/changeset/base/355933 Log: MFC r355864: an(4): Require privileges for all SIOCGAIRONET requests. Modified: stable/12/sys/dev/an/if_an.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/an/if_an.c ============================================================================== --- stable/12/sys/dev/an/if_an.c Fri Dec 20 15:28:40 2019 (r355932) +++ stable/12/sys/dev/an/if_an.c Fri Dec 20 16:04:26 2019 (r355933) @@ -1875,6 +1875,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; @@ -1934,17 +1935,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; @@ -1960,12 +1965,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-12@freebsd.org Fri Dec 20 22:07:05 2019 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B84761E5213; Fri, 20 Dec 2019 22:07:05 +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 47fjX94PDgz4VLj; Fri, 20 Dec 2019 22:07:05 +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 9078E575F; Fri, 20 Dec 2019 22:07:05 +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 xBKM75jS022455; Fri, 20 Dec 2019 22:07:05 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBKM75qU022454; Fri, 20 Dec 2019 22:07:05 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201912202207.xBKM75qU022454@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:07:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r355964 - stable/12/sys/dev/ata/chipsets X-SVN-Group: stable-12 X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: stable/12/sys/dev/ata/chipsets X-SVN-Commit-Revision: 355964 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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Dec 2019 22:07:05 -0000 Author: brooks Date: Fri Dec 20 22:07:05 2019 New Revision: 355964 URL: https://svnweb.freebsd.org/changeset/base/355964 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/12/sys/dev/ata/chipsets/ata-promise.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/ata/chipsets/ata-promise.c ============================================================================== --- stable/12/sys/dev/ata/chipsets/ata-promise.c Fri Dec 20 21:56:45 2019 (r355963) +++ stable/12/sys/dev/ata/chipsets/ata-promise.c Fri Dec 20 22:07:05 2019 (r355964) @@ -795,7 +795,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-12@freebsd.org Fri Dec 20 22:53:24 2019 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 381141E6278; Fri, 20 Dec 2019 22:53:24 +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 47fkYc0jfGz4XZm; Fri, 20 Dec 2019 22:53:24 +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 12EC86028; Fri, 20 Dec 2019 22:53:24 +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 xBKMrN5K051889; Fri, 20 Dec 2019 22:53:23 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBKMrNNx051888; Fri, 20 Dec 2019 22:53:23 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201912202253.xBKMrNNx051888@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 22:53:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r355966 - stable/12/sys/rpc/rpcsec_gss X-SVN-Group: stable-12 X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: stable/12/sys/rpc/rpcsec_gss X-SVN-Commit-Revision: 355966 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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Dec 2019 22:53:24 -0000 Author: rmacklem Date: Fri Dec 20 22:53:23 2019 New Revision: 355966 URL: https://svnweb.freebsd.org/changeset/base/355966 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. Modified: stable/12/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c ============================================================================== --- stable/12/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Fri Dec 20 22:12:21 2019 (r355965) +++ stable/12/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Fri Dec 20 22:53:23 2019 (r355966) @@ -180,6 +180,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, @@ -950,8 +955,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; /* From owner-svn-src-stable-12@freebsd.org Sat Dec 21 02:40:41 2019 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C1FEA1EC206; Sat, 21 Dec 2019 02:40:41 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (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 47fqbs4cpsz3FTZ; Sat, 21 Dec 2019 02:40:41 +0000 (UTC) (envelope-from pfg@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 99DAB8879; Sat, 21 Dec 2019 02:40:41 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xBL2efc7082814; Sat, 21 Dec 2019 02:40:41 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBL2efl0082812; Sat, 21 Dec 2019 02:40:41 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201912210240.xBL2efl0082812@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sat, 21 Dec 2019 02:40:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r355968 - stable/12/sys/sys X-SVN-Group: stable-12 X-SVN-Commit-Author: pfg X-SVN-Commit-Paths: stable/12/sys/sys X-SVN-Commit-Revision: 355968 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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Dec 2019 02:40:41 -0000 Author: pfg Date: Sat Dec 21 02:40:40 2019 New Revision: 355968 URL: https://svnweb.freebsd.org/changeset/base/355968 Log: MFC r355828: Double the size of ARG_MAX on LP64 platforms. As modern software keeps growing in size, we get requests to update the value of ARG_MAX in order to link the resulting object files. Other OSs have much higher values but increasiong ARG_MAX has a multiplied effect on KVA, so just bumping this value is dangerous in some archs like ARM32 that can exhaust KVA rather easily. While it would be better to have a unique value for all archs, other OSs (Illumos in particular) can have different ARG_MAX limits depending on the platform, For now we want to be really conservative so we are avoidng the change on ILP32 and in the alternative case we only double it since that seems to work well enough for recent Code Aster. Bump the _FreeBSD_version for this change. PR: 241710 Modified: stable/12/sys/sys/param.h stable/12/sys/sys/syslimits.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/sys/param.h ============================================================================== --- stable/12/sys/sys/param.h Fri Dec 20 23:08:10 2019 (r355967) +++ stable/12/sys/sys/param.h Sat Dec 21 02:40:40 2019 (r355968) @@ -60,7 +60,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1201505 /* Master, propagated to newvers */ +#define __FreeBSD_version 1201506 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, Modified: stable/12/sys/sys/syslimits.h ============================================================================== --- stable/12/sys/sys/syslimits.h Fri Dec 20 23:08:10 2019 (r355967) +++ stable/12/sys/sys/syslimits.h Sat Dec 21 02:40:40 2019 (r355968) @@ -48,7 +48,11 @@ * Do not add any new variables here. (See the comment at the end of * the file for why.) */ -#define ARG_MAX 262144 /* max bytes for an exec function */ +#ifndef __ILP32__ +#define ARG_MAX (2 * 256 * 1024) /* max bytes for an exec function */ +#else +#define ARG_MAX (256 * 1024) /* max bytes for KVA-starved archs */ +#endif #ifndef CHILD_MAX #define CHILD_MAX 40 /* max simultaneous processes */ #endif From owner-svn-src-stable-12@freebsd.org Sat Dec 21 15:33:20 2019 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0E44D1D68CC; Sat, 21 Dec 2019 15:33: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.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 47g8lM6RRMz4N2g; Sat, 21 Dec 2019 15:33: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 D7CB0196E2; Sat, 21 Dec 2019 15:33: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 xBLFXJtT042541; Sat, 21 Dec 2019 15:33:19 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBLFXJWo042539; Sat, 21 Dec 2019 15:33:19 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201912211533.xBLFXJWo042539@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 21 Dec 2019 15:33:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r355981 - in stable/12: lib/libc/sys sys/kern X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/12: lib/libc/sys sys/kern X-SVN-Commit-Revision: 355981 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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Dec 2019 15:33:20 -0000 Author: kib Date: Sat Dec 21 15:33:19 2019 New Revision: 355981 URL: https://svnweb.freebsd.org/changeset/base/355981 Log: MFC r355500: Only return EPERM from kill(-pid) when no process was signalled. Modified: stable/12/lib/libc/sys/kill.2 stable/12/sys/kern/kern_sig.c Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libc/sys/kill.2 ============================================================================== --- stable/12/lib/libc/sys/kill.2 Sat Dec 21 11:38:48 2019 (r355980) +++ stable/12/lib/libc/sys/kill.2 Sat Dec 21 15:33:19 2019 (r355981) @@ -28,7 +28,7 @@ .\" @(#)kill.2 8.3 (Berkeley) 4/19/94 .\" $FreeBSD$ .\" -.Dd December 1, 2017 +.Dd December 1, 2019 .Dt KILL 2 .Os .Sh NAME @@ -105,12 +105,11 @@ process with ID 1 .Xr init 8 ) , and the process sending the signal. If the user is not the super user, the signal is sent to all processes -with the same uid as the user excluding the process sending the signal. +which the caller has permissions to, excluding the process sending the signal. No error is returned if any process could be signaled. .El .Pp -For compatibility with System V, -if the process number is negative but not -1, +If the process number is negative but not -1, the signal is sent to all processes whose process group ID is equal to the absolute value of the process number. This is a variant of @@ -134,7 +133,7 @@ No process or process group can be found corresponding .It Bq Er EPERM The sending process does not have permission to send .Va sig -to the receiving process. +to any receiving process. .El .Sh SEE ALSO .Xr getpgrp 2 , Modified: stable/12/sys/kern/kern_sig.c ============================================================================== --- stable/12/sys/kern/kern_sig.c Sat Dec 21 11:38:48 2019 (r355980) +++ stable/12/sys/kern/kern_sig.c Sat Dec 21 15:33:19 2019 (r355981) @@ -1679,6 +1679,36 @@ kern_sigaltstack(struct thread *td, stack_t *ss, stack return (0); } +struct killpg1_ctx { + struct thread *td; + ksiginfo_t *ksi; + int sig; + bool sent; + bool found; + int ret; +}; + +static void +killpg1_sendsig(struct proc *p, bool notself, struct killpg1_ctx *arg) +{ + int err; + + if (p->p_pid <= 1 || (p->p_flag & P_SYSTEM) != 0 || + (notself && p == arg->td->td_proc) || p->p_state == PRS_NEW) + return; + PROC_LOCK(p); + err = p_cansignal(arg->td, p, arg->sig); + if (err == 0 && arg->sig != 0) + pksignal(p, arg->sig, arg->ksi); + PROC_UNLOCK(p); + if (err != ESRCH) + arg->found = true; + if (err == 0) + arg->sent = true; + else if (arg->ret == 0 && err != ESRCH && err != EPERM) + arg->ret = err; +} + /* * Common code for kill process group/broadcast kill. * cp is calling process. @@ -1688,30 +1718,21 @@ killpg1(struct thread *td, int sig, int pgid, int all, { struct proc *p; struct pgrp *pgrp; - int err; - int ret; + struct killpg1_ctx arg; - ret = ESRCH; + arg.td = td; + arg.ksi = ksi; + arg.sig = sig; + arg.sent = false; + arg.found = false; + arg.ret = 0; if (all) { /* * broadcast */ sx_slock(&allproc_lock); FOREACH_PROC_IN_SYSTEM(p) { - if (p->p_pid <= 1 || p->p_flag & P_SYSTEM || - p == td->td_proc || p->p_state == PRS_NEW) { - continue; - } - PROC_LOCK(p); - err = p_cansignal(td, p, sig); - if (err == 0) { - if (sig) - pksignal(p, sig, ksi); - ret = err; - } - else if (ret == ESRCH) - ret = err; - PROC_UNLOCK(p); + killpg1_sendsig(p, true, &arg); } sx_sunlock(&allproc_lock); } else { @@ -1731,25 +1752,14 @@ killpg1(struct thread *td, int sig, int pgid, int all, } sx_sunlock(&proctree_lock); LIST_FOREACH(p, &pgrp->pg_members, p_pglist) { - PROC_LOCK(p); - if (p->p_pid <= 1 || p->p_flag & P_SYSTEM || - p->p_state == PRS_NEW) { - PROC_UNLOCK(p); - continue; - } - err = p_cansignal(td, p, sig); - if (err == 0) { - if (sig) - pksignal(p, sig, ksi); - ret = err; - } - else if (ret == ESRCH) - ret = err; - PROC_UNLOCK(p); + killpg1_sendsig(p, false, &arg); } PGRP_UNLOCK(pgrp); } - return (ret); + MPASS(arg.ret != 0 || arg.found || !arg.sent); + if (arg.ret == 0 && !arg.sent) + arg.ret = arg.found ? EPERM : ESRCH; + return (arg.ret); } #ifndef _SYS_SYSPROTO_H_ From owner-svn-src-stable-12@freebsd.org Sat Dec 21 16:08:34 2019 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C70B81D7301; Sat, 21 Dec 2019 16:08:34 +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 47g9X24yrlz4PhQ; Sat, 21 Dec 2019 16:08:34 +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 A546F19C38; Sat, 21 Dec 2019 16:08:34 +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 xBLG8YQ0060611; Sat, 21 Dec 2019 16:08:34 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBLG8YcK060610; Sat, 21 Dec 2019 16:08:34 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201912211608.xBLG8YcK060610@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 21 Dec 2019 16:08:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r355982 - stable/12/lib/geom/part X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/lib/geom/part X-SVN-Commit-Revision: 355982 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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Dec 2019 16:08:34 -0000 Author: markj Date: Sat Dec 21 16:08:34 2019 New Revision: 355982 URL: https://svnweb.freebsd.org/changeset/base/355982 Log: MFC r354824: Fix grammar in gpart.8. PR: 241973 Modified: stable/12/lib/geom/part/gpart.8 Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/geom/part/gpart.8 ============================================================================== --- stable/12/lib/geom/part/gpart.8 Sat Dec 21 15:33:19 2019 (r355981) +++ stable/12/lib/geom/part/gpart.8 Sat Dec 21 16:08:34 2019 (r355982) @@ -695,7 +695,7 @@ for APM, for GPT, and 0x0904 for VTOC8. .El .Pp -Another symbolic names that can be used with +Other symbolic names that can be used with .Cm gpart utility are: .Bl -tag -width ".Cm dragonfly-disklabel64" From owner-svn-src-stable-12@freebsd.org Sat Dec 21 16:16:43 2019 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DADC31D7819; Sat, 21 Dec 2019 16:16:43 +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 47g9jR5WD9z4QJH; Sat, 21 Dec 2019 16:16:43 +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 B84E519E00; Sat, 21 Dec 2019 16:16:43 +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 xBLGGhNU066583; Sat, 21 Dec 2019 16:16:43 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBLGGhOA066582; Sat, 21 Dec 2019 16:16:43 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201912211616.xBLGGhOA066582@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 21 Dec 2019 16:16:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r355983 - stable/12/sys/dev/vnic X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/dev/vnic X-SVN-Commit-Revision: 355983 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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Dec 2019 16:16:43 -0000 Author: markj Date: Sat Dec 21 16:16:43 2019 New Revision: 355983 URL: https://svnweb.freebsd.org/changeset/base/355983 Log: MFC r355887: vnic: Relax PHY node matching after r336281. PR: 242654 Modified: stable/12/sys/dev/vnic/thunder_bgx_fdt.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/vnic/thunder_bgx_fdt.c ============================================================================== --- stable/12/sys/dev/vnic/thunder_bgx_fdt.c Sat Dec 21 16:08:34 2019 (r355982) +++ stable/12/sys/dev/vnic/thunder_bgx_fdt.c Sat Dec 21 16:16:43 2019 (r355983) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -151,6 +152,7 @@ bgx_fdt_phy_name_match(struct bgx *bgx, char *phy_name { const char *type; ssize_t sz; + char last; switch (bgx->qlm_mode) { case QLM_MODE_SGMII: @@ -193,10 +195,11 @@ bgx_fdt_phy_name_match(struct bgx *bgx, char *phy_name if (sz > size) return (FALSE); - if (strncmp(phy_name, type, sz - 1) == 0 && - (phy_name[sz - 1] == '\0' || phy_name[sz - 1] == '@')) - return (TRUE); - + if (strncmp(phy_name, type, sz - 1) == 0) { + last = phy_name[sz - 1]; + if (last == '\0' || last == '@' || isdigit(last)) + return (TRUE); + } return (FALSE); } From owner-svn-src-stable-12@freebsd.org Sat Dec 21 18:50:25 2019 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CF17C1D9E92; Sat, 21 Dec 2019 18:50:25 +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 47gF6n53xXz4Wcw; Sat, 21 Dec 2019 18:50:25 +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 A92831B8B3; Sat, 21 Dec 2019 18:50:25 +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 xBLIoPPW055556; Sat, 21 Dec 2019 18:50:25 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBLIoPko055555; Sat, 21 Dec 2019 18:50:25 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201912211850.xBLIoPko055555@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 21 Dec 2019 18:50:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r355984 - stable/12/sys/dev/oce X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/dev/oce X-SVN-Commit-Revision: 355984 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-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Dec 2019 18:50:25 -0000 Author: markj Date: Sat Dec 21 18:50:25 2019 New Revision: 355984 URL: https://svnweb.freebsd.org/changeset/base/355984 Log: MFC r355885: oce: Tighten input validation in the SIOCGI2C handler. Modified: stable/12/sys/dev/oce/oce_if.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/oce/oce_if.c ============================================================================== --- stable/12/sys/dev/oce/oce_if.c Sat Dec 21 16:16:43 2019 (r355983) +++ stable/12/sys/dev/oce/oce_if.c Sat Dec 21 18:50:25 2019 (r355984) @@ -593,27 +593,26 @@ oce_ioctl(struct ifnet *ifp, u_long command, caddr_t d if (rc) break; - if (i2c.dev_addr != PAGE_NUM_A0 && - i2c.dev_addr != PAGE_NUM_A2) { + if (i2c.dev_addr == PAGE_NUM_A0) { + offset = i2c.offset; + } else if (i2c.dev_addr == PAGE_NUM_A2) { + offset = TRANSCEIVER_A0_SIZE + i2c.offset; + } else { rc = EINVAL; break; } - if (i2c.len > sizeof(i2c.data)) { + if (i2c.len > sizeof(i2c.data) || + i2c.len + offset > sizeof(sfp_vpd_dump_buffer)) { rc = EINVAL; break; } rc = oce_mbox_read_transrecv_data(sc, i2c.dev_addr); - if(rc) { + if (rc) { rc = -rc; break; } - - if (i2c.dev_addr == PAGE_NUM_A0) - offset = i2c.offset; - else - offset = TRANSCEIVER_A0_SIZE + i2c.offset; memcpy(&i2c.data[0], &sfp_vpd_dump_buffer[offset], i2c.len);